diff --git a/Block/Paypal/ExpressButtonV2.php b/Block/Paypal/ExpressButtonV2.php index 0bfb029b..f74656f9 100644 --- a/Block/Paypal/ExpressButtonV2.php +++ b/Block/Paypal/ExpressButtonV2.php @@ -209,7 +209,7 @@ protected function getClientId() */ public function getJavascriptUrl() { - $sUrl = "https://www.paypal.com/sdk/js?client-id=".$this->getClientId()."&merchant-id=".$this->getMerchantId()."¤cy=".$this->getCurrency()."&intent=".$this->getIntent()."&locale=".$this->getLocale()."&commit=true&vault=false&disable-funding=card,sepa,bancontact"; + $sUrl = "https://www.paypal.com/sdk/js?client-id=".$this->getClientId()."&merchant-id=".$this->getMerchantId()."¤cy=".$this->getCurrency()."&intent=".$this->getIntent()."&locale=".$this->getLocale()."&commit=false&vault=false&disable-funding=card,sepa,bancontact"; if ($this->showBNPLButton() === true) { $sUrl .= "&enable-funding=paylater"; } diff --git a/Model/Api/Request/Genericpayment/PayPalExpress.php b/Model/Api/Request/Genericpayment/PayPalExpress.php index 2094ba63..d858d2f6 100644 --- a/Model/Api/Request/Genericpayment/PayPalExpress.php +++ b/Model/Api/Request/Genericpayment/PayPalExpress.php @@ -97,10 +97,10 @@ public function sendRequest(Quote $oQuote, PayoneMethod $oPayment, $sWorkorderId if ($oPayment instanceof PaypalV2) { $this->addParameter('add_paydata[payment_action]', $oPayment->getAuthorizationMode() == PayoneConfig::REQUEST_TYPE_AUTHORIZATION ? 'Capture' : 'Authorize'); # Is either Capture (for Authorization call) or Authorize (for preauthorization call) } - } - if ($this->apiHelper->isInvoiceDataNeeded($oPayment)) { - $this->invoiceGenerator->addProductInfo($this, $oQuote); + if ($this->apiHelper->isInvoiceDataNeeded($oPayment)) { + $this->invoiceGenerator->addProductInfo($this, $oQuote); + } } $this->addRedirectUrls($oPayment); diff --git a/Model/Methods/PaypalV2.php b/Model/Methods/PaypalV2.php index b05070dd..0f487337 100644 --- a/Model/Methods/PaypalV2.php +++ b/Model/Methods/PaypalV2.php @@ -63,6 +63,14 @@ class PaypalV2 extends PayoneMethod */ protected $blNeedsRedirectUrls = true; + /** + * Determines if the invoice information has to be added + * to the authorization-request + * + * @var bool + */ + protected $blNeedsProductInfo = true; + /** * Return success url for redirect payment types *