feat: Add PageLoadingDynamicPaymentMethods with timeout for DPM receipt redirect #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
REV-4049.
For Dynamic Payment Methods BNPL experiment, order creation and fulfillment via ecommerce happens when the webhooks endpoint receives an event from Stripe that the Payment Intent has succeeded, and a series of logic happens including fulfillment via celery task.
We added a custom receipt page error to say that the receipt was being processed in case there was a scenario where the redirect to the receipt page happened before the order was fulfilled, but we found in production that fulfillment takes longer than the redirect to the receipt page from payment MFE in most orders (not all).
To improve the learner experience, we are adding a timeout so it delays the redirect.
Note: this is being done only because this is an experiment and the expectation is that the implementation for Sonic will either use fulfillment status polling or the receipt render should not be tied to fulfillment but to payment.