93 foreach ($this->methodCodes as
$code) {
94 $this->methods[
$code] = $this->paymentHelper->getMethodInstance(
$code);
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] =
155 return (
bool)(int) $this->config->getValue(
'in_context');
166 return $this->methods[
$code]->getCheckoutRedirectUrl();
177 $customerId = $this->currentCustomer->getCustomerId();
178 $this->config->setMethod(
$code);
179 return $this->paypalHelper->shouldAskToCreateBillingAgreement($this->config,
$customerId)
getMethodRedirectUrl($code)
getBillingAgreementCode($code)
const IN_CONTEXT_BUTTON_ID
__construct(ConfigFactory $configFactory, ResolverInterface $localeResolver, CurrentCustomer $currentCustomer, PaypalHelper $paypalHelper, PaymentHelper $paymentHelper, UrlInterface $urlBuilder)
const METHOD_WPP_PE_EXPRESS
const PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT