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

Fix stripe.Customer.create() bug (quantity) in 3.4.0 #332

Merged
merged 2 commits into from
Apr 19, 2017

Conversation

xfxf
Copy link
Contributor

@xfxf xfxf commented Apr 19, 2017

3.4.0 introduced PR#319, which causes this error for some people now when trying to create/sync customers:

InvalidRequestError: Request req_AV0P60vqXmdxUj: Received unknown parameter: quantity

This appears to occur when a user doesn't have a DEFAULT_PLAN set in their settings.py (which is optional), and the app default for this is None. Stripe's API (locked down to version 2015-10-16 by default in this project) does not allow a quantity to be set without a plan.

This changes the default for 'quantity' to None, which makes it behave correctly. The API sets this to '1' by default anyway if a plan is specified with no quantity according to https://web.archive.org/web/20150619020503/https://stripe.com/docs/api#create_customer)

(As an aside, the current version of the API doesn't support any of these parameters - subscriptions are dealt with entirely separately to customers - would you accept a seperate PR to this retargeting the app towards the current Stripe API?)

@paltman
Copy link
Member

paltman commented Apr 19, 2017

Yes please. An API for updating to a latest API version would be great. I don't think we need to support older versions but do like pinning to specific versions.

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

Successfully merging this pull request may close these issues.

None yet

2 participants