Post by Milton » Wed Sep 15, 2010 6:33 pm

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
Last edited by i2Paq on Thu Sep 16, 2010 12:42 am, edited 1 time in total.
Reason: Topic moved

Newbie

Posts

Joined
Wed Sep 15, 2010 6:22 pm

Post by Miguelito » Wed Sep 15, 2010 7:20 pm

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."


Active Member

Posts

Joined
Sun Jan 10, 2010 10:11 pm

Post by Qphoria » Wed Sep 15, 2010 7:28 pm

That code for commweb looks like a copy paste from paypal. I've worked with commweb and that does not look like their API

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Milton » Fri Sep 17, 2010 5:50 am

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

Newbie

Posts

Joined
Wed Sep 15, 2010 6:22 pm
Who is online

Users browsing this forum: No registered users and 6 guests