Page 1 of 1
Error when selecting custom payment method in checkout
Posted: Thu Oct 13, 2016 3:02 pm
by darth_danny
Hi,
I created a custom payment method which I successfully installed and configured in the admin end. When I was testing a purchase and reached the Payment Method section of the checkout, the following errors are displayed.
Warning: Invalid argument supplied for foreach() in localhost/test.opencart/system/storage/modification/system/engine/loader.php on line 53Notice: Undefined property: Proxy::getMethod in localhost/test.opencart/catalog/controller/checkout/payment_method.php on line 53
I am not sure which part of my code could be causing the error.
Uploaded is the source I used.
Re: Error when selecting custom payment method in checkout
Posted: Thu Oct 13, 2016 4:00 pm
by OSWorX
darth_danny wrote:I am not sure which part of my code could be causing the error.
And we are not sure which code part you mean without knowing the code.
Re: Error when selecting custom payment method in checkout
Posted: Thu Oct 13, 2016 4:22 pm
by darth_danny
Updated original. Added source code used
Re: Error when selecting custom payment method in checkout
Posted: Thu Oct 13, 2016 5:16 pm
by OSWorX
Cannot see an error.
Which shopversion is used?
Re: Error when selecting custom payment method in checkout
Posted: Thu Oct 13, 2016 5:39 pm
by darth_danny
Opencart 2.3.0.2
Re: Error when selecting custom payment method in checkout
Posted: Thu Oct 13, 2016 6:00 pm
by OSWorX
darth_danny wrote:Opencart 2.3.0.2
Then it is wrong, the path has changed to extension.
Re: Error when selecting custom payment method in checkout
Posted: Thu Oct 13, 2016 6:07 pm
by darth_danny
Could u be abit more specific. When updating from from 2.2.0.0 to 2.3.0.2 had made the adjustments to the extension/payment ... Don't see which path I could have left out
Re: Error when selecting custom payment method in checkout
Posted: Thu Oct 13, 2016 6:14 pm
by OSWorX
darth_danny wrote:Could u be abit more specific. When updating from from 2.2.0.0 to 2.3.0.2 had made the adjustments to the extension/payment ... Don't see which path I could have left out
Sorry, but you are creating a payment module, one of the most sensible parts of a shop.
Then you should know what you are doing, or hire one who knows the job.
For example, you are using:
Code: Select all
class ModelPaymentCustomPayment extends Model {
but only that part should be
Code: Select all
class ModelExtensionPaymentCustomPayment extends Model {
I recommend you check your 'custom' mod again and check the differences between 2.2.x and 2.3.x