Skip to content

Commit 5d50f9e

Browse files
committed
Release 7.0.0
1 parent 735c2c6 commit 5d50f9e

File tree

8 files changed

+337
-20
lines changed

8 files changed

+337
-20
lines changed

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
# Changelog
22

33
For more information, see the [README](https://github.com/sumup/Android-MerchantSDK/blob/master/README.md)
4+
## Version 7.0.0
5+
* [ADDED] `successScreenTimeout` in the payment builder to configure the duration of the success screen.
6+
* [ADDED] `getSavedCardReaderDetails()` to retrieve details of the saved card reader (serial number, type, and battery percentage).
7+
* [ADDED] `isCardReaderConnected()` to check if a card reader is currently connected.
8+
* [IMPROVEMENT] Offline transaction V2
9+
* Changes the API and behavior about how offline transactions work.
10+
* Explicit APIs to start and stop the offline session.
11+
* Removal of Security Patch Validity API.
12+
* [OFFLINE_PAYMENTS_V2.md](https://github.com/sumup/sumup-android-sdk/blob/master/OFFLINE_PAYMENTS_V2.md) for more information.
13+
414
## Version 6.0.0
5-
* [ADDED] Introduces Offline payments with Solo lite, please refer to the dedicated section in [OFFLINE_PAYMENTS.md](https://github.com/sumup/sumup-android-sdk/blob/master/OFFLINE_PAYMENTS.md) for more information.
15+
* [ADDED] Introduces Offline payments with Solo lite, please refer to the dedicated section in [OFFLINE_PAYMENTS_V1.md](https://github.com/sumup/sumup-android-sdk/blob/master/OFFLINE_PAYMENTS.md) for more information.
616
* Please contact integrations@sumup.com for enabling offline payments on your SumUp merchant account.
717
* [ADDED] Payment intent now also returns the card reader model and firmware version in new response fields `SumUpAPI.Response.CARD_READER_MODEL` and `SumUpAPI.Response.CARD_READER_FIRMWARE_VERSION` at the end of every transaction.
818
* [IMPROVEMENT] Updates about the technical stack:
File renamed without changes.

OFFLINE_PAYMENTS_V2.md

Lines changed: 287 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# SumUp Android SDK
44

55
[![Platform](https://img.shields.io/badge/Platform-Android-brightgreen.svg)](http://developer.android.com/index.html)
6-
[![API](https://img.shields.io/badge/API-16%2B-orange.svg)](https://developer.android.com/about/versions/android-4.1.html)
6+
[![API](https://img.shields.io/badge/API-26%2B-orange.svg)](https://developer.android.com/about/versions/oreo/android-8.0)
77
[![Documentation][docs-badge]](https://developer.sumup.com)
88
[![License](https://img.shields.io/github/license/sumup/sumup-android-sdk)](./LICENSE)
99

@@ -22,7 +22,7 @@ For more information about SumUp developer products, please refer to <a href="ht
2222
3. Created an Affiliate Key in [SumUp Dashboard](https://developer.sumup.com/terminal-payments/sdks/android-sdk)
2323
4. SumUp SDK requires `minSdkVersion` 26 or later
2424
5. SumUp SDK ensures support for
25-
- `targetSDK` 35 or later
25+
- `targetSDK` 35
2626
- AGP 8.8.0 or later
2727
- Kotlin version 1.9.0 or later
2828
- Java 17 and later
@@ -52,7 +52,7 @@ allprojects {
5252
Add the dependency to a module:
5353

5454
```groovy
55-
implementation 'com.sumup:merchant-sdk:6.0.0'
55+
implementation 'com.sumup:merchant-sdk:7.0.0'
5656
```
5757

5858

@@ -107,6 +107,8 @@ Once logged in, you can start using the SumUp SDK to accept card payments. If no
107107
.foreignTransactionId(UUID.randomUUID().toString()) // can not exceed 128 chars
108108
// optional: skip the success screen
109109
.skipSuccessScreen()
110+
// optional: time out for the success screen
111+
.successScreenTimeout(3)
110112
// optional: skip the failed screen
111113
.skipFailedScreen()
112114
.build();
@@ -125,7 +127,7 @@ Once logged in, you can start using the SumUp SDK to accept card payments. If no
125127
```
126128

127129
### 6. Offline payments
128-
* For offline payments support, please refer to the [Offline payments](https://github.com/sumup/sumup-android-sdk/blob/master/OFFLINE_PAYMENTS.md) documentation.
130+
* For offline payments support, please refer to the [Offline payments](https://github.com/sumup/sumup-android-sdk/blob/master/OFFLINE_PAYMENTS_V2.md) documentation.
129131

130132
## II. Additional features
131133

@@ -247,6 +249,9 @@ If there are connectivity issues and the transaction status can not be retrieved
247249
The `foreignTransactionID` identifier will be associated with the transaction and can be used to retrieve details related to the transaction. See [API documentation](https://developer.sumup.com/rest-api/#tag/Transactions) 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.
248250
The foreignTransactionID is available when the callback activity is called: `SumUpAPI.Param.FOREIGN_TRANSACTION_ID`
249251

252+
#### Timeout on success screen
253+
Use `.successScreenTimeout(int seconds)` to configure the success screen duration (must be > 0), which automatically dismisses the screen after the specified time if the user has not closed it manually.
254+
250255
#### Skip success screen
251256
To skip the success screen shown at the end of a successful transaction, the `skipSuccessScreen` parameter can be used. When using this 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://developer.sumup.com/rest-api/#tag/Receipts) for details. Please note success screens will still be shown when using the SumUp Air Lite readers.
252257

@@ -278,13 +283,31 @@ If a merchant account is currently logged in, it is possible to retrieve the dat
278283
}
279284
```
280285

281-
### 7. Log out SumUp account
286+
### 7. Retrieve connected card reader's data
287+
288+
You can use the following methods to check the connection status and retrieve details about the saved card reader:
289+
290+
* **`isCardReaderConnected()`**: Returns a `boolean` indicating if a card reader is currently connected.
291+
* **`getSavedCardReaderDetails()`**: Returns an object containing the reader's serial number, type, and last known battery percentage.
292+
293+
#### Supported Reader Types
294+
The reader type will be one of the following constants:
295+
* `SOLO`
296+
* `SOLO_LITE`
297+
* `AIR`
298+
* `THREE_G`
299+
* `PIN_PLUS`
300+
* `UNKNOWN` (Returned only if the SDK encounters an issue and cannot identify the reader type)
301+
302+
> **Note on Battery Level:** The `lastKnownBatteryPercentage` is **not** real-time. It reflects the battery level recorded during the last transaction performed. As a result, this value is an approximation and may not match the current battery level exactly if the reader has been idle or charged since the last payment.
303+
304+
### 8. Log out SumUp account
282305
```java
283306
SumUpAPI.logout();
284307
```
285308

286309

287-
### 8. Enable ProGuard
310+
### 9. Enable ProGuard
288311
```groovy
289312
buildTypes {
290313
release {
@@ -295,7 +318,7 @@ If a merchant account is currently logged in, it is possible to retrieve the dat
295318
}
296319
```
297320

298-
### 9. Use Google Location Services
321+
### 10. Use Google Location Services
299322
300323
The SDK supports Google Location Services, to improve location accuracy and reduce power consumption.
301324

app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ apply plugin: 'com.android.application'
22

33
android {
44
namespace "com.sumup.sdksampleapp"
5-
compileSdkVersion 35
5+
compileSdk 35
66

77
defaultConfig {
88
applicationId "com.sumup.sdksampleapp"
99
minSdkVersion 26
1010
targetSdkVersion 35
1111
versionCode 1
12-
versionName "6.0.0"
12+
versionName "7.0.0"
1313
}
1414

1515
packagingOptions {
@@ -36,7 +36,7 @@ android {
3636
dependencies {
3737
implementation 'com.google.android.gms:play-services-location:21.3.0'
3838

39-
implementation 'com.sumup:merchant-sdk:6.0.0'
39+
implementation 'com.sumup:merchant-sdk:7.0.0'
4040

4141
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.1.5"
4242
}

app/src/main/java/com/sumup/sdksampleapp/MainActivity.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import com.sumup.merchant.reader.api.SumUpAPI;
1515
import com.sumup.merchant.reader.api.SumUpLogin;
1616
import com.sumup.merchant.reader.api.SumUpPayment;
17-
import com.sumup.merchant.reader.offline.OfflineSessionResult;
17+
import com.sumup.merchant.reader.offline.OfflineSessionState;
1818
import com.sumup.merchant.reader.offline.OfflineUploadFailureReasons;
1919
import com.sumup.merchant.reader.offline.callbacks.OfflineSessionCallback;
2020
import com.sumup.merchant.reader.offline.callbacks.SecurityPatchUpdateCallback;
@@ -88,7 +88,6 @@ public void onClick(View v) {
8888
.configureRetryPolicy(2000, 60000, true)
8989
// optional: foreign transaction ID, must be unique!
9090
.foreignTransactionId(UUID.randomUUID().toString()) // can not exceed 128 chars
91-
.optInOfflinePayments()
9291
.build();
9392

9493
SumUpAPI.checkout(MainActivity.this, payment, REQUEST_CODE_PAYMENT);
@@ -182,11 +181,11 @@ public void run() {
182181
public void onClick(View v) {
183182
SumUpAPI.fetchCurrentOfflineSession(new OfflineSessionCallback() {
184183
@Override
185-
public void onSessionInfoReceived(@NonNull OfflineSessionResult offlineSessionResult) {
184+
public void onSessionInfoReceived(@NonNull OfflineSessionState offlineSessionState) {
186185
runOnUiThread(new Runnable() {
187186
@Override
188187
public void run() {
189-
mOfflineSessionInfo.setText(offlineSessionResult.toString());
188+
mOfflineSessionInfo.setText(offlineSessionState.toString());
190189
}
191190
});
192191

build.gradle

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,18 @@
22

33
buildscript {
44
repositories {
5-
jcenter()
5+
mavenCentral()
66
google()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:8.8.0'
9+
classpath 'com.android.tools.build:gradle:8.8.2'
1010
}
1111
}
1212

1313
allprojects {
1414
repositories {
1515
google()
1616
mavenCentral()
17-
1817
maven { url 'https://maven.sumup.com/releases' }
19-
jcenter()
2018
}
2119
}

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip

0 commit comments

Comments
 (0)