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

undefined method `delete_customer' for PinPayment::Customer:Class #15

Open
nadunperera opened this issue May 3, 2017 · 5 comments
Open

Comments

@nadunperera
Copy link

Hi Daniel,

First of all thank you so much for this gem. This is an absolute help for the project I am working on.

I encounter below error,

undefined method `delete_customer' for PinPayment::Customer:Class

when I try to delete a customer using the PinPayment::Customer.delete_customer(cus_token)

Any help on this much appriciated.

Thank you.

@buntine
Copy link

buntine commented May 3, 2017

It looks like the customer_delete class method was added in 70322dc but was never pushed to RubyGems.

You can either wait for Tigris to push the changes to RubyGems or build the gem locally from the github repo.

@nadunperera
Copy link
Author

Thank you for the reply buntine. Ok I think I will build a gem locally from github repo.

Thanks again 👍

@nadunperera
Copy link
Author

nadunperera commented May 3, 2017

Hi @buntine now I am using the gem directly from the git repo. Delete works but it throws an exception saying no implicit conversion of nil into String on PinPayment::Customer.delete_customer(cus_token)

But it still deletes the customer successfully from Pin Payments which is greay. I can just ignore the exception and work for now.

Do you know what may be causing the issue? Sorry for the questions, as I have started learning ruby/rails 2 weeks ago.

Thank you.

@buntine
Copy link

buntine commented May 3, 2017

Its it possible that cus_token is nil in your code and not a string?

@nadunperera
Copy link
Author

But I am able to delete the customer using the PinPayment::Customer.delete_customer(cus_token)

It works even though it throws that implicit conversion error.

Which means cus_token is not nil. I have done another test by hardcoding the cus token like below.

PinPayment::Customer.delete_customer('cus_mgnJWu8UhyMcDG3nbZ4f2w')

I am able to delete the specific customer, but it throws that exception.

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