Not sure how to debug this fatal PHP error: Call to a member function createCustomer() on null

65 Views Asked by At

Stripe Error in VS

Hi,

I purchased a Stripe gateway plugin for OpenCart 3.x. The vendor support is not working/responding and I'm stuck trying to figure out why this error is being thrown. I'm new to PHP and it looks like all the variables passed into the function are defined (none are null)..

If I hover my mouse over $this->Stripephp in VS, it shows NULL. Does that mean the Stripe library hasn't loaded properly and the actual error is before this code?

Not sure how to debug from here.

I've tried isolating the variables to make sure they contain values.

1

There are 1 best solutions below

0
K. B. On

If your function is in the same controller file where is your code with error use just

$this->createCustomer($myarraycode);

If the function in corresponding model file you must add route where the function is. Before load that model file. When you asking please paste your code here. Do not use pictures with code.

Load model:

$this->load->model('extension/module/your_module_file');

Than:

$this->model_extension_module_your_module_file->createCustomer($myarraycode);