Paypal Data helper
Definition at line 18 of file Data.php.
◆ __construct()
- Parameters
-
\Magento\Framework\App\Helper\Context | $context | |
\Magento\Payment\Helper\Data | $paymentData | |
\Magento\Paypal\Model\Billing\AgreementFactory | $agreementFactory | |
\Magento\Paypal\Model\ConfigFactory | $configFactory | |
array | $methodCodes | |
Definition at line 67 of file Data.php.
74 $this->_paymentData = $paymentData;
75 $this->_agreementFactory = $agreementFactory;
76 $this->methodCodes = $methodCodes;
78 parent::__construct($context);
◆ getBillingAgreementMethods()
getBillingAgreementMethods |
( |
|
$store = null , |
|
|
|
$quote = null |
|
) |
| |
Retrieve available billing agreement methods
- Parameters
-
null | string | bool | int | \Magento\Store\Model\Store | $store | |
\Magento\Quote\Model\Quote | null | $quote | |
- Returns
- BillingAgreementMethodInterface[]
Definition at line 108 of file Data.php.
110 $activeMethods = array_map(
111 function (PaymentMethodInterface
$method) {
112 return $this->getPaymentMethodInstanceFactory()->create(
$method);
getPaymentMethodList($sorted=true, $asLabelValue=false, $withGroups=false, $store=null)
◆ shouldAskToCreateBillingAgreement()
Check whether customer should be asked confirmation whether to sign a billing agreement
- Parameters
-
\Magento\Paypal\Model\Config | $config | |
int | $customerId | |
- Returns
- bool
Definition at line 88 of file Data.php.
90 if (
null === self::$_shouldAskToCreateBillingAgreement) {
91 self::$_shouldAskToCreateBillingAgreement =
false;
93 if ($this->_agreementFactory->create()->needToCreateForCustomer(
$customerId)) {
94 self::$_shouldAskToCreateBillingAgreement =
true;
98 return self::$_shouldAskToCreateBillingAgreement;
◆ $_agreementFactory
◆ $_paymentData
◆ $_shouldAskToCreateBillingAgreement
$_shouldAskToCreateBillingAgreement = null |
|
staticprotected |
◆ HTML_TRANSACTION_ID
const HTML_TRANSACTION_ID |
Initial value:=
'<a target="_blank" href="https://www%1$s.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=%2$s">%2$s</a>'
Definition at line 20 of file Data.php.
The documentation for this class was generated from the following file:
- vendor/magento/module-paypal/Helper/Data.php