Merge branch 'develop' of gitlab.antadis.net:dev-antadis/bebeboutik into develop

This commit is contained in:
Nolwenn J 2017-11-15 12:10:48 +01:00
commit e0931e1d6b

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);
}