@@ -23,7 +23,7 @@ Add this dependency to your project's POM:
23
23
<dependency >
24
24
<groupId >com.postfinancecheckout</groupId >
25
25
<artifactId >postfinancecheckout-java-sdk</artifactId >
26
- <version >2.1.2 </version >
26
+ <version >2.2.0 </version >
27
27
<scope >compile</scope >
28
28
</dependency >
29
29
```
@@ -33,7 +33,7 @@ Add this dependency to your project's POM:
33
33
Add this dependency to your project's build file:
34
34
35
35
``` groovy
36
- compile "com.postfinancecheckout:postfinancecheckout-java-sdk:2.1.2 "
36
+ compile "com.postfinancecheckout:postfinancecheckout-java-sdk:2.2.0 "
37
37
```
38
38
39
39
### Others
@@ -46,7 +46,7 @@ mvn clean package
46
46
47
47
Then manually install the following JARs:
48
48
49
- * ` target/postfinancecheckout-java-sdk-2.1.2 .jar `
49
+ * ` target/postfinancecheckout-java-sdk-2.2.0 .jar `
50
50
* ` target/lib/*.jar `
51
51
52
52
## Usage
@@ -72,7 +72,7 @@ public class Example {
72
72
ApiClient apiClient = new ApiClient (userId, secret);
73
73
74
74
// Create API service instance.
75
- TransactionService transactionService = new TransactionService ( apiClient);
75
+ TransactionService transactionService = apiClient. getTransactionService( );
76
76
77
77
}
78
78
}
@@ -105,8 +105,6 @@ public class TransactionPaymentPageServiceTest {
105
105
106
106
// Services
107
107
private ApiClient apiClient;
108
- private TransactionPaymentPageService transactionPaymentPageService;
109
- private TransactionService transactionService;
110
108
111
109
// Models
112
110
private TransactionCreate transactionPayload;
@@ -116,12 +114,6 @@ public class TransactionPaymentPageServiceTest {
116
114
if (this . apiClient == null ) {
117
115
this . apiClient = new ApiClient (applicationUserId, authenticationKey);
118
116
}
119
- if (this . transactionPaymentPageService == null ) {
120
- this . transactionPaymentPageService = new TransactionPaymentPageService (this . apiClient);
121
- }
122
- if (this . transactionService == null ) {
123
- this . transactionService = new TransactionService (this . apiClient);
124
- }
125
117
}
126
118
127
119
/**
@@ -171,8 +163,8 @@ public class TransactionPaymentPageServiceTest {
171
163
@Test
172
164
public void paymentPageUrlTest () {
173
165
try {
174
- Transaction transaction = this . transactionService . create(this . spaceId, this . getTransactionPayload());
175
- String paymentPageUrl = this . transactionPaymentPageService . paymentPageUrl(spaceId, transaction. getId());
166
+ Transaction transaction = this . apiClient . getTransactionService() . create(this . spaceId, this . getTransactionPayload());
167
+ String paymentPageUrl = this . apiClient . getTransactionPaymentPageService . paymentPageUrl(spaceId, transaction. getId());
176
168
Assert . assertTrue(paymentPageUrl. contains(" https://" ));
177
169
} catch (Exception e) {
178
170
e. printStackTrace();
0 commit comments