- Issue created by @jonathanshaw
- Merge request !166#3515814: StripePaymentElement assumes next step is 'complete' β (Merged) created by jonathanshaw
-
jonathanshaw β
authored f7861702 on 2.x
Issue #3515814 by jonathanshaw, tomtech: PaymentElement assumes next...
-
jonathanshaw β
authored f7861702 on 2.x
- πΊπΈUnited States TomTech
@jonathanshaw, thanks again for the report and MR.
The MR has been merged.
A few things to note:
1. It is necessary for the payment step to be bypassed.
The nature of the PaymentProcess Pane is to be "visible" and create a payment. When that occurs, it will not succeed, an exception would be generated, and the customer redirected back to a previous step...leaving the checkout flow and order in an incongruent state, given the payment was actually successful.
While it might seem that the PaymentProcess would be "invisible" if the order is paid, this only occurs if the payment is "complete". If the payment was only an authorization, (what Stripe calls "manual") the order would still have a balance, until the authorized payment is "captured".
Additionally, if the payment was less than the total, it would also cause the PaymentProcess pane to be "visible". This can happen if the review page with the Stripe payment component was reached with a discount applied, and/or a specific tax rate in effect...but the payment is not completed until later. e.g. Payment started at 11:55 pm December 31st, with a 10% discount applied, and a 7% tax rate, but the customer completes the order at 12:05am an January 1st, when the discount has expired, and the tax rate has changed to 8%.
2. It is possible that the customer completed the payment with Stripe, but the onReturn is NOT invoked. (This can happen when the customer's network connection drops, battery dies, etc...) In this case, the webhook necessarily handles creating the payment and placing the order. In the OOTB handling, the order will move the checkout to the complete step. If you are adding additional steps between payment and complete, be sure to consider this possibility.
Automatically closed - issue fixed for 2 weeks with no activity.