craigchristenson / opencart-2checkout-api

2Checkout Payment API OpenCart Payment Module
MIT License
9 stars 19 forks source link

Opencart 3+ #15

Open f1r3w411 opened 6 years ago

f1r3w411 commented 6 years ago

Hi. Just wondering if you have plans to update module for Opencart 3+?

Khaleel commented 4 years ago

I have downloaded this module and I think I have managed to get it to work for 3.0.2

1 - Open the file:

catalog/controller/extension/payment/twocheckout_api.php

Find the line

$this->load->library('twocheckout');

And replace with

$this->load->library('twocheckout');

Khaleel commented 4 years ago

Why was this so arrogantly closed? Are you another Daniel ker? Arrogant?

I am getting another error now in OpenCart 3.0.2:

<br />
<b>Fatal error</b>:  Uncaught Error: Class 'Twocheckout' not found in /home/public_html/catalog/controller/extension/payment/twocheckout_api.php:78
Stack trace:
#0 /home/private_html/storage/modification/system/engine/action.php(79): ControllerExtensionPaymentTwoCheckoutApi-&gt;send()
#1 /home/public_html/catalog/controller/startup/router.php(25): Action-&gt;execute(Object(Registry))
#2 /home/private_html/storage/modification/system/engine/action.php(79): ControllerStartupRouter-&gt;index()
#3 /home/public_html/system/engine/router.php(67): Action-&gt;execute(Object(Registry))
#4 /home/public_html/system/engine/router.php(56): Router-&gt;execute(Object(Action))
#5 /home/public_html/system/framework.php(168): Router-&gt;dispatch(Object(Action), Object(Action))
#6 /home/353951.cloudwaysapps.com/ekhugea in <b>/home/public_html/catalog/controller/extension/payment/twocheckout_api.php</b> on line <b>78</b><br />

That line 78 is:

$charge = Twocheckout::auth( $this->config->get('payment_twocheckout_api_account'), $this->config->get('payment_twocheckout_api_private_key'), $sandbox, $params );

f1r3w411 commented 4 years ago

So sorry about it. I've closed this issue accidentally. Unfortunately, I've stopped using Opencart and moved to another platform. Nevertheless, I appreciate your help and this info could be useful for the other users.

Khaleel commented 4 years ago

Thanks. I think if you can provide a solution for this:

$this->load->library('twocheckout'); I am trying this at the moment:

include(DIR_SYSTEM . 'library/twocheckout/TwocheckoutApi.php'); But still get an error.

f1r3w411 commented 4 years ago

I'm not a developer. Just used this module some time ago. Currently, I'm not using it and moved to another platform. Please contact a developer and ask him to apply a solution: @craigchristenson