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

Payment Source creation results in Bad Request #460

Closed
kostaskoukouvis opened this issue Sep 20, 2017 · 1 comment
Closed

Payment Source creation results in Bad Request #460

kostaskoukouvis opened this issue Sep 20, 2017 · 1 comment

Comments

@kostaskoukouvis
Copy link

The new form package does not fully support payment sources. Especially I ran into the problem when trying to create a new three_d_secure source.

What the /v1/sources endpoint expects:

type=three_d_secure&three_d_secure[card]=src_66666666&three_d_secure[customer]=cus_66666666

What is actually being sent:

type=three_d_secure&card=src_6666666&customer=cus_666666666

The problem lies to the fact that the TypeData struct attribute has a wildcard tag form:"*" which results in it being encoded on the same level as the rest of the struct and not as subfields of the type name. I guess this means that there should be a special case in the structEncoder's encode function or on some other level that depending on the payment source Type it gives the correct key name for the TypeData map.

Unless I totally missed something and there already is a proper way of making those requests that hasn't been documented yet.

Go version: 1.8.3

@brandur-stripe
Copy link
Contributor

Released as 27.0.1. Thank you for reporting!

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