Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to get property of non-object in remove customer BaseService.php #9

Open
kitro opened this issue Jul 23, 2020 · 2 comments
Open

Comments

@kitro
Copy link

kitro commented Jul 23, 2020

Hi all

Thank you first for this helpful package the make life easier to deal with gocardless.

I just tried to remove a customer using the remove method like this:
$cliene->customers()->remove('CUXXXXXXX')

I got this error
Trying to get property of non-object vendor/gocardless/gocardless-pro/lib/Services/BaseService.php:86 vendor/gocardless/gocardless-pro/lib/Services/BaseService.php(65): GoCardlessPro\\Services\\BaseService->getUnenvelopedBody(NULL) gocardless/gocardless-pro/lib/Services/CustomersService.php(171)

I think the issue is the remove customer request is performed as DELETE, and the response from the api is null but in BaseService.php line 86 it's decoded the response to json but the response here is null.

The package version is "nestednet/gocardless-laravel": "^0.2.0"

Thank you

@zofe
Copy link

zofe commented Nov 19, 2020

up,
me to

@kitro
Copy link
Author

kitro commented Nov 20, 2020

@zofe Since $client->customers()->remove('CUXXXXXXX') It will remove the customer if exist, and because that bug it will be always throw an exception, I catch the whole Exception in try catch clause and continue the process.
I hope this help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants