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

Error Reason #120

Open
mahhek opened this issue Oct 20, 2015 · 0 comments
Open

Error Reason #120

mahhek opened this issue Oct 20, 2015 · 0 comments

Comments

@mahhek
Copy link

mahhek commented Oct 20, 2015

How to see Error reason, when calling charge method.

I get following error.

ActiveResource::ResourceInvalid: Failed with 422 status code 422

when I do this

Chargify::Subscription.find(current_user.chargify_subscription_id).charge(:amount_in_cents => 10, :memo => 'Dry Cleaning Service')

I need to see what was the reason that charge is rejected, I know the code is saying some kind a error, but I need to know the reason, for example. credit card is inactive, credit card is invalid, credit card is blocked or any other message, but I need to know the reason instead of code.

As 422 code have multiple reasons. thanks.

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

1 participant