Fix ClientMetadataID Being Nil For PayPal Checkout With BillingAgreement Flow#1807
Merged
Conversation
Dependency Review✅ No vulnerabilities found.Scanned FilesNone |
buzzamus
commented
May 27, 2026
| let contactInformationToggle = Toggle(title: "Add Contact Information") | ||
| let amountBreakdownToggle = Toggle(title: "Amount Breakdown") | ||
| let requestBillingAgreementToggle = Toggle(title: "Request Billing Agreement") | ||
|
|
Contributor
Author
There was a problem hiding this comment.
I included this with the fix as we didn't have an easy way to test a checkout flow with requestBillingAgreement enabled, so figured this would be good to keep
agedd
reviewed
May 27, 2026
agedd
left a comment
Contributor
There was a problem hiding this comment.
ty for fixing this! can we add a unit test to test this scenario (approving ahead of time) 🚀
jaxdesmarais
approved these changes
May 27, 2026
jaxdesmarais
left a comment
Contributor
There was a problem hiding this comment.
Thanks for adding docstrings so future us does not forget this fix. 🚀
Contributor
Author
@agedd I actually started to, but both |
agedd
approved these changes
May 27, 2026
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.
Summary of changes
shouldRequestBillingAgreementset totruethe PP checkout token is returned for the CMID, but once the flow is completed a BA token is returned since a billing agreement has been requested. This caused the new BA token to override the existing CMID, which could no longer find the new token in the existing dictionary. This fix resolves that issue by setting to the EC token for this specific scenario.AI Usage
Which AI Agent Was Used?
How was AI used?
For creating a quick testing scneario in the Demo app by adding a BA request toggle.
Estimated AI Code Contribution
Checklist
Authors