-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Problem
On Android Tap-to-Pay, the plugin does not propagate the Flutter foreignTransactionId in a way that makes the transaction retrievable through the Transactions API using foreign_transaction_id.
This makes Android Tap-to-Pay inconsistent with the card reader flow.
Current behavior
When using card reader checkout, foreignTransactionId is propagated correctly and the transaction can be retrieved via foreign_transaction_id.
When using Android Tap-to-Pay, the same external id is currently mapped only to CheckoutData.clientUniqueTransactionId, while CheckoutData.affiliateData is left null.
As a result, the transaction is not consistently retrievable through:
transactions.get(merchantCode, { foreign_transaction_id: externalId })
Expected behavior
Android Tap-to-Pay should behave consistently with card reader checkout:
- the external id passed from Flutter as
foreignTransactionIdshould populate SumUp'sforeign_transaction_id - integrators should be able to query both card reader and Android Tap-to-Pay transactions using the same backend lookup strategy
Root cause
In the Android Tap-to-Pay flow, the plugin currently builds CheckoutData with:
clientUniqueTransactionIdset frompayment["foreignTransactionId"]affiliateData = null
However, in the TTP SDK, foreignTransactionId belongs to AffiliateModel, which is attached through CheckoutData.affiliateData.
Proposed fix
Pass the plugin affiliateKey into the Android Tap-to-Pay checkout runner and set:
clientUniqueTransactionIdAffiliateModel(affiliateKey, foreignTransactionId, null)
This keeps the public Flutter API unchanged and fixes Android TTP reconciliation for foreign_transaction_id.
Related PR
Proposed fix: #68