Page 1 of 2

Smoovpay for Opencart 3.0.2

Posted: Tue Nov 14, 2017 2:19 pm
by jaychoo
Hi,

I would like to know if smoovpay payment gateway supports Opencart 3.0.2

Would appreciate if anyone share the integration.

Re: Smoovpay for Opencart 3.0.2

Posted: Tue Nov 14, 2017 9:29 pm
by straightlight
According to this page article: https://www.opencart.com/index.php?rout ... h=smoovpay , the latest version is: v2.3.0.2 . However, it can be easily converted to the latest version of Opencart.

Re: Smoovpay for Opencart 3.0.2

Posted: Tue Nov 14, 2017 9:53 pm
by kestas
jaychoo wrote:
Tue Nov 14, 2017 2:19 pm
Hi,

I would like to know if smoovpay payment gateway supports Opencart 3.0.2

Would appreciate if anyone share the integration.
Hi,
You need ask developer of the extension for upgrading. Or make it by yourself.

Re: Smoovpay for Opencart 3.0.2

Posted: Wed Nov 15, 2017 12:09 am
by straightlight
Updated for v3.x releases.

Re: Smoovpay for Opencart 3.0.2

Posted: Wed Nov 15, 2017 9:44 am
by jaychoo
Hi straightlight,

thanks for the smoovpay plugins. I have just installed and awaiting my sandbox testing.

Re: Smoovpay for Opencart 3.0.2

Posted: Wed Nov 15, 2017 11:51 pm
by jaychoo
Hi,

Smoovpay was integrated and tested on sandbox.

When i do a test checkout, i will redirected to smoovpay to make payment. After payment was successful, i click a return page in the smoovpay to go back to success checkout page of my webpage.

Realised that the order become missing order. This only happen with cc payment.

Re: Smoovpay for Opencart 3.0.2

Posted: Thu Nov 16, 2017 1:18 am
by straightlight

Re: Smoovpay for Opencart 3.0.2

Posted: Fri Nov 17, 2017 3:25 pm
by jaychoo
Doesnt work. still appearing as missing order.

Re: Smoovpay for Opencart 3.0.2

Posted: Fri Nov 17, 2017 8:23 pm
by straightlight
Enable the debug mode in the admin payments module page for smoovpay and redo a transaction. Once the checkout process is done, check in your admin - > system - > maintenance - > error logs page for recent lines starting with:

Code: Select all

SMOOVPAY :: 

Re: Smoovpay for Opencart 3.0.2

Posted: Mon Nov 20, 2017 9:36 am
by jaychoo
there is no error on the smoovpay

Re: Smoovpay for Opencart 3.0.2

Posted: Mon Nov 20, 2017 9:41 am
by straightlight
Clear all caches from the Opencart admin and also your browser's cache. Close browser, reopen and try again with an order by leaving the debug mode on.

Re: Smoovpay for Opencart 3.0.2

Posted: Mon Nov 20, 2017 10:35 am
by straightlight
I added some debug reports in the catalog/controller/extension/payment/smoovpay.php file. Replace the attached file and test an order again noticing if new logs will appear in the admin - > system - > maintenance - > error logs page beginning with: 'SMOOVPAY ::' .

Re: Smoovpay for Opencart 3.0.2

Posted: Mon Nov 20, 2017 2:11 pm
by jaychoo
clear cache in browser, systems/logs, and admin > maintenance > logs.

there is no error shown in the admin portal (admin > maintenance > logs.)

May I know where I can change the missing orders status to pending? so that missing orders will be pending

Re: Smoovpay for Opencart 3.0.2

Posted: Mon Nov 20, 2017 3:21 pm
by jaychoo
Seems that smoovpay extension is not updating the order status.

Re: Smoovpay for Opencart 3.0.2

Posted: Mon Nov 20, 2017 10:57 pm
by straightlight
Let's do some troubleshooting. In your admin/controller/extension/payment/smoovpay.php file,

find:

Code: Select all

$this->session->data['success'] = $this->language->get('text_success');
add above:

Code: Select all

echo "<pre />\n";
print_r($this->request->post);
echo "</pre>\n";

exit;
Then, resave changes in the admin-end for Smoovpay and submit the array that you see on screen (without API credentials).

Re: Smoovpay for Opencart 3.0.2

Posted: Tue Nov 21, 2017 3:31 pm
by jaychoo
Below is the information I got.

Array
(
[payment_smoovpay_email] => testingaccount@gmail.com
[payment_smoovpay_secret] => 631cb6573f0294f902a563f2ee20d40c
[payment_smoovpay_convert] => sgd
[payment_smoovpay_test] => 1
[payment_smoovpay_debug] => 1
[payment_smoovpay_transaction] => pay
[payment_smoovpay_total] =>
[payment_smoovpay_sort_order] => 1
[payment_smoovpay_geo_zone_id] => 0
[payment_smoovpay_status] => 1
[payment_smoovpay_approved_status_id] => 1
[payment_smoovpay_declined_status_id] => 8
[payment_smoovpay_error_status_id] => 10
)

I realised that the status is not updating as well as I have test it on the live smoovpay.
Figuring out why it is not updating after successfully payment.

Re: Smoovpay for Opencart 3.0.2

Posted: Tue Nov 21, 2017 10:30 pm
by straightlight
There are no issues with this array. Each keys are equally assigned as the catalog-end are being used for.

Re: Smoovpay for Opencart 3.0.2

Posted: Wed Nov 22, 2017 9:16 am
by jaychoo
hmmm.... the smoovpay plugin that you provided me is missing the updating of the order status?

Re: Smoovpay for Opencart 3.0.2

Posted: Wed Nov 22, 2017 9:25 am
by straightlight
Let's troubleshoot this issue. In catalog/controller/extension/payment/smoovpay.php file,

find:

Code: Select all

$this->model_checkout_order->addOrderHistory($order_id, $order_status_id);
add above:

Code: Select all

if (!empty($response_code)) {
    $this->log->write('SMOOVPAY :: RESPONSE CODE: ' . $response_code);
    
    $this->log->write('SMOOVPAY :: POST: ' . print_r($this->request->post, true));
}
Try another order. Then, go to your admin - > system - > maintenance - > error logs noticing the: SMOOVPAY :: prefixes for your latest created order.

Re: Smoovpay for Opencart 3.0.2

Posted: Mon Nov 27, 2017 10:48 am
by jaychoo
Hi,

this is the only error i saw.

2017-11-22 2:58:49 - PHP Warning: fopen(/var/www/storage/cache/cache.currency.1511323129): failed to open stream: No such file or directory in /var/www/html/store/system/library/cache/file.php on line 49
2017-11-22 2:58:49 - PHP Warning: flock() expects parameter 1 to be resource, boolean given in /var/www/html/store/system/library/cache/file.php on line 51
2017-11-22 2:58:49 - PHP Warning: fwrite() expects parameter 1 to be resource, boolean given in /var/www/html/store/system/library/cache/file.php on line 53
2017-11-22 2:58:49 - PHP Warning: fflush() expects parameter 1 to be resource, boolean given in /var/www/html/store/system/library/cache/file.php on line 55
2017-11-22 2:58:49 - PHP Warning: flock() expects parameter 1 to be resource, boolean given in /var/www/html/store/system/library/cache/file.php on line 57
2017-11-22 2:58:49 - PHP Warning: fclose() expects parameter 1 to be resource, boolean given in /var/www/html/store/system/library/cache/file.php on line 59