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

Card registration process : card registration process not initialized #3

Open
gperrudin opened this issue May 3, 2016 · 3 comments

Comments

@gperrudin
Copy link

gperrudin commented May 3, 2016

Hello !

I'm having some problems to register a new credit card.
I follow the process you explain here (https://godoc.org/github.com/gotsunami/mangopay2-go-sdk#MangoPay.NewCardRegistration)

I first perform a Init(), successfully, then the client fill the form and get a token from the external banking service.
Then, I have to call register on the same CardRegistration object, the problem is that I lose it because it's instantiated during the first request (before the form filling). If I create a new CardRegistration object, I get this error : "card registration process not initialized. Did you call Init() first?"

So my question is : how should I keep the CardRegistration object during all the process ?

Thanks in advance

@aboutofpluto
Copy link
Contributor

Hello Guiguillermo,

Thanks for contacting us. Sorry to learn that you have troubles.

I haven't used the API for quite a long time but I'll have a look and try to help you as soon as possible.

Best regards,
Anthony

@gperrudin
Copy link
Author

Ok thank you.

I'm looking forward for your answer.

@aboutofpluto
Copy link
Contributor

Hello Guiguillermo.

It might not be obvious in the documentation, but after you call Init() you must put the returned values into your form, as hidden fields for instance.

That way, when the form is submitted back by the user, you can retrieve the wanted values as well.

Best regards,
Anthony

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