Class ExpressConfigProvider @SuppressWarnings(PHPMD.CouplingBetweenObjects)
Definition at line 19 of file ExpressConfigProvider.php.
◆ __construct()
Constructor
- Parameters
-
ConfigFactory | $configFactory | |
ResolverInterface | $localeResolver | |
CurrentCustomer | $currentCustomer | |
PaypalHelper | $paypalHelper | |
PaymentHelper | $paymentHelper | |
UrlInterface | $urlBuilder | |
Definition at line 78 of file ExpressConfigProvider.php.
93 foreach ($this->methodCodes as
$code) {
94 $this->methods[
$code] = $this->paymentHelper->getMethodInstance(
$code);
◆ getBillingAgreementCode()
getBillingAgreementCode |
( |
|
$code | ) |
|
|
protected |
Return billing agreement code for method
- Parameters
-
- Returns
- null|string
Definition at line 175 of file ExpressConfigProvider.php.
177 $customerId = $this->currentCustomer->getCustomerId();
178 $this->config->setMethod(
$code);
179 return $this->paypalHelper->shouldAskToCreateBillingAgreement($this->config,
$customerId)
const PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT
◆ getConfig()
{Retrieve assoc array of checkout configuration
- Returns
- array
}
Implements ConfigProviderInterface.
Definition at line 101 of file ExpressConfigProvider.php.
103 $locale = $this->localeResolver->getLocale();
108 'paymentAcceptanceMarkHref' => $this->config->getPaymentMarkWhatIsPaypalUrl(
109 $this->localeResolver
111 'paymentAcceptanceMarkSrc' => $this->config->getPaymentMarkImageUrl(
114 'isContextCheckout' =>
false,
115 'inContextConfig' => []
122 $config[
'payment'][
'paypalExpress'][
'isContextCheckout'] = $isInContext;
123 $config[
'payment'][
'paypalExpress'][
'inContextConfig'] = [
125 'merchantId' => $this->config->getValue(
'merchant_id'),
126 'path' => $this->urlBuilder->getUrl(
'paypal/express/gettoken', [
'_secure' =>
true]),
128 'environment' => ((int) $this->config->getValue(
'sandbox_flag') ?
'sandbox' :
'production'),
131 self::IN_CONTEXT_BUTTON_ID
137 foreach ($this->methodCodes as
$code) {
138 if ($this->methods[
$code]->isAvailable()) {
140 $config[
'payment'][
'paypalExpress'][
'billingAgreementCode'][
$code] =
getMethodRedirectUrl($code)
getBillingAgreementCode($code)
const IN_CONTEXT_BUTTON_ID
◆ getMethodRedirectUrl()
getMethodRedirectUrl |
( |
|
$code | ) |
|
|
protected |
Return redirect URL for method
- Parameters
-
- Returns
- mixed
Definition at line 164 of file ExpressConfigProvider.php.
166 return $this->methods[
$code]->getCheckoutRedirectUrl();
◆ isInContextCheckout()
◆ $config
◆ $currentCustomer
◆ $localeResolver
◆ $methodCodes
◆ $methods
◆ $paymentHelper
◆ $paypalHelper
◆ $urlBuilder
◆ IN_CONTEXT_BUTTON_ID
const IN_CONTEXT_BUTTON_ID = 'paypal-express-in-context-button' |
The documentation for this class was generated from the following file: