quivio-transaction-processor 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/libs/emvCardReaderLib/src/main/java/com/rohan/emvcardreaderlib/PosTransResponse.kt +20 -46
- package/libs/emvCardReaderLib/src/main/java/com/rohan/emvcardreaderlib/XMLResponseExtractor.kt +55 -85
- package/libs/emvNative/src/main/java/com/quivio_transaction_processor/DsiEMVManagerModule.kt +20 -43
- package/package.json +1 -1
|
@@ -37,95 +37,69 @@ enum class ErrorCode(val code: String) {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
data class SaleTransactionResponse(
|
|
40
|
-
//
|
|
40
|
+
// CmdResponse section
|
|
41
41
|
val responseOrigin: String,
|
|
42
42
|
val dsixReturnCode: String,
|
|
43
43
|
val cmdStatus: String,
|
|
44
44
|
val textResponse: String,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
// Transaction details
|
|
45
|
+
|
|
46
|
+
// TranResponse section
|
|
49
47
|
val merchantID: String,
|
|
48
|
+
val payAPIId: String,
|
|
50
49
|
val acctNo: String,
|
|
51
50
|
val cardType: String,
|
|
52
51
|
val tranCode: String,
|
|
53
52
|
val authCode: String,
|
|
53
|
+
val avsResult: String,
|
|
54
|
+
val cvvResult: String,
|
|
54
55
|
val captureStatus: String,
|
|
55
56
|
val refNo: String,
|
|
56
|
-
val invoiceNo: String,
|
|
57
|
-
|
|
58
|
-
// Amount fields
|
|
59
57
|
val amount: Amount,
|
|
60
|
-
|
|
61
|
-
// Additional transaction data
|
|
58
|
+
val cardholderName: String,
|
|
62
59
|
val acqRefData: String,
|
|
60
|
+
val processorToken: String,
|
|
63
61
|
val processData: String,
|
|
64
62
|
val recordNo: String,
|
|
63
|
+
val recurringData: String,
|
|
65
64
|
val entryMethod: String,
|
|
66
65
|
val date: String,
|
|
67
66
|
val time: String,
|
|
68
|
-
val
|
|
69
|
-
|
|
70
|
-
// EMV specific fields
|
|
71
|
-
val aid: String,
|
|
72
|
-
val tvr: String,
|
|
73
|
-
val iad: String,
|
|
74
|
-
val tsi: String,
|
|
75
|
-
val arc: String,
|
|
76
|
-
val cvm: String,
|
|
77
|
-
val payAPIId: String
|
|
67
|
+
val cvm: String
|
|
78
68
|
)
|
|
79
69
|
|
|
80
70
|
data class Amount(
|
|
81
71
|
val purchase: String,
|
|
82
|
-
val
|
|
83
|
-
val authorize: String,
|
|
84
|
-
val cashback: String
|
|
72
|
+
val authorize: String
|
|
85
73
|
)
|
|
86
|
-
|
|
87
74
|
data class RecurringTransactionResponse(
|
|
88
|
-
//
|
|
75
|
+
// CmdResponse section
|
|
89
76
|
val responseOrigin: String,
|
|
90
77
|
val dsixReturnCode: String,
|
|
91
78
|
val cmdStatus: String,
|
|
92
79
|
val textResponse: String,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
// Transaction details
|
|
80
|
+
|
|
81
|
+
// TranResponse section
|
|
97
82
|
val merchantID: String,
|
|
83
|
+
val payAPIId: String,
|
|
98
84
|
val acctNo: String,
|
|
99
85
|
val cardType: String,
|
|
100
86
|
val tranCode: String,
|
|
101
87
|
val authCode: String,
|
|
88
|
+
val avsResult: String,
|
|
89
|
+
val cvvResult: String,
|
|
102
90
|
val captureStatus: String,
|
|
103
91
|
val refNo: String,
|
|
104
|
-
val invoiceNo: String,
|
|
105
|
-
|
|
106
|
-
// Amount fields
|
|
107
92
|
val amount: Amount,
|
|
108
|
-
|
|
109
|
-
// Additional transaction data
|
|
93
|
+
val cardholderName: String,
|
|
110
94
|
val acqRefData: String,
|
|
95
|
+
val processorToken: String,
|
|
111
96
|
val processData: String,
|
|
112
|
-
val cardHolderID: String,
|
|
113
97
|
val recordNo: String,
|
|
114
|
-
val cardholderName: String,
|
|
115
98
|
val recurringData: String,
|
|
116
99
|
val entryMethod: String,
|
|
117
100
|
val date: String,
|
|
118
101
|
val time: String,
|
|
119
|
-
val
|
|
120
|
-
|
|
121
|
-
// EMV specific fields
|
|
122
|
-
val aid: String,
|
|
123
|
-
val tvr: String,
|
|
124
|
-
val iad: String,
|
|
125
|
-
val tsi: String,
|
|
126
|
-
val arc: String,
|
|
127
|
-
val cvm: String,
|
|
128
|
-
val payAPIId: String
|
|
102
|
+
val cvm: String
|
|
129
103
|
)
|
|
130
104
|
|
|
131
105
|
data class ZeroAuthTransactionResponse(
|
package/libs/emvCardReaderLib/src/main/java/com/rohan/emvcardreaderlib/XMLResponseExtractor.kt
CHANGED
|
@@ -29,51 +29,38 @@ class XMLResponseExtractor {
|
|
|
29
29
|
// build the amount object
|
|
30
30
|
val amount = Amount(
|
|
31
31
|
purchase = tag("Purchase").ifEmpty { "0.00" },
|
|
32
|
-
gratuity = tag("Gratuity").ifEmpty { "0.00" },
|
|
33
32
|
authorize = tag("Authorize").ifEmpty { "0.00" },
|
|
34
|
-
cashback = tag("Cashback").ifEmpty { "0.00" }
|
|
35
33
|
)
|
|
36
34
|
|
|
37
|
-
// construct the response in one go
|
|
38
35
|
SaleTransactionResponse(
|
|
39
|
-
//
|
|
36
|
+
// CmdResponse section
|
|
40
37
|
responseOrigin = tag("ResponseOrigin"),
|
|
41
|
-
dsixReturnCode
|
|
42
|
-
cmdStatus
|
|
43
|
-
textResponse
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
applicationLabel= tag("ApplicationLabel"),
|
|
68
|
-
|
|
69
|
-
// EMV specific fields
|
|
70
|
-
aid = tag("AID"),
|
|
71
|
-
tvr = tag("TVR"),
|
|
72
|
-
iad = tag("IAD"),
|
|
73
|
-
tsi = tag("TSI"),
|
|
74
|
-
arc = tag("ARC"),
|
|
75
|
-
cvm = tag("CVM"),
|
|
76
|
-
payAPIId = tag("PayAPI_Id")
|
|
38
|
+
dsixReturnCode = tag("DSIXReturnCode"),
|
|
39
|
+
cmdStatus = tag("CmdStatus"),
|
|
40
|
+
textResponse = tag("TextResponse"),
|
|
41
|
+
|
|
42
|
+
// TranResponse section
|
|
43
|
+
merchantID = tag("MerchantID"),
|
|
44
|
+
payAPIId = tag("PayAPI_Id"),
|
|
45
|
+
acctNo = tag("AcctNo"),
|
|
46
|
+
cardType = tag("CardType"),
|
|
47
|
+
tranCode = tag("TranCode"),
|
|
48
|
+
authCode = tag("AuthCode"),
|
|
49
|
+
avsResult = tag("AVSResult"),
|
|
50
|
+
cvvResult = tag("CVVResult"),
|
|
51
|
+
captureStatus = tag("CaptureStatus"),
|
|
52
|
+
refNo = tag("RefNo"),
|
|
53
|
+
amount = amount,
|
|
54
|
+
cardholderName = tag("CardholderName"),
|
|
55
|
+
acqRefData = tag("AcqRefData"),
|
|
56
|
+
processorToken = tag("ProcessorToken"),
|
|
57
|
+
processData = tag("ProcessData"),
|
|
58
|
+
recordNo = tag("RecordNo"),
|
|
59
|
+
recurringData = tag("RecurringData"),
|
|
60
|
+
entryMethod = tag("EntryMethod"),
|
|
61
|
+
date = tag("Date"),
|
|
62
|
+
time = tag("Time"),
|
|
63
|
+
cvm = tag("CVM"),
|
|
77
64
|
).also {
|
|
78
65
|
Log.d(TAG, "Successfully extracted SaleTransactionResponse from XML")
|
|
79
66
|
}
|
|
@@ -93,53 +80,38 @@ class XMLResponseExtractor {
|
|
|
93
80
|
|
|
94
81
|
val amount = Amount(
|
|
95
82
|
purchase = tag("Purchase").ifEmpty { "0.00" },
|
|
96
|
-
gratuity = tag("Gratuity").ifEmpty { "0.00" },
|
|
97
83
|
authorize = tag("Authorize").ifEmpty { "0.00" },
|
|
98
|
-
cashback = tag("Cashback").ifEmpty { "0.00" }
|
|
99
84
|
)
|
|
100
85
|
// construct the comprehensive response
|
|
101
86
|
RecurringTransactionResponse(
|
|
102
|
-
//
|
|
87
|
+
// CmdResponse section
|
|
103
88
|
responseOrigin = tag("ResponseOrigin"),
|
|
104
|
-
dsixReturnCode
|
|
105
|
-
cmdStatus
|
|
106
|
-
textResponse
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
entryMethod = tag("EntryMethod"),
|
|
131
|
-
date = tag("Date"),
|
|
132
|
-
time = tag("Time"),
|
|
133
|
-
applicationLabel= tag("ApplicationLabel"),
|
|
134
|
-
|
|
135
|
-
// EMV specific fields
|
|
136
|
-
aid = tag("AID"),
|
|
137
|
-
tvr = tag("TVR"),
|
|
138
|
-
iad = tag("IAD"),
|
|
139
|
-
tsi = tag("TSI"),
|
|
140
|
-
arc = tag("ARC"),
|
|
141
|
-
cvm = tag("CVM"),
|
|
142
|
-
payAPIId = tag("PayAPI_Id")
|
|
89
|
+
dsixReturnCode = tag("DSIXReturnCode"),
|
|
90
|
+
cmdStatus = tag("CmdStatus"),
|
|
91
|
+
textResponse = tag("TextResponse"),
|
|
92
|
+
|
|
93
|
+
// TranResponse section
|
|
94
|
+
merchantID = tag("MerchantID"),
|
|
95
|
+
payAPIId = tag("PayAPI_Id"),
|
|
96
|
+
acctNo = tag("AcctNo"),
|
|
97
|
+
cardType = tag("CardType"),
|
|
98
|
+
tranCode = tag("TranCode"),
|
|
99
|
+
authCode = tag("AuthCode"),
|
|
100
|
+
avsResult = tag("AVSResult"),
|
|
101
|
+
cvvResult = tag("CVVResult"),
|
|
102
|
+
captureStatus = tag("CaptureStatus"),
|
|
103
|
+
refNo = tag("RefNo"),
|
|
104
|
+
amount = amount,
|
|
105
|
+
cardholderName = tag("CardholderName"),
|
|
106
|
+
acqRefData = tag("AcqRefData"),
|
|
107
|
+
processorToken = tag("ProcessorToken"),
|
|
108
|
+
processData = tag("ProcessData"),
|
|
109
|
+
recordNo = tag("RecordNo"),
|
|
110
|
+
recurringData = tag("RecurringData"),
|
|
111
|
+
entryMethod = tag("EntryMethod"),
|
|
112
|
+
date = tag("Date"),
|
|
113
|
+
time = tag("Time"),
|
|
114
|
+
cvm = tag("CVM")
|
|
143
115
|
).also {
|
|
144
116
|
Log.d(TAG, "Successfully extracted ComprehensiveTransactionResponse from XML")
|
|
145
117
|
}
|
|
@@ -159,9 +131,7 @@ class XMLResponseExtractor {
|
|
|
159
131
|
|
|
160
132
|
val amount = Amount(
|
|
161
133
|
purchase = tag("Purchase").ifEmpty { "0.00" },
|
|
162
|
-
|
|
163
|
-
authorize = tag("Authorize").ifEmpty { "0.00" },
|
|
164
|
-
cashback = tag("Cashback").ifEmpty { "0.00" }
|
|
134
|
+
authorize = tag("Authorize").ifEmpty { "0.00" }
|
|
165
135
|
)
|
|
166
136
|
// construct the comprehensive response
|
|
167
137
|
ZeroAuthTransactionResponse(
|
package/libs/emvNative/src/main/java/com/quivio_transaction_processor/DsiEMVManagerModule.kt
CHANGED
|
@@ -162,49 +162,40 @@ class DsiEMVManagerModule(private val reactContext: ReactApplicationContext) :
|
|
|
162
162
|
override fun onSaleTransactionCompleted(saleDetails: SaleTransactionResponse) {
|
|
163
163
|
Log.d("DsiEMVManagerModule", "onSaleTransactionCompleted")
|
|
164
164
|
val map = Arguments.createMap().apply {
|
|
165
|
-
//
|
|
165
|
+
// CmdResponse section
|
|
166
166
|
putString("responseOrigin", saleDetails.responseOrigin)
|
|
167
167
|
putString("dsixReturnCode", saleDetails.dsixReturnCode)
|
|
168
168
|
putString("cmdStatus", saleDetails.cmdStatus)
|
|
169
169
|
putString("textResponse", saleDetails.textResponse)
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
// Transaction details
|
|
170
|
+
|
|
171
|
+
// TranResponse section
|
|
174
172
|
putString("merchantID", saleDetails.merchantID)
|
|
173
|
+
putString("payAPIId", saleDetails.payAPIId)
|
|
175
174
|
putString("acctNo", saleDetails.acctNo)
|
|
176
175
|
putString("cardType", saleDetails.cardType)
|
|
177
176
|
putString("tranCode", saleDetails.tranCode)
|
|
178
177
|
putString("authCode", saleDetails.authCode)
|
|
178
|
+
putString("avsResult", saleDetails.avsResult)
|
|
179
|
+
putString("cvvResult", saleDetails.cvvResult)
|
|
179
180
|
putString("captureStatus", saleDetails.captureStatus)
|
|
180
181
|
putString("refNo", saleDetails.refNo)
|
|
181
|
-
|
|
182
|
-
|
|
182
|
+
|
|
183
183
|
// Amount fields
|
|
184
184
|
putMap("amount", Arguments.createMap().apply {
|
|
185
185
|
putString("purchase", saleDetails.amount.purchase)
|
|
186
|
-
putString("gratuity", saleDetails.amount.gratuity)
|
|
187
186
|
putString("authorize", saleDetails.amount.authorize)
|
|
188
|
-
putString("cashback", saleDetails.amount.cashback)
|
|
189
187
|
})
|
|
190
188
|
|
|
191
|
-
|
|
189
|
+
putString("cardholderName", saleDetails.cardholderName)
|
|
192
190
|
putString("acqRefData", saleDetails.acqRefData)
|
|
191
|
+
putString("processorToken", saleDetails.processorToken)
|
|
193
192
|
putString("processData", saleDetails.processData)
|
|
194
193
|
putString("recordNo", saleDetails.recordNo)
|
|
194
|
+
putString("recurringData", saleDetails.recurringData)
|
|
195
195
|
putString("entryMethod", saleDetails.entryMethod)
|
|
196
196
|
putString("date", saleDetails.date)
|
|
197
197
|
putString("time", saleDetails.time)
|
|
198
|
-
putString("applicationLabel", saleDetails.applicationLabel)
|
|
199
|
-
|
|
200
|
-
// EMV specific fields
|
|
201
|
-
putString("aid", saleDetails.aid)
|
|
202
|
-
putString("tvr", saleDetails.tvr)
|
|
203
|
-
putString("iad", saleDetails.iad)
|
|
204
|
-
putString("tsi", saleDetails.tsi)
|
|
205
|
-
putString("arc", saleDetails.arc)
|
|
206
198
|
putString("cvm", saleDetails.cvm)
|
|
207
|
-
putString("payAPIId", saleDetails.payAPIId)
|
|
208
199
|
}
|
|
209
200
|
sendEvent("onSaleTransactionCompleted", map)
|
|
210
201
|
}
|
|
@@ -212,52 +203,40 @@ class DsiEMVManagerModule(private val reactContext: ReactApplicationContext) :
|
|
|
212
203
|
override fun onRecurringSaleCompleted(recurringDetails: RecurringTransactionResponse) {
|
|
213
204
|
Log.d("DsiEMVManagerModule", "onRecurringSaleCompleted")
|
|
214
205
|
val map = Arguments.createMap().apply {
|
|
215
|
-
//
|
|
206
|
+
// CmdResponse section
|
|
216
207
|
putString("responseOrigin", recurringDetails.responseOrigin)
|
|
217
208
|
putString("dsixReturnCode", recurringDetails.dsixReturnCode)
|
|
218
209
|
putString("cmdStatus", recurringDetails.cmdStatus)
|
|
219
210
|
putString("textResponse", recurringDetails.textResponse)
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
// Transaction details
|
|
211
|
+
|
|
212
|
+
// TranResponse section
|
|
224
213
|
putString("merchantID", recurringDetails.merchantID)
|
|
214
|
+
putString("payAPIId", recurringDetails.payAPIId)
|
|
225
215
|
putString("acctNo", recurringDetails.acctNo)
|
|
226
216
|
putString("cardType", recurringDetails.cardType)
|
|
227
217
|
putString("tranCode", recurringDetails.tranCode)
|
|
228
218
|
putString("authCode", recurringDetails.authCode)
|
|
219
|
+
putString("avsResult", recurringDetails.avsResult)
|
|
220
|
+
putString("cvvResult", recurringDetails.cvvResult)
|
|
229
221
|
putString("captureStatus", recurringDetails.captureStatus)
|
|
230
222
|
putString("refNo", recurringDetails.refNo)
|
|
231
|
-
|
|
232
|
-
|
|
223
|
+
|
|
233
224
|
// Amount fields
|
|
234
225
|
putMap("amount", Arguments.createMap().apply {
|
|
235
226
|
putString("purchase", recurringDetails.amount.purchase)
|
|
236
|
-
putString("gratuity", recurringDetails.amount.gratuity)
|
|
237
227
|
putString("authorize", recurringDetails.amount.authorize)
|
|
238
|
-
putString("cashback", recurringDetails.amount.cashback)
|
|
239
228
|
})
|
|
240
|
-
|
|
241
|
-
|
|
229
|
+
|
|
230
|
+
putString("cardholderName", recurringDetails.cardholderName)
|
|
242
231
|
putString("acqRefData", recurringDetails.acqRefData)
|
|
232
|
+
putString("processorToken", recurringDetails.processorToken)
|
|
243
233
|
putString("processData", recurringDetails.processData)
|
|
244
|
-
putString("cardHolderID", recurringDetails.cardHolderID)
|
|
245
234
|
putString("recordNo", recurringDetails.recordNo)
|
|
246
|
-
putString("cardholderName", recurringDetails.cardholderName)
|
|
247
235
|
putString("recurringData", recurringDetails.recurringData)
|
|
248
236
|
putString("entryMethod", recurringDetails.entryMethod)
|
|
249
237
|
putString("date", recurringDetails.date)
|
|
250
238
|
putString("time", recurringDetails.time)
|
|
251
|
-
putString("applicationLabel", recurringDetails.applicationLabel)
|
|
252
|
-
|
|
253
|
-
// EMV specific fields
|
|
254
|
-
putString("aid", recurringDetails.aid)
|
|
255
|
-
putString("tvr", recurringDetails.tvr)
|
|
256
|
-
putString("iad", recurringDetails.iad)
|
|
257
|
-
putString("tsi", recurringDetails.tsi)
|
|
258
|
-
putString("arc", recurringDetails.arc)
|
|
259
239
|
putString("cvm", recurringDetails.cvm)
|
|
260
|
-
putString("payAPIId", recurringDetails.payAPIId)
|
|
261
240
|
}
|
|
262
241
|
sendEvent("onRecurringSaleCompleted", map)
|
|
263
242
|
}
|
|
@@ -285,9 +264,7 @@ class DsiEMVManagerModule(private val reactContext: ReactApplicationContext) :
|
|
|
285
264
|
// Amount fields
|
|
286
265
|
putMap("amount", Arguments.createMap().apply {
|
|
287
266
|
putString("purchase", zeroAuthData.amount.purchase)
|
|
288
|
-
putString("gratuity", zeroAuthData.amount.gratuity)
|
|
289
267
|
putString("authorize", zeroAuthData.amount.authorize)
|
|
290
|
-
putString("cashback", zeroAuthData.amount.cashback)
|
|
291
268
|
})
|
|
292
269
|
|
|
293
270
|
// Additional transaction data
|