|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
| __construct (\Magento\Paypal\Model\Config\Factory $configFactory, \Magento\Paypal\Model\Api\Type\Factory $apiFactory, \Magento\Paypal\Model\InfoFactory $infoFactory, TransactionRepositoryInterface $transactionRepository) | |
| setMethod ($code, $storeId=null) | |
| setConfig (\Magento\Paypal\Model\Config $instance, $storeId=null) | |
| getConfig () | |
| getApi () | |
| resetApi () | |
| getInfo () | |
| importPaymentInfo (\Magento\Framework\DataObject $from, \Magento\Payment\Model\InfoInterface $to) | |
| void (\Magento\Framework\DataObject $payment) | |
| capture (\Magento\Framework\DataObject $payment, $amount) | |
| refund (\Magento\Framework\DataObject $payment, $amount) | |
| cancel (\Magento\Framework\DataObject $payment) | |
| canReviewPayment (\Magento\Payment\Model\InfoInterface $payment) | |
| reviewPayment (\Magento\Payment\Model\InfoInterface $payment, $action) | |
| fetchTransactionInfo (\Magento\Payment\Model\InfoInterface $payment, $transactionId) | |
Data Fields | |
| const | PAYMENT_REVIEW_ACCEPT = 'accept' |
| const | PAYMENT_REVIEW_DENY = 'deny' |
Protected Member Functions | |
| _isPaymentReviewRequired (\Magento\Payment\Model\InfoInterface $payment) | |
| _importCaptureResultToPayment ($api, $payment) | |
| _importRefundResultToPayment ($api, $payment, $canRefundMore) | |
| _getParentTransactionId (\Magento\Framework\DataObject $payment) | |
Protected Attributes | |
| $_config | |
| $_api | |
| $_infoInstance | |
| $_apiType = \Magento\Paypal\Model\Api\Nvp::class | |
| $_configType = \Magento\Paypal\Model\Config::class | |
| $_configFactory | |
| $_apiFactory | |
| $_infoFactory | |
| $transactionRepository | |
PayPal Website Payments Pro implementation for payment method instances This model was created because right now PayPal Direct and PayPal Express payment methods cannot have same abstract
| __construct | ( | \Magento\Paypal\Model\Config\Factory | $configFactory, |
| \Magento\Paypal\Model\Api\Type\Factory | $apiFactory, | ||
| \Magento\Paypal\Model\InfoFactory | $infoFactory, | ||
| TransactionRepositoryInterface | $transactionRepository | ||
| ) |
|
protected |
Parent transaction id getter
| \Magento\Framework\DataObject | $payment |
|
protected |
Import capture results to payment
| \Magento\Paypal\Model\Api\Nvp | $api | |
| \Magento\Sales\Model\Order\Payment | $payment |
Definition at line 400 of file Pro.php.
|
protected |
Import refund results to payment
| \Magento\Paypal\Model\Api\Nvp | $api | |
| \Magento\Sales\Model\Order\Payment | $payment | |
| bool | $canRefundMore |
Definition at line 414 of file Pro.php.
|
protected |
Check whether payment review is required
| \Magento\Payment\Model\InfoInterface | $payment |
Definition at line 347 of file Pro.php.
| cancel | ( | \Magento\Framework\DataObject | $payment | ) |
| canReviewPayment | ( | \Magento\Payment\Model\InfoInterface | $payment | ) |
Check whether can do payment review
| \Magento\Payment\Model\InfoInterface | $payment |
Definition at line 333 of file Pro.php.
| capture | ( | \Magento\Framework\DataObject | $payment, |
| $amount | |||
| ) |
Attempt to capture payment Will return false if the payment is not supposed to be captured
| \Magento\Framework\DataObject | $payment | |
| float | $amount |
Definition at line 251 of file Pro.php.
| fetchTransactionInfo | ( | \Magento\Payment\Model\InfoInterface | $payment, |
| $transactionId | |||
| ) |
Fetch transaction details info
| \Magento\Payment\Model\InfoInterface | $payment | |
| string | $transactionId |
Definition at line 384 of file Pro.php.
| getApi | ( | ) |
| getConfig | ( | ) |
| getInfo | ( | ) |
| importPaymentInfo | ( | \Magento\Framework\DataObject | $from, |
| \Magento\Payment\Model\InfoInterface | $to | ||
| ) |
Transfer transaction/payment information from API instance to order payment
| \Magento\Framework\DataObject | AbstractApi | $from | |
| \Magento\Payment\Model\InfoInterface | $to |
Detect payment review and/or frauds PayPal pro API returns fraud results only in the payment call response
Definition at line 196 of file Pro.php.
| refund | ( | \Magento\Framework\DataObject | $payment, |
| $amount | |||
| ) |
Refund a capture transaction
| \Magento\Framework\DataObject | $payment | |
| float | $amount |
Definition at line 282 of file Pro.php.
| resetApi | ( | ) |
| reviewPayment | ( | \Magento\Payment\Model\InfoInterface | $payment, |
| $action | |||
| ) |
Perform the payment review
| \Magento\Payment\Model\InfoInterface | $payment | |
| string | $action |
Definition at line 359 of file Pro.php.
| setConfig | ( | \Magento\Paypal\Model\Config | $instance, |
$storeId = null |
|||
| ) |
| setMethod | ( | $code, | |
$storeId = null |
|||
| ) |
| void | ( | \Magento\Framework\DataObject | $payment | ) |
Void transaction
| \Magento\Framework\DataObject | $payment |
Definition at line 229 of file Pro.php.
| const PAYMENT_REVIEW_ACCEPT = 'accept' |