dj-stripe icon indicating copy to clipboard operation
dj-stripe copied to clipboard

Add a PaymentIntent.create classmethod?

Open therefromhere opened this issue 4 years ago • 4 comments

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)

therefromhere avatar Aug 16 '19 23:08 therefromhere

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.

therefromhere avatar Aug 16 '19 23:08 therefromhere

My PR should cover this https://github.com/dj-stripe/dj-stripe/pull/950

nickdjones avatar Aug 27 '19 16:08 nickdjones

Removing this from 2.1.0 milestone because I don't think it's a blocker on release.

therefromhere avatar Sep 08 '19 08:09 therefromhere

This might get bumped to 2.2

therefromhere avatar Oct 01 '19 00:10 therefromhere