From 6b7291b11b01805718a5f33168d916f47dc69deb Mon Sep 17 00:00:00 2001 From: Vincent Date: Thu, 27 Jul 2017 09:50:35 +0200 Subject: [PATCH] Release 1.2.0 --- README.md | 31 ++++++++++++++----- app/build.gradle | 4 +-- .../com/sumup/apisampleapp/MainActivity.java | 4 +++ 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 3d6e37d..d63f8cb 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ allprojects { ##### 2. Add the dependency to a module ```groovy -compile 'com.sumup:merchant-api:1.1.1' +compile 'com.sumup:merchant-api:1.2.0' ``` ##### 3. Make a payment @@ -48,6 +48,8 @@ compile 'com.sumup:merchant-api:1.1.1' .addAdditionalInfo("To", "Berlin") //optional: foreign transaction ID, must be unique! .foreignTransactionId(UUID.randomUUID().toString()) // can not exceed 128 chars + // optional: skip the success screen + .skipSuccessScreen() .build(); SumUpAPI.openPaymentActivity(MainActivity.this, payment, 1); @@ -95,6 +97,8 @@ compile 'com.sumup:merchant-api:1.1.1' + "&receipt-mobilephone=+3531234567890" + "&receipt-email=customer@mail.com" + "&foreign-tx-id=" + UUID.randomUUID().toString() + // optional: skip the success screen + + "&skip-screen-success=true" + "&callback=mycallbackscheme://result")); startActivity(payIntent); @@ -136,14 +140,9 @@ Failure: ?smp-status=failed&smp-failure-cause=transaction-failed&smp-message=Transaction%20failed.&smp-receipt-sent=false&smp-tx-code=123ABC ``` -# III. Additional features +## III. Additional features -##### 1. Include a transaction identifier - -When setting up the SumUpPayment object, it is possible to pass an optional foreignTransactionID parameter. This identifier will be associated with the transaction and can be used to retrieve this transaction later. See API documentation for details. Please make sure that this ID is unique within the scope of the SumUp merchant account and sub-accounts. It must not be longer than 128 characters. -The foreignTransactionID is available when the callback activity is called: `SumUpAPI.Param.FOREIGN_TRANSACTION_ID` - -##### 2. Response flags +### 1. Response fields ##### a) With the API Helper @@ -177,3 +176,19 @@ The response flags are provided within the Bundle that is passed back to the cal * smp-status: `success/failed` * smp-failure-cause (send it smp-status is `failed`): `transaction-failed/geolocation-required/invalid-param/invalid-token` + + +### 2. Additional checkout parameters + +#### Transaction identifier +The `foreignTransactionID` identifier will be associated with the transaction and can be used to retrieve details related to the transaction. See [API documentation](https://sumup.com/docs/rest-api/transactions-api) for details. Please make sure that this ID is unique within the scope of the SumUp merchant account and sub-accounts. It must not be longer than 128 characters. +The foreignTransactionID is available when the callback activity is called: `SumUpAPI.Param.FOREIGN_TRANSACTION_ID` + +#### Skip success screen +To skip the screen shown at the end of a successful transaction, the `skipSuccessScreen` parameter can be used. When using the parameter your application is responsible for displaying the transaction result to the customer. In combination with the Receipts API your application can also send your own receipts, see [API documentation](https://sumup.com/docs/rest-api/transactions-api) for details. Please note success screens will still be shown when using the SumUp Air Lite readers. + +## Community +- **Questions?** Get in contact with our integration team by sending an email to +integration@sumup.com. +- **Found a bug?** [Open an issue](https://github.com/sumup/sumup-android-api/issues/new). +Please provide as much information as possible. diff --git a/app/build.gradle b/app/build.gradle index b1ff85b..0e28fcd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,12 +8,12 @@ android { minSdkVersion 15 targetSdkVersion 24 versionCode 4 - versionName "1.1.1" + versionName "1.2.0" } } dependencies { compile 'com.android.support:appcompat-v7:24.2.1' - compile 'com.sumup:merchant-api:1.1.1' + compile 'com.sumup:merchant-api:1.2.0' } \ No newline at end of file diff --git a/app/src/main/java/com/sumup/apisampleapp/MainActivity.java b/app/src/main/java/com/sumup/apisampleapp/MainActivity.java index 7724ac6..2f69609 100644 --- a/app/src/main/java/com/sumup/apisampleapp/MainActivity.java +++ b/app/src/main/java/com/sumup/apisampleapp/MainActivity.java @@ -47,6 +47,8 @@ public void onClick(View v) { .addAdditionalInfo("From", "Paris").addAdditionalInfo("To", "Berlin") // optional: foreign transaction ID, must be unique! .foreignTransactionId(UUID.randomUUID().toString()) // can not exceed 128 chars + // optional: skip the success screen + .skipSuccessScreen() .build(); SumUpAPI.openPaymentActivity(MainActivity.this, payment, REQUEST_CODE_PAYMENT); @@ -67,6 +69,8 @@ public void onClick(View v) { + "&receipt-mobilephone=+3531234567890" + "&receipt-email=customer@mail.com" + "&foreign-tx-id=" + UUID.randomUUID().toString() + // optional: skip the success screen + + "&skip-screen-success=true" + "&callback=sumupsampleresult://result")); startActivity(payIntent);