Skip to content

Fix Android Tap-to-Pay affiliateKey and foreign_transaction_id mapping#68

Open
jacopofranza wants to merge 1 commit intoPurpleSoftSrl:masterfrom
Partytapp:master
Open

Fix Android Tap-to-Pay affiliateKey and foreign_transaction_id mapping#68
jacopofranza wants to merge 1 commit intoPurpleSoftSrl:masterfrom
Partytapp:master

Conversation

@jacopofranza
Copy link
Copy Markdown

Problem

Android Tap-to-Pay checkouts currently do not populate SumUp's foreign_transaction_id consistently 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 foreignTransactionId only to CheckoutData.clientUniqueTransactionId.

However, in the TTP SDK the actual affiliate metadata is carried through AffiliateModel, and foreignTransactionId should be provided there as well.

At the moment affiliateData is always null, so foreign_transaction_id is not propagated to SumUp as expected.

Fix

  • pass affiliateKey into the Android TTP checkout runner
  • create AffiliateModel(affiliateKey, foreignTransactionId, null)
  • set it on CheckoutData.affiliateData

This keeps the public Flutter API unchanged and only fixes the Android TTP native mapping.

Verification

  • fvm flutter analyze passes
  • tested against a local integration scenario where card reader and Android TTP should both be retrievable through foreign_transaction_id

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.

1 participant