Avactis 2.1.1 :Fix for Paypal Pro Express Checkout

From AVACTIS : Ecommerce Shopping Cart Software Wiki
Jump to: navigation, search

To get the paypal pro express checkout working, you need to make a change in avactis-system/modules/checkout/views/checkout-view-cz.php

The following change is to be done (around line 147):

//========Code below=====

if($step_id == 3)
{
$payment_module_id = modApiFunc("Checkout", "getChosenPaymentModuleIdCZ");
$prerequisite_name = Checkout::getAdditionalPrerequisiteName("creditCardInfo", $payment_module_id);
$PrerequisitesValidationResults = modApiFunc("Checkout", "getPrerequisitesValidationResults");
if(isset($PrerequisitesValidationResults[$prerequisite_name])
&& $PrerequisitesValidationResults[$prerequisite_name]["isMet"] != true)
{
   if ($prerequisite_name == "creditCardInfoAC593800_68BA_A4D3_6A14_49BA5022FED7" && //line to be added
   isset($PrerequisitesValidationResults['billingInfo']['variant_tag']) && //line to be added
   $PrerequisitesValidationResults['billingInfo']['variant_tag'] == "PayPalProExpressCheckout") { //line to  
   be added
} else { //line to be added
//End of change
$request = new Request();
$request->setView('CheckoutView');
$request->setAction("SetCurrStep");
$request->setKey ( 'step_id', 2);
$request = modApiFunc("Checkout", "appendCheckoutCZGETParameters", $request);
modApiFunc("Checkout", "saveState");
$application->redirect($request);
return ;
   } //Line to be added
}
}