Skip to content

Commit 54b3f1b

Browse files
authored
Merge pull request #7 from TransactPRO/merchant_transaction_id_response
Add merchant-transaction-id to payment response parsing
2 parents ae3466f + 08abedc commit 54b3f1b

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ This library provide ability to make requests to Transact Pro Gateway API v3.
1212
<dependency>
1313
<groupId>com.github.transactpro</groupId>
1414
<artifactId>gateway</artifactId>
15-
<version>1.3.1</version>
15+
<version>1.3.2</version>
1616
</dependency>
1717
```
1818

1919
#### Gradle
2020

2121
```groovy
22-
implementation 'com.github.transactpro:gateway:1.3.1'
22+
implementation 'com.github.transactpro:gateway:1.3.2'
2323
```
2424

2525
## Documentation

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.github.transactpro</groupId>
88
<artifactId>gateway</artifactId>
9-
<version>1.3.1</version>
9+
<version>1.3.2</version>
1010

1111
<name>Transact Pro Gateway v3 Java client library</name>
1212
<description>A library that provide ability to make requests to Transact Pro Gateway API v3.</description>

src/main/java/com/github/transactpro/gateway/model/response/PaymentResponse.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ public static class AcquirerDetails {
3131
public static class GW {
3232
@SerializedName("gateway-transaction-id")
3333
private String gatewayTransactionId;
34+
@SerializedName("merchant-transaction-id")
35+
private String merchantTransactionId;
3436
@SerializedName("original-gateway-transaction-id")
3537
private String originalGatewayTransactionId;
3638
@SerializedName("parent-gateway-transaction-id")

src/test/java/com/github/transactpro/gateway/operation/transaction/SmsTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ void invalidOperation() {
160160
void parsePaymentResponseSuccessfulAPI() {
161161
String body = "{\"acquirer-details\":{\"dynamic-descriptor\":\"test\",\"eci-sli\":\"648\",\"result-code\":\"000\",\"status-description\":\"Approved\"," +
162162
"\"status-text\":\"Approved\",\"terminal-mid\":\"5800978\",\"transaction-id\":\"1899493845214315\"},\"error\":{}," +
163-
"\"gw\":{\"gateway-transaction-id\":\"8a9bed66-8412-494f-9866-2c26b5ceee62\",\"status-code\":7,\"status-text\":\"SUCCESS\"," +
164-
"\"original-gateway-transaction-id\":\"orig-aaa\",\"parent-gateway-transaction-id\":\"parent-aaa\"}," +
163+
"\"gw\":{\"gateway-transaction-id\":\"8a9bed66-8412-494f-9866-2c26b5ceee62\",\"merchant-transaction-id\":\"87d53472ba27fde33ec03e2f5ca6137a\"," +
164+
"\"status-code\":7,\"status-text\":\"SUCCESS\",\"original-gateway-transaction-id\":\"orig-aaa\",\"parent-gateway-transaction-id\":\"parent-aaa\"}," +
165165
"\"warnings\":[\"Soon counters will be exceeded for the merchant\",\"Soon counters will be exceeded for the account\"," +
166166
"\"Soon counters will be exceeded for the terminal group\",\"Soon counters will be exceeded for the terminal\"]}\n";
167167

@@ -179,6 +179,7 @@ void parsePaymentResponseSuccessfulAPI() {
179179

180180
assertNotNull(parsedResponse.getGw());
181181
assertEquals("8a9bed66-8412-494f-9866-2c26b5ceee62", parsedResponse.getGw().getGatewayTransactionId());
182+
assertEquals("87d53472ba27fde33ec03e2f5ca6137a", parsedResponse.getGw().getMerchantTransactionId());
182183
assertEquals("orig-aaa", parsedResponse.getGw().getOriginalGatewayTransactionId());
183184
assertEquals("parent-aaa", parsedResponse.getGw().getParentGatewayTransactionId());
184185
assertEquals(Status.SUCCESS, parsedResponse.getGw().getStatusCode());

0 commit comments

Comments
 (0)