-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from mercadopago/release/1.8.0
v1.8.0
- Loading branch information
Showing
17 changed files
with
190 additions
and
114 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © MercadoPago. All rights reserved. | ||
* | ||
* @author Mercado Pago | ||
* @license See LICENSE for license details. | ||
*/ | ||
|
||
namespace MercadoPago\AdbPayment\Gateway\Request; | ||
|
||
use Magento\Payment\Gateway\Request\BuilderInterface; | ||
|
||
/** | ||
* Gateway requests for Payer data. | ||
*/ | ||
class PayerDataRequestVault extends PayerDataRequest implements BuilderInterface | ||
{ | ||
protected function _prepareData(array $buildSubject, array $result): array | ||
{ | ||
$paymentDO = $this->subjectReader->readPayment($buildSubject); | ||
$payment = $paymentDO->getPayment(); | ||
|
||
$mpUserId = $payment->getAdditionalInformation('mp_user_id'); | ||
$type = isset($mpUserId) ? 'customer' : null; | ||
|
||
$result[self::PAYER][self::TYPE] = $type; | ||
$result[self::PAYER][self::ID] = $mpUserId; | ||
|
||
return $result; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.