Merge branch 'feature/api_return_url_paypal' into develop

This commit is contained in:
Marion Muszynski 2017-11-15 11:44:31 +01:00
commit fde48c205b

View File

@ -578,7 +578,7 @@ class PaypalExpressCheckout extends Paypal
return false;
}
public function redirectToAPI()
public function redirectToAPI($return_url = false)
{
$this->secure_key = $this->getSecureKey();
$this->_storeCookieInfo();
@ -588,7 +588,12 @@ class PaypalExpressCheckout extends Paypal
else
$url = '/websc&cmd=_express-checkout';
Tools::redirectLink('https://'.$this->getPayPalURL().$url.'&token='.urldecode($this->token));
$paypal_url = 'https://'.$this->getPayPalURL().$url.'&token='.urldecode($this->token);
if ($return_url !== false) {
return $paypal_url;
} else {
Tools::redirectLink($paypal_url);
}
exit(0);
}