dj-stripe
dj-stripe copied to clipboard
Add a PaymentIntent.create classmethod?
Suggested by @Skorpyon in #938
...is it possible add class method to PaymentIntent same as it exist for Customer to create new intents?
payment_intent = PaymentIntent.create(customer=customer, amount=1000, currency='eur', **kwargs)
A PaymentIntent.create()
classmethod is possible, though it seems like it would be a very thin wrapper around stripe.PaymentIntent.create
(maybe just do a cls.sync_from_stripe_data
on the result).
I was initiallly thinking maybe it should be a method of Customer instead, but since you can create PaymentIntents without a customer I think a PaymentIntent classmethod would be the way to go.
My PR should cover this https://github.com/dj-stripe/dj-stripe/pull/950
Removing this from 2.1.0 milestone because I don't think it's a blocker on release.
This might get bumped to 2.2