Page 1 of 1

Installing Payments gives error

Posted: Thu Jun 08, 2017 1:26 am
by kilmasz
Version:
OpenCart 2.3.0.2

Hi there,
After uploading my extension:
https://github.com/dotpay/OpenCart/releases/tag/v2.3.2

Choosing the extension type "PAYMENTS" and pressing install i recive:

Code: Select all

  Fatal error: Uncaught exception 'Exception' with message 'Error: Table 'xxx_itw.oc_dotpay_on_cards' doesn't exist<br />Error No: 1146<br /> SELECT oc.*, us.firstname, us.lastname, us.email FROM `oc_dotpay_on_cards` oc JOIN `oc_user` us ON customer_id = user_id WHERE card_id IS NOT NULL ' in /home/xxx/domains/yyy.pl/public_html/sklep/system/library/db/mysqli.php:40 Stack trace: #0 /home/xxx/domains/yyy.pl/public_html/sklep/system/library/db.php(16): DB\MySQLi->query('\n SE...', Array) #1 /home/xxx/domains/yyy.pl/public_html/sklep/admin/model/payment/dotpay_oc.php(62): DB->query('\n SE...') #2 [internal function]: ModelPaymentDotpayOc->getAllCards() #3 /home/xxx/domains/yyy.pl/public_html/sklep/system/storage/modification/system/engine/loader.php(178): call_user_func_array(Array, Array) #4 [internal function]: Loader->{closure}(Array, Array) #5 /home/xxx/domains/yyy.pl/ in /home/xxx/domains/yyy.pl/public_html/sklep/system/library/db/mysqli.php on line 40
And after trying to edit the plugin:

Code: Select all

Fatal error: Uncaught exception 'Exception' with message 'Error: Table 'xxx_itw.oc_dotpay_on_cards' doesn't exist<br />Error No: 1146<br /> SELECT oc.*, us.firstname, us.lastname, us.email FROM `oc_dotpay_on_cards` oc JOIN `oc_user` us ON customer_id = user_id WHERE card_id IS NOT NULL ' in /home/xxx/domains/yyy.pl/public_html/sklep/system/library/db/mysqli.php:40 Stack trace: #0 /home/xxx/domains/yyy.pl/public_html/sklep/system/library/db.php(16): DB\MySQLi->query('\n SE...', Array) #1 /home/xxx/domains/yyy.pl/public_html/sklep/admin/model/extension/payment/dotpay_oc.php(62): DB->query('\n SE...') #2 [internal function]: ModelExtensionPaymentDotpayOc->getAllCards() #3 /home/xxx/domains/yyy.pl/public_html/sklep/system/storage/modification/system/engine/loader.php(178): call_user_func_array(Array, Array) #4 [internal function]: Loader->{closure}(Array, Array) #5 /home/xxx/domai in /home/xxx/domains/yyy.pl/public_html/sklep/system/library/db/mysqli.php on line 40
Also after some bruteforce installation try while completing order i recive:

Code: Select all

Fatal error: Uncaught exception 'Exception' with message 'Error: Could not load model payment!' in /home/xxx/domains/yyy.pl/public_html/sklep/system/storage/modification/system/engine/loader.php:169 Stack trace: #0 [internal function]: Loader->{closure}(Array, Array) #1 /home/xxx/domains/yyy.pl/public_html/sklep/system/engine/proxy.php(25): call_user_func_array(Object(Closure), Array) #2 /home/xxx/domains/yyy.pl/public_html/sklep/catalog/controller/checkout/payment_method.php(53): Proxy->__call('getMethod', Array) #3 /home/xxx/domains/yyy.pl/public_html/sklep/catalog/controller/checkout/payment_method.php(53): Proxy->getMethod(Array, 155) #4 [internal function]: ControllerCheckoutPaymentMethod->index() #5 /home/xxx/domains/yyy.pl/public_html/sklep/system/storage/modification/system/engine/action.php(51): call_user_func_array(Array, Array) #6 /home/xxx/domains/yyy.pl/public_html/sklep/catalog/controller/startup/router.php(25): Action->execute(Object(Re in /home/xxx/domains/yyy.pl/public_html/sklep/system/storage/modification/system/engine/loader.php on line 169
Any ideas what is wrong?

Regards,
Peter

Re: Installing Payments gives error

Posted: Thu Jun 08, 2017 11:48 pm
by IP_CAM
you should probably better mention your problem here:
https://github.com/dotpay/OpenCart/issues
because I assume, it's related with the DB-addressing, this Mod uses an 'unknown' (to me!)
.DB_PREFIX.self::
but in other places in the same Mod, the common:
. DB_PREFIX .
is used, and I can find no 'example-reference' anywhere, related to OC, when it comes to this
self:: after the Prefix, so, you better check, if the Mod-related DB-Table(s) and Sections
exist, by 'following' the regular OC Prefix-Scheme, in order to be found and 'handled' in order.
Just a wild guess from a db-blind duck! :D
Ernie