Jump to content

Code to update cart to orders table


JoelWebsites

Recommended Posts

I have a ebs payment module it has this code it seems that there must be some input parameters

 

 

 

 

 

if($response['ResponseCode'] == 0){
$status_code = "Ok";
if($response['IsFlagged'] == "NO" && $response['Amount'] == $amount){
$status = Configuration::get('EBS_ID_ORDER_SUCCESS');
$message= "Transaction Successful";
}
else{
$status = Configuration::get('EBS_ID_ORDER_PENDING');
$responseMsg .= ". The payment has been kept on hold until the manual verification is completed and authorized by EBS";
$message = "Transaction Successful";
}
}
else{
$status_code = "Failed";
$status = Configuration::get('EBS_ID_ORDER_FAILED');
$message = "Transaction Failed, Retry!!";
}
 
$history_message = $responseMsg.'. EBS Payment ID: '.$response['PaymentID'];
$ebs = new EBS();
 
$ebs->validateOrder(intval($cart->id), $status, $response['Amount'], $ebs->displayName, $history_message, $extras, '', false, $cart->secure_key);
$this->context->smarty->assign(array(
'status' => $status_code,
'responseMsg' => $message,
'this_path' => $this->module->getPathUri(),
'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->module->name.'/'
));
 
$this->setTemplate('payment_response.tpl');
 
}
}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...