paynl-pos-sdk-react-native 0.0.72 → 0.0.74
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.
|
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
|
|
|
17
17
|
s.source_files = "ios/**/*.{h,mm,swift}"
|
|
18
18
|
s.private_header_files = "ios/**/*.h"
|
|
19
19
|
|
|
20
|
-
s.dependency 'PayNlPOSSdkSwift', '~> 0.0.
|
|
20
|
+
s.dependency 'PayNlPOSSdkSwift', '~> 0.0.33'
|
|
21
21
|
|
|
22
22
|
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
23
23
|
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import android.annotation.SuppressLint
|
|
2
|
-
import android.util.Log
|
|
3
2
|
import com.facebook.react.bridge.ReactContext
|
|
4
3
|
import com.facebook.react.bridge.ReadableMap
|
|
5
4
|
import com.facebook.react.bridge.WritableNativeMap
|
|
@@ -380,6 +379,25 @@ class PayNlUtils {
|
|
|
380
379
|
output.putString("orderId", value.orderId)
|
|
381
380
|
output.putString("reference", value.reference)
|
|
382
381
|
output.putString("ticket", value.ticket)
|
|
382
|
+
output.putString("customerKey", value.customerKey)
|
|
383
|
+
|
|
384
|
+
val binData = value.binData
|
|
385
|
+
if (binData != null) {
|
|
386
|
+
val bin = WritableNativeMap()
|
|
387
|
+
bin.putString("anonymous", binData.anonymous)
|
|
388
|
+
bin.putString("bankId", binData.bankId)
|
|
389
|
+
bin.putString("scheme", binData.scheme)
|
|
390
|
+
bin.putString("cardType", binData.cardType)
|
|
391
|
+
bin.putString("fundType", binData.fundType)
|
|
392
|
+
bin.putString("brandCode", binData.brandCode)
|
|
393
|
+
bin.putString("brandName", binData.brandName)
|
|
394
|
+
bin.putString("brandProduct", binData.brandProduct)
|
|
395
|
+
bin.putString("countryCode", binData.countryCode)
|
|
396
|
+
|
|
397
|
+
output.putMap("binData", bin)
|
|
398
|
+
} else {
|
|
399
|
+
output.putNull("binData")
|
|
400
|
+
}
|
|
383
401
|
|
|
384
402
|
return output
|
|
385
403
|
}
|
|
@@ -98,14 +98,37 @@ import PayNlPOSSdkSwift
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
let result = try await self.posService.startPayment(transaction: transaction, service: service)
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
101
|
+
var output: [String: Any] = [
|
|
102
|
+
"statusAction": result.statusAction.rawValue,
|
|
103
|
+
"transactionId": result.transactionId,
|
|
104
|
+
"payerMessage": result.payerMessage,
|
|
105
|
+
"orderId": result.orderId,
|
|
106
|
+
"ticket": result.ticket
|
|
107
|
+
]
|
|
108
|
+
|
|
109
|
+
if let reference = result.reference {
|
|
110
|
+
output["reference"] = reference
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if let customerKey = result.customerKey {
|
|
114
|
+
output["customerKey"] = customerKey
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if let binData = result.binData {
|
|
118
|
+
output["binData"] = [
|
|
119
|
+
"anonymous": binData.anonymous,
|
|
120
|
+
"bankId": binData.bankId,
|
|
121
|
+
"brandCode": binData.brandCode,
|
|
122
|
+
"brandName": binData.brandName,
|
|
123
|
+
"brandProduct": binData.brandProduct,
|
|
124
|
+
"cardType": binData.cardType,
|
|
125
|
+
"countryCode": binData.countryCode,
|
|
126
|
+
"fundType": binData.fundType,
|
|
127
|
+
"scheme": binData.scheme
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
resolve(output)
|
|
109
132
|
|
|
110
133
|
} catch {
|
|
111
134
|
if let error = error as? PayNlSVError {
|