sumup / sumup-android-api

Other
19 stars 10 forks source link

How to identify a completed transaction with the given Intent #4

Closed rivella50 closed 7 years ago

rivella50 commented 7 years ago

Hi, in our app a user chooses from a list of open transactions (each one defined with a unique foreignTransactionId) which one to use next for payment. Is there a way we can retrieve such a completed transaction in onActivityResult(..) with the data given back in the Intent parameter? In our opinion SumUpAPI.Response doesn't contain any information which we could use to match with the transactions from the original list. SumUpAPI.Response.TX_CODE is not the same as the foreignTransactionId, right?

If there is no identifying feature we would have set the current transaction in a separate field in our app, but we think it would be neater to use the data in the Intent.

rivella50 commented 7 years ago

Problem solved:

Bundle extra = data.getExtras();
String foreignTransactionId = extra.getString(SumUpAPI.Param.FOREIGN_TRANSACTION_ID);
vfoixcable commented 7 years ago

You were quicker than me. I was about to send you the same. We forgot to document that point and will fix that in a very near future.

rivella50 commented 7 years ago

That's great. Thank you for your message.