Hi
My Paypal payments are updating the order status to "processing", however my commweb payments are coming back with a status of zero. I would like them to also come back with a 'processing' status.
I am looking at the following code in commweb.php:
if (strcmp($response, 'VERIFIED') == 0 || $this->request->post['payment_status'] == 'Completed') {
$this->model_checkout_order->confirm($order_id, $this->config->get('commweb_order_status_id'));
} else {
$this->model_checkout_order->confirm($order_id, $this->config->get('config_order_status_id'));
}
I assume that this is where the order_status_id is set so that it can be updated? If so, where are is the actual order_status_id set? both for 'commweb_order_status_id' and 'config_order_status_id' as I cannot find them anywhere in the code when I search the entire project?
Thank-you
Your commweb admin controller file has that commweb_order_status_id defined. It's usually a drop-down box where you can select the order status in which the order goes when the payment has been completed succesfully. The actual value you have selected can be found from database table setting.
The Finnish OpenCart Forum
"Real programmers don't document. If it was hard to write, it should be hard to understand."
Thank you, I found the table 'Setting' in the database, and found the value for the order_status_id.
The commweb payment is being deposited in the bank, so this commweb.php must be okay?
However the order_status_id (which in this case has a value of 2) is still not being updated.
In commweb.tpl the form action is:
<form action="PHP_VPC_3Party_DO.php" method="post" id="checkout">
and the return url is:
<input type="hidden" name="vpc_ReturnURL" size="63" value="http://www.....com/PHP_VPC_3Party_DR.php" maxlength="250"/>
Does this mean that the last bit of code in commweb.php in the function callback does not get executed? See below.
public function callback() {
if (extension_loaded('curl')) {
if (!$this->config->get('commweb_test')) {
$ch = curl_init('https://migs.mastercard.com.au/vpcpay');
} else {
$ch = curl_init('https://migs.mastercard.com.au/vpcpay');
}
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($ch);
//DOES THIS NOT GET EXECUTED
?
if (strcmp($response, 'VERIFIED') == 0 || $this->request->post['payment_status'] == 'Completed') {
$this->model_checkout_order->confirm($order_id, $this->config->get('commweb_order_status_id'));
} else {
$this->model_checkout_order->confirm($order_id, $this->config->get('config_order_status_id'));
}
Thanks
The commweb payment is being deposited in the bank, so this commweb.php must be okay?
However the order_status_id (which in this case has a value of 2) is still not being updated.
In commweb.tpl the form action is:
<form action="PHP_VPC_3Party_DO.php" method="post" id="checkout">
and the return url is:
<input type="hidden" name="vpc_ReturnURL" size="63" value="http://www.....com/PHP_VPC_3Party_DR.php" maxlength="250"/>
Does this mean that the last bit of code in commweb.php in the function callback does not get executed? See below.
public function callback() {
if (extension_loaded('curl')) {
if (!$this->config->get('commweb_test')) {
$ch = curl_init('https://migs.mastercard.com.au/vpcpay');
} else {
$ch = curl_init('https://migs.mastercard.com.au/vpcpay');
}
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($ch);
//DOES THIS NOT GET EXECUTED

if (strcmp($response, 'VERIFIED') == 0 || $this->request->post['payment_status'] == 'Completed') {
$this->model_checkout_order->confirm($order_id, $this->config->get('commweb_order_status_id'));
} else {
$this->model_checkout_order->confirm($order_id, $this->config->get('config_order_status_id'));
}
Thanks
Who is online
Users browsing this forum: No registered users and 31 guests