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

Adding Paypal Support #1944

Closed
HarryLafranc opened this issue May 30, 2023 · 10 comments
Closed

Adding Paypal Support #1944

HarryLafranc opened this issue May 30, 2023 · 10 comments
Assignees
Labels
api change This issue concerns a Stripe API change that dj-stripe needs to be aware of
Milestone

Comments

@HarryLafranc
Copy link

Changelog Link
https://stripe.com/docs/changelog#may-9,-2023

Describe the Change
Paypal was just introduced in Stripe, it would be nice to implement the bare minimum to make it work. I'm mainly getting errors in django admin because _human_enum_values() don't recognize "paypal" value. I don't know dj-stripe enough internally to know if others things must be reworked, but I will try to take a look at it!

@HarryLafranc HarryLafranc added the api change This issue concerns a Stripe API change that dj-stripe needs to be aware of label May 30, 2023
@colmmcmullan
Copy link

+1
It would be great to support PayPal.

I use Stripe Checkout and was able to hack a working test simply by adding the following to PaymentMethodType in djstripe/enums.py:

paypal = _("PayPal")

I assume that for other workflows something would have to be added to payment_methods.py though?

@arnav13081994 arnav13081994 self-assigned this Aug 15, 2023
@arnav13081994 arnav13081994 added this to the 3.0.0 milestone Aug 15, 2023
@arnav13081994
Copy link
Contributor

@HarryLafranc @colmmcmullan Yes the only change that is required is addition of paypal = _("PayPal") to the PaymentMethodType enum. Unfortunately this fix won't be in 2.* releases as we are working on revamping the entire dj-stripe repo.

@arnav13081994 arnav13081994 reopened this Aug 15, 2023
@jleclanche jleclanche modified the milestones: 3.0.0, 2.8.0 Aug 29, 2023
jleclanche added a commit that referenced this issue Aug 29, 2023
@agusmakmun
Copy link

Any updates for adding paypal field in class PaymentMethod(StripeModel):?

@jleclanche
Copy link
Member

@agusmakmun it's live in 2.8.3

@agusmakmun
Copy link

agusmakmun commented Apr 1, 2024

hello @jleclanche thank you for quick answer.

We didn't see any paypal field in the class PaymentMethod(StripeModel) model.

https://github.com/dj-stripe/dj-stripe/blob/2.8.3/djstripe/models/payment_methods.py#L1021

only seeing the card, paynow and some related.

as paypal already have their own field:
https://docs.stripe.com/api/payment_methods/object#payment_method_object-paypal

Screenshot 2024-04-01 at 16 20 45

@jleclanche
Copy link
Member

Ah, I see what you mean. Okay yeah that will not be in 2.8. In 3.0 the class will change to always be up to date via a stripe_data field.

@agusmakmun
Copy link

@jleclanche I see. What we should do for this migration? Of course will have breaking changes right?

@jleclanche
Copy link
Member

Unfortunately, yes, it'll be quite a significant breaking change.

@agusmakmun
Copy link

Could you please give us the documentation how to smoothly migrating the dj-stripe from 2.x version to 3.x?
It will helps us lot, especially for old members that already using this package for long time.

Thank you btw 🙏 👍

@jleclanche
Copy link
Member

@agusmakmun absolutely. Unfortunately the migration path doesn't exist at this time; I will do a write-up when we get to the release date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api change This issue concerns a Stripe API change that dj-stripe needs to be aware of
Projects
None yet
Development

No branches or pull requests

5 participants