sumup / sumup-android-sdk

Sample App for the SumUp Android SDK
Other
100 stars 29 forks source link

.addAdditionalInfo("XXX", "XXX") not adding meta data to transaction #166

Open uk94 opened 2 years ago

uk94 commented 2 years ago
SumUpPayment payment = SumUpPayment.builder()
                        //mandatory parameters
                        .total(new BigDecimal("1.00"))
                        .currency(SumUpPayment.Currency.GBP)
                        // optional: add details
                        .title("XXX")
                        // optional: Add metadata
                        .addAdditionalInfo("first_name", "XXX")
                        .addAdditionalInfo("last_name", "XXX")
                        .addAdditionalInfo("house_no", "XXX")
                        .addAdditionalInfo("post_code", "XXX")
                        //optional: foreign transaction ID, must be unique!
                        .foreignTransactionId(UUID.randomUUID().toString())  // can not exceed 128 chars
                        // optional: skip the success screen
                        .skipSuccessScreen()
                        .build();
                SumUpAPI.checkout(MainActivity.this, payment, 1);

The above code does not add any metadata to the transaction.

Am I doing something wrong above?

superafroman commented 2 years ago

Hey @usmankhan94, I've asked SumUp directly about this before and the answer was it's no longer supported. Not sure why they haven't removed the methods in the latest SDK though.

The approach they suggest is to use foreignTransactionId and store metadata for the transaction in your own system associated with that ID.

paulomcnally commented 1 year ago
foreignTransactionId

This value es uniq?