Skip to content

Commit b770820

Browse files
authored
Merge pull request #570 from FatchipRobert/MAG2-327-Paypal-SDK-Parameter
MAG2-327 - Changed SDK URL parameter, always send invoice list for PP…
2 parents ace90e7 + dde72fc commit b770820

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

Block/Paypal/ExpressButtonV2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ protected function getClientId()
209209
*/
210210
public function getJavascriptUrl()
211211
{
212-
$sUrl = "https://www.paypal.com/sdk/js?client-id=".$this->getClientId()."&merchant-id=".$this->getMerchantId()."&currency=".$this->getCurrency()."&intent=".$this->getIntent()."&locale=".$this->getLocale()."&commit=true&vault=false&disable-funding=card,sepa,bancontact";
212+
$sUrl = "https://www.paypal.com/sdk/js?client-id=".$this->getClientId()."&merchant-id=".$this->getMerchantId()."&currency=".$this->getCurrency()."&intent=".$this->getIntent()."&locale=".$this->getLocale()."&commit=false&vault=false&disable-funding=card,sepa,bancontact";
213213
if ($this->showBNPLButton() === true) {
214214
$sUrl .= "&enable-funding=paylater";
215215
}

Model/Api/Request/Genericpayment/PayPalExpress.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ public function sendRequest(Quote $oQuote, PayoneMethod $oPayment, $sWorkorderId
9797
if ($oPayment instanceof PaypalV2) {
9898
$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)
9999
}
100-
}
101100

102-
if ($this->apiHelper->isInvoiceDataNeeded($oPayment)) {
103-
$this->invoiceGenerator->addProductInfo($this, $oQuote);
101+
if ($this->apiHelper->isInvoiceDataNeeded($oPayment)) {
102+
$this->invoiceGenerator->addProductInfo($this, $oQuote);
103+
}
104104
}
105105

106106
$this->addRedirectUrls($oPayment);

Model/Methods/PaypalV2.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ class PaypalV2 extends PayoneMethod
6363
*/
6464
protected $blNeedsRedirectUrls = true;
6565

66+
/**
67+
* Determines if the invoice information has to be added
68+
* to the authorization-request
69+
*
70+
* @var bool
71+
*/
72+
protected $blNeedsProductInfo = true;
73+
6674
/**
6775
* Return success url for redirect payment types
6876
*

0 commit comments

Comments
 (0)