Skip to content

feat(checkout) PI-5213 Affirm orderSubmit only after payment complete#3223

Open
bc-dronov wants to merge 2 commits into
masterfrom
PI-5213
Open

feat(checkout) PI-5213 Affirm orderSubmit only after payment complete#3223
bc-dronov wants to merge 2 commits into
masterfrom
PI-5213

Conversation

@bc-dronov
Copy link
Copy Markdown
Contributor

@bc-dronov bc-dronov commented Apr 17, 2026

What/Why?

Affirm Order Submitting only after payment is complete.

Rollout/Rollback

Revert PR, OR experiment disable.

Testing

Manual testing


Note

Medium Risk
Changes the order submission timing in the Affirm payment flow and switches data sources for the Affirm checkout payload, which could affect totals/discounts and sequencing around payment authorization.

Overview
Affirm checkout can now postpone order creation. AffirmPaymentStrategy.execute reads initializationData.postponeOrderCreation and conditionally calls submitOrder before or after the Affirm modal succeeds, while still submitting the payment nonce afterwards.

Affirm payload generation now uses cart/checkout data instead of order data. getCheckoutInformation pulls totals and order_id from checkout, and items/discounts from cart (lineItems, coupons, discountAmount), with tests updated to cover both sequencing modes and expanded item expectations.

Reviewed by Cursor Bugbot for commit 3b20088. Bugbot is set up for automated code reviews on this repo. Configure here.

@bc-dronov bc-dronov requested a review from a team as a code owner April 17, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants