Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-braintree
Model
InstantPurchase
PaymentAdditionalInformationProvider.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Braintree\Model\InstantPurchase
;
7
8
use
Magento\Braintree\Gateway\Command\GetPaymentNonceCommand
;
9
use
Magento\InstantPurchase\PaymentMethodIntegration\PaymentAdditionalInformationProviderInterface
;
10
use
Magento\Vault\Api\Data\PaymentTokenInterface
;
11
15
class
PaymentAdditionalInformationProvider
implements
PaymentAdditionalInformationProviderInterface
16
{
20
private
$getPaymentNonceCommand;
21
26
public
function
__construct
(
GetPaymentNonceCommand
$getPaymentNonceCommand)
27
{
28
$this->getPaymentNonceCommand = $getPaymentNonceCommand;
29
}
30
34
public
function
getAdditionalInformation
(
PaymentTokenInterface
$paymentToken
): array
35
{
36
$paymentMethodNonce = $this->getPaymentNonceCommand->execute([
37
PaymentTokenInterface::CUSTOMER_ID
=>
$paymentToken
->getCustomerId(),
38
PaymentTokenInterface::PUBLIC_HASH
=>
$paymentToken
->getPublicHash(),
39
])->
get
()[
'paymentMethodNonce'
];
40
41
return
[
42
'payment_method_nonce'
=> $paymentMethodNonce,
43
];
44
}
45
}
Magento\Braintree\Model\InstantPurchase\PaymentAdditionalInformationProvider
Definition:
PaymentAdditionalInformationProvider.php:15
Magento\Braintree\Model\InstantPurchase
$paymentToken
$paymentToken
Definition:
paypal_vault_token.php:27
Magento\Braintree\Gateway\Command\GetPaymentNonceCommand
Definition:
GetPaymentNonceCommand.php:19
Magento\Vault\Api\Data\PaymentTokenInterface\CUSTOMER_ID
const CUSTOMER_ID
Definition:
PaymentTokenInterface.php:26
Magento\Braintree\Model\InstantPurchase\PaymentAdditionalInformationProvider\getAdditionalInformation
getAdditionalInformation(PaymentTokenInterface $paymentToken)
Definition:
PaymentAdditionalInformationProvider.php:34
Magento\Braintree\Model\InstantPurchase\PaymentAdditionalInformationProvider\__construct
__construct(GetPaymentNonceCommand $getPaymentNonceCommand)
Definition:
PaymentAdditionalInformationProvider.php:26
Magento\Vault\Api\Data\PaymentTokenInterface
Definition:
PaymentTokenInterface.php:14
Magento\Vault\Api\Data\PaymentTokenInterface\PUBLIC_HASH
const PUBLIC_HASH
Definition:
PaymentTokenInterface.php:30
Magento\InstantPurchase\PaymentMethodIntegration\PaymentAdditionalInformationProviderInterface
Definition:
PaymentAdditionalInformationProviderInterface.php:19