- Issue created by @agoradesign
- First commit to issue fork.
- ๐ฌ๐ชGeorgia maximkashuba Batumi
Added base PayPal support for Stripe Payment Element with on-session Payment method usage.
Not tested with real payment, but only with test mode for Stripe. - Merge request !125Issue #3421392: Add PayPal support to Payment Element Gateway โ (Open) created by sergiur
- First commit to issue fork.
- Status changed to Needs review
9 months ago 12:13pm 14 August 2024 - ๐ฌ๐งUnited Kingdom sergiur London, UK
Merged in the latest changes from dev and fixed conflicts, switched to extend
StripePaymentMethodTypeBase
instead ofPaymentMethodTypeBase
and opened a merge request so we can patch via composer. Please review! - Status changed to Needs work
9 months ago 4:03pm 14 August 2024 - ๐บ๐ธUnited States TomTech
Thanks for the MR!
There are a couple of items that need some work. I've left comments on the MR.
- Assigned to sergiur
- ๐ฌ๐งUnited Kingdom sergiur London, UK
Thank you for the review! I'll be honest I mostly rerolled what was there, I should've checked the code in more detail to see what it's actually doing, my bad. Will have a look now.
- Issue was unassigned.
- Status changed to Needs review
9 months ago 3:00pm 15 August 2024 - ๐ฌ๐งUnited Kingdom sergiur London, UK
Implemented the changes, please let me know if I missed anything!
- ๐ฎ๐ณIndia sorabh.v6 Indore
sorabh.v6 โ made their first commit to this issueโs fork.
- First commit to issue fork.
- ๐ฌ๐งUnited Kingdom jonathanshaw Stroud, UK
@gaydabura why did you make the change you made to
src/EventSubscriber/OrderPaymentIntentSubscriber.php
?That change may have sigificant consequences on payment types other than paypal, so it is unlikely this can be committed with it.
- ๐บ๐ฆUkraine gaydabura
@jonathanshaw I added PaymentIntent::STATUS_REQUIRES_ACTION because if the user selects PayPal (or other method which create state "require_action"), the PaymentIntent enters this state. However, if they return without completing the payment and modify their order, we need to update the PaymentIntent amount accordingly.
I understand that this change might affect other payment methods. In this case we might need to provide more flexible logic. If you see any potential issues, let's discuss how to handle them properly.
- ๐ฌ๐งUnited Kingdom jonathanshaw Stroud, UK
if they return without completing the payment and modify their order, we need to update the PaymentIntent amount accordingly.
@gaydabura thanks for the reply, much appreciated.
(1) I agree that the scenario you mention is valid, and we need to be sure it addressed.
(2) However, I'm suspect that the fix you suggest is not right. If you look at the examples screenshots in payment intent docs at https://docs.stripe.com/payments/paymentintents/lifecycle it illustrates that at the 'require_action' stage the customer is no longer concerned with verifying the amount and may not even be shown the amount. The change you made in OrderIntentSubscriber might conceivably allow other processes (like staff or price changes) to update the payment intent and change the amount charged but without the customer being aware of the final amount they were paying.
(3) Is there are any reason why this issue of customers returning without completing the payment and modifying their order is a bigger concern with paypal than with card payments?
(4) Given that this concern seems to be equally valid for all payment methods, I believe we should open a new issue for it and address it there for all payment methods. The general experience in the Drupal community seems to be that the more problems we try to solve in a single issue, the less likely we are to solve any of them. Smaller scoped issues make for faster progress.
(5) I wonder if the right solution to the problem you give is in the StripeReview checkout pane. Perhaps if it finds an existing payment intent, it should check the amount of intent still matches the order price.
- ๐บ๐ฆUkraine gaydabura
@jonathanshaw i have removed commit with change. Agree with you, it requires separate issue, with detailed descriptions of problem.