Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAG2-327 - Changed SDK URL parameter, always send invoice list for PP… #570

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Block/Paypal/ExpressButtonV2.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()."&currency=".$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()."&currency=".$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";
}
Expand Down
6 changes: 3 additions & 3 deletions Model/Api/Request/Genericpayment/PayPalExpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 8 additions & 0 deletions Model/Methods/PaypalV2.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
Loading