Fix Android Tap-to-Pay affiliateKey and foreign_transaction_id mapping#68
Open
jacopofranza wants to merge 1 commit intoPurpleSoftSrl:masterfrom
Open
Fix Android Tap-to-Pay affiliateKey and foreign_transaction_id mapping#68jacopofranza wants to merge 1 commit intoPurpleSoftSrl:masterfrom
jacopofranza wants to merge 1 commit intoPurpleSoftSrl:masterfrom
Conversation
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.
Problem
Android Tap-to-Pay checkouts currently do not populate SumUp's
foreign_transaction_idconsistently with the card reader flow.This makes backend reconciliation inconsistent when integrators query:
transactions.get(merchantCode, { foreign_transaction_id: externalId })Card reader transactions are found, while Android TTP transactions are not.
Root cause
In the Android TTP flow, the plugin currently maps the Flutter
foreignTransactionIdonly toCheckoutData.clientUniqueTransactionId.However, in the TTP SDK the actual affiliate metadata is carried through
AffiliateModel, andforeignTransactionIdshould be provided there as well.At the moment
affiliateDatais alwaysnull, soforeign_transaction_idis not propagated to SumUp as expected.Fix
affiliateKeyinto the Android TTP checkout runnerAffiliateModel(affiliateKey, foreignTransactionId, null)CheckoutData.affiliateDataThis keeps the public Flutter API unchanged and only fixes the Android TTP native mapping.
Verification
fvm flutter analyzepassesforeign_transaction_id