apply the same confirmation order page to all type of paypal paiements

This commit is contained in:
Rodney Figaro 2016-08-24 17:24:41 +02:00
parent f91db79159
commit 33c5572c08
2 changed files with 22 additions and 6 deletions

View File

@ -40,9 +40,27 @@ $paypal_key = Tools::getValue('key');
if ($id_cart && $id_order && $id_module && $paypal_key)
{
// PRESTASHOP VERSION
/*
if (version_compare(_PS_VERSION_, '1.5', '<'))
new PayPalExpressCheckoutSubmit();
new PayPalExpressCheckoutSubmit();
return;
*/
// PRESTASHOP VERSION END
// @ANTADIS : redirect to bebeboutik specific order-confirmation page
$paypal = new PayPal();
$cart = $paypal->context->cart;
$order = new Order((int)$id_order);
$redirect_after_payment = $paypal->context->link->getPageLink('order-confirmation.php')
.'?id_cart='.$cart->id
.'&key='.$order->secure_key
.'&id_module='.$paypal->id;
Tools::redirectLink($redirect_after_payment);
exit;
// @ANTADIS END
}
$request_type = Tools::getValue('express_checkout');

View File

@ -3,11 +3,9 @@
class OrderConfirmationController extends OrderConfirmationControllerCore {
public function preProcess() {
// Fix delay after Paymeny Paybox for create Order
$this->id_module = (int)(Tools::getValue('id_module', 0));
if($this->id_module == 94) {
sleep(5);
}
// Fix : delay after payment from paybox or paypal
// so that the order has enough time to be created.
sleep(5);
parent::preProcess();