Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
439 lines (371 loc) · 12.9 KB

File metadata and controls

439 lines (371 loc) · 12.9 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
package com.unzer.payment;
import com.unzer.payment.communication.JsonFieldIgnore;
import com.unzer.payment.models.AdditionalTransactionData;
import java.math.BigDecimal;
import java.net.URL;
import java.util.Currency;
import java.util.Date;
public abstract class BaseTransaction<T extends BasePayment> implements Resource {
protected final static String TRANSACTION_ID_TOKEN = "<transactionId>";
protected final static String PAYMENT_ID_TOKEN = "<paymentId>";
private String id;
private BigDecimal amount;
private Currency currency;
private URL returnUrl;
private Boolean card3ds;
private String orderId;
private String invoiceId;
private String typeId;
private String customerId;
private String metadataId;
private String paymentId;
private String riskId;
private String basketId;
private String paypageId;
private String paymentReference;
private Status status;
private URL redirectUrl;
private Processing processing = new Processing();
private String traceId;
private Message message;
private Date date;
private String type;
private AdditionalTransactionData additionalTransactionData;
@JsonFieldIgnore
private transient T payment;
@JsonFieldIgnore
private transient Unzer unzer;
@JsonFieldIgnore
private URL resourceUrl;
public BaseTransaction() {
super();
}
@Deprecated
public BaseTransaction(Unzer unzer) {
this.unzer = unzer;
}
@Override
public int hashCode() {
int result = getId() != null ? getId().hashCode() : 0;
result = 31 * result + (getAmount() != null ? getAmount().hashCode() : 0);
result = 31 * result + (getCurrency() != null ? getCurrency().hashCode() : 0);
result = 31 * result + (getReturnUrl() != null ? getReturnUrl().hashCode() : 0);
result = 31 * result + (getCard3ds() != null ? getCard3ds().hashCode() : 0);
result = 31 * result + (getOrderId() != null ? getOrderId().hashCode() : 0);
result = 31 * result + (getInvoiceId() != null ? getInvoiceId().hashCode() : 0);
result = 31 * result + (getTypeId() != null ? getTypeId().hashCode() : 0);
result = 31 * result + (getCustomerId() != null ? getCustomerId().hashCode() : 0);
result = 31 * result + (getMetadataId() != null ? getMetadataId().hashCode() : 0);
result = 31 * result + (getPaymentId() != null ? getPaymentId().hashCode() : 0);
result = 31 * result + (getRiskId() != null ? getRiskId().hashCode() : 0);
result = 31 * result + (getBasketId() != null ? getBasketId().hashCode() : 0);
result = 31 * result + (getPaypageId() != null ? getPaypageId().hashCode() : 0);
result = 31 * result + (getPaymentReference() != null ? getPaymentReference().hashCode() : 0);
result = 31 * result + (getStatus() != null ? getStatus().hashCode() : 0);
result = 31 * result + (getRedirectUrl() != null ? getRedirectUrl().hashCode() : 0);
result = 31 * result + (getTraceId() != null ? getTraceId().hashCode() : 0);
result = 31 * result + (getMessage() != null ? getMessage().hashCode() : 0);
result = 31 * result + (getDate() != null ? getDate().hashCode() : 0);
result = 31 * result + (getType() != null ? getType().hashCode() : 0);
result = 31 * result
+ (getAdditionalTransactionData() != null ? getAdditionalTransactionData().hashCode() : 0);
result = 31 * result + (getTransactionUrl() != null ? getTransactionUrl().hashCode() : 0);
return result;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BaseTransaction<?> that = (BaseTransaction<?>) o;
if (getId() != null ? !getId().equals(that.getId()) : that.getId() != null) {
return false;
}
if (getAmount() != null ? getAmount().compareTo(that.getAmount()) != 0 :
that.getAmount() != null) {
return false;
}
if (getCurrency() != null ? !getCurrency().equals(that.getCurrency()) :
that.getCurrency() != null) {
return false;
}
if (getReturnUrl() != null ? !getReturnUrl().equals(that.getReturnUrl()) :
that.getReturnUrl() != null) {
return false;
}
if (getCard3ds() != null ? !getCard3ds().equals(that.getCard3ds()) :
that.getCard3ds() != null) {
return false;
}
if (getOrderId() != null ? !getOrderId().equals(that.getOrderId()) :
that.getOrderId() != null) {
return false;
}
if (getInvoiceId() != null ? !getInvoiceId().equals(that.getInvoiceId()) :
that.getInvoiceId() != null) {
return false;
}
if (getTypeId() != null ? !getTypeId().equals(that.getTypeId()) : that.getTypeId() != null) {
return false;
}
if (getCustomerId() != null ? !getCustomerId().equals(that.getCustomerId()) :
that.getCustomerId() != null) {
return false;
}
if (getMetadataId() != null ? !getMetadataId().equals(that.getMetadataId()) :
that.getMetadataId() != null) {
return false;
}
if (getPaymentId() != null ? !getPaymentId().equals(that.getPaymentId()) :
that.getPaymentId() != null) {
return false;
}
if (getRiskId() != null ? !getRiskId().equals(that.getRiskId()) : that.getRiskId() != null) {
return false;
}
if (getBasketId() != null ? !getBasketId().equals(that.getBasketId()) :
that.getBasketId() != null) {
return false;
}
if (getPaypageId() != null ? !getPaypageId().equals(that.getPaypageId()) :
that.getPaypageId() != null) {
return false;
}
if (getPaymentReference() != null ? !getPaymentReference().equals(that.getPaymentReference()) :
that.getPaymentReference() != null) {
return false;
}
if (getStatus() != that.getStatus()) {
return false;
}
if (getRedirectUrl() != null ? !getRedirectUrl().equals(that.getRedirectUrl()) :
that.getRedirectUrl() != null) {
return false;
}
if (getTraceId() != null ? !getTraceId().equals(that.getTraceId()) :
that.getTraceId() != null) {
return false;
}
if (getMessage() != null ? !getMessage().equals(that.getMessage()) :
that.getMessage() != null) {
return false;
}
if (getDate() != null ? !getDate().equals(that.getDate()) : that.getDate() != null) {
return false;
}
if (getType() != null ? !getType().equals(that.getType()) : that.getType() != null) {
return false;
}
if (getAdditionalTransactionData() != null
? !getAdditionalTransactionData().equals(that.getAdditionalTransactionData()) :
that.getAdditionalTransactionData() != null) {
return false;
}
if (getProcessing() != null
? !getProcessing().equals(that.getProcessing()) :
that.getProcessing() != null) {
return false;
}
return getTransactionUrl() != null ? getTransactionUrl().equals(that.getTransactionUrl()) :
that.getTransactionUrl() == null;
}
public Processing getProcessing() {
return processing;
}
public BaseTransaction<T> setProcessing(Processing processing) {
this.processing = processing;
return this;
}
public String getId() {
return id;
}
public BaseTransaction<T> setId(String id) {
this.id = id;
return this;
}
public BigDecimal getAmount() {
return amount;
}
public BaseTransaction<T> setAmount(BigDecimal amount) {
this.amount = amount;
return this;
}
public Currency getCurrency() {
return currency;
}
public BaseTransaction<T> setCurrency(Currency currency) {
this.currency = currency;
return this;
}
public URL getReturnUrl() {
return returnUrl;
}
public BaseTransaction<T> setReturnUrl(URL returnUrl) {
this.returnUrl = returnUrl;
return this;
}
public Boolean getCard3ds() {
return card3ds;
}
public BaseTransaction<T> setCard3ds(Boolean card3ds) {
this.card3ds = card3ds;
return this;
}
public String getOrderId() {
return orderId;
}
public BaseTransaction<T> setOrderId(String orderId) {
this.orderId = orderId;
return this;
}
public String getInvoiceId() {
return invoiceId;
}
public BaseTransaction<T> setInvoiceId(String invoiceId) {
this.invoiceId = invoiceId;
return this;
}
public String getTypeId() {
return typeId;
}
public BaseTransaction<T> setTypeId(String typeId) {
this.typeId = typeId;
return this;
}
public String getCustomerId() {
return customerId;
}
public BaseTransaction<T> setCustomerId(String customerId) {
this.customerId = customerId;
return this;
}
public String getMetadataId() {
return metadataId;
}
public BaseTransaction<T> setMetadataId(String metadataId) {
this.metadataId = metadataId;
return this;
}
public String getPaymentId() {
return paymentId;
}
public BaseTransaction<T> setPaymentId(String paymentId) {
this.paymentId = paymentId;
return this;
}
public String getRiskId() {
return riskId;
}
public BaseTransaction<T> setRiskId(String riskId) {
this.riskId = riskId;
return this;
}
public String getBasketId() {
return basketId;
}
public BaseTransaction<T> setBasketId(String basketId) {
this.basketId = basketId;
return this;
}
public String getPaypageId() {
return paypageId;
}
public BaseTransaction<T> setPaypageId(String paypageId) {
this.paypageId = paypageId;
return this;
}
public String getPaymentReference() {
return paymentReference;
}
public BaseTransaction<T> setPaymentReference(String paymentReference) {
this.paymentReference = paymentReference;
return this;
}
public Status getStatus() {
return status;
}
public BaseTransaction<T> setStatus(Status status) {
this.status = status;
return this;
}
public URL getRedirectUrl() {
return redirectUrl;
}
public void setRedirectUrl(URL redirectUrl) {
this.redirectUrl = redirectUrl;
}
public String getTraceId() {
return traceId;
}
public BaseTransaction<T> setTraceId(String traceId) {
this.traceId = traceId;
return this;
}
public Message getMessage() {
return message;
}
public BaseTransaction<T> setMessage(Message message) {
this.message = message;
return this;
}
public Date getDate() {
return date;
}
public BaseTransaction<T> setDate(Date date) {
this.date = date;
return this;
}
public String getType() {
return type;
}
public BaseTransaction<T> setType(String type) {
this.type = type;
return this;
}
public AdditionalTransactionData getAdditionalTransactionData() {
return additionalTransactionData;
}
public BaseTransaction<T> setAdditionalTransactionData(
AdditionalTransactionData additionalTransactionData) {
this.additionalTransactionData = additionalTransactionData;
return this;
}
public URL getResourceUrl() {
return resourceUrl;
}
public BaseTransaction<T> setResourceUrl(URL resourceUrl) {
this.resourceUrl = resourceUrl;
return this;
}
@Override
public String getUrl() {
String partialResult = getPaymentId() == null
? getTransactionUrl().replaceAll(PAYMENT_ID_TOKEN + "/", "")
: getTransactionUrl().replaceAll(PAYMENT_ID_TOKEN, getPaymentId());
return partialResult
.replaceAll(TRANSACTION_ID_TOKEN, getId() == null ? "" : getId());
}
protected abstract String getTransactionUrl();
public T getPayment() {
return payment;
}
public BaseTransaction<T> setPayment(T payment) {
this.payment = payment;
return this;
}
@Deprecated
public Unzer getUnzer() {
return unzer;
}
@Deprecated
public BaseTransaction<T> setUnzer(Unzer unzer) {
this.unzer = unzer;
return this;
}
public enum Status {
SUCCESS, PENDING, ERROR, RESUMED
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.