Express Checkout PR 2: UUID Generation + Checkout Object + UI#93
Open
daniellzl wants to merge 6 commits into
Open
Conversation
…client JS Implements Steps 1+2 of the Affirm Express Checkout Integration Guide: - ExpressCheckout controller route (generates UUID, writes AffirmExpressCart Custom Object, builds checkout object) - affirmBasket.js: getSubtotal() and getExpressCheckout() methods - Client-side JS for AJAX checkout initiation and Affirm modal - Reusable expressCheckoutButton.isml template (cart + PDP) - Template integrations (cart.isml, productDetails.isml, scripts.isml) - Updated Affirm hosted JS libraries (live.js, sandbox.js) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Mar 20, 2026
…0302/express-checkout-pr2-checkout-object
daniellzl
commented
Mar 20, 2026
| } | ||
| } | ||
| var affirmData = require('*/cartridge/scripts/data/affirmData'); | ||
| if (affirmData.getExpressCheckoutEnabled() && affirmData.getAffirmOnlineStatus() && affirmData.getAffirmVCNStatus() != 'on') { |
Collaborator
Author
There was a problem hiding this comment.
Doesn't import express checkout script if merchant is VCN.
daniellzl
commented
Mar 20, 2026
| @@ -0,0 +1,18 @@ | |||
| <isset name="affirmData" value="${require('*/cartridge/scripts/data/affirmData')}" scope="page" /> | |||
|
|
|||
| <isif condition="${affirmData.getExpressCheckoutEnabled() && affirmData.getAffirmOnlineStatus() && affirmData.getAffirmVCNStatus() != 'on'}"> | |||
Collaborator
Author
There was a problem hiding this comment.
Doesn't render express checkout button if merchant is VCN.
daniellzl
commented
Mar 20, 2026
| return next(); | ||
| } | ||
|
|
||
| if (affirm.data.getAffirmVCNStatus() == 'on') { |
Collaborator
Author
There was a problem hiding this comment.
Additional guard to prevent VCN merchants from checking out with express
Contributor
There was a problem hiding this comment.
Can we leave a TODO on the VCN gating to revisit once we're ready to support VCN merchants?
taehyunlim
reviewed
Mar 20, 2026
| Transaction.wrap(function () { | ||
| var affirmExpressCart = CustomObjectMgr.createCustomObject('AffirmExpressCart', orderId); | ||
| affirmExpressCart.custom.basketUUID = basket.getUUID(); | ||
| affirmExpressCart.custom.customerNo = basket.getCustomer() && basket.getCustomer().isRegistered() |
Contributor
There was a problem hiding this comment.
How is customerNo used?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Tech Spec
Summary
Frontend
Backend
PR Stack (2 of 4)
Implements Steps 1+2 of the Affirm Express Checkout Integration Guide.
Test plan