judokit-react-native 3.5.0 → 4.1.0
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/JudoPay.tsx +33 -37
- package/RNJudopay.podspec +1 -1
- package/android/build.gradle +113 -124
- package/android/src/main/java/com/reactlibrary/Extensions.kt +153 -386
- package/android/src/main/java/com/reactlibrary/Helpers.kt +79 -21
- package/ios/.xcode.env +11 -0
- package/ios/Classes/RNJudo.m +1 -1
- package/ios/Classes/Wrappers/RNWrappers.m +23 -34
- package/ios/Podfile +28 -58
- package/ios/Podfile.lock +419 -210
- package/ios/RNJudo.xcodeproj/project.pbxproj +21 -22
- package/ios/RNJudo.xcodeproj/xcshareddata/xcschemes/RNJudo.xcscheme +1 -1
- package/package.json +29 -25
- package/types/JudoGooglePayTypes.tsx +21 -3
- package/types/JudoTypes.tsx +10 -6
|
@@ -13,43 +13,67 @@ const val CARD_SCHEME_VISA = "visa"
|
|
|
13
13
|
const val CARD_SCHEME_MASTERCARD = "mastercard"
|
|
14
14
|
const val CARD_SCHEME_AMEX = "amex"
|
|
15
15
|
|
|
16
|
-
internal fun ReadableMap?.hasKey(key: String): Boolean
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
internal fun ReadableMap?.hasKey(key: String): Boolean = this?.hasKey(key) ?: false
|
|
17
|
+
|
|
18
|
+
internal fun ReadableMap?.getOptionalString(key: String): String? = if (hasKey(key)) {
|
|
19
|
+
this?.getString(key)
|
|
20
|
+
} else {
|
|
21
|
+
null
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
internal fun ReadableMap?.getOptionalBoolean(key: String): Boolean? = if (hasKey(key)) {
|
|
25
|
+
this?.getBoolean(key)
|
|
26
|
+
} else {
|
|
27
|
+
null
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
internal fun ReadableMap?.getOptionalInt(key: String): Int? = if (hasKey(key)) {
|
|
31
|
+
this?.getInt(key)
|
|
32
|
+
} else {
|
|
33
|
+
null
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
internal fun ReadableMap?.getOptionalDouble(key: String): Double? = if (hasKey(key)) {
|
|
37
|
+
this?.getDouble(key)
|
|
38
|
+
} else {
|
|
39
|
+
null
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
internal fun ReadableMap?.getOptionalMap(key: String): ReadableMap? = if (hasKey(key)) {
|
|
43
|
+
this?.getMap(key)
|
|
44
|
+
} else {
|
|
45
|
+
null
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
internal fun ReadableMap?.getOptionalArray(key: String): ReadableArray? = if (hasKey(key)) {
|
|
49
|
+
this?.getArray(key)
|
|
50
|
+
} else {
|
|
51
|
+
null
|
|
21
52
|
}
|
|
22
53
|
|
|
23
54
|
internal val ReadableMap.configuration: ReadableMap?
|
|
24
|
-
get() =
|
|
55
|
+
get() = getOptionalMap("configuration")
|
|
25
56
|
|
|
26
57
|
internal val ReadableMap.transactionMode: Int?
|
|
27
|
-
get() =
|
|
58
|
+
get() = getOptionalInt("transactionMode")
|
|
28
59
|
|
|
29
60
|
internal val ReadableMap.authorization: ReadableMap?
|
|
30
|
-
get() =
|
|
61
|
+
get() = getOptionalMap("authorization")
|
|
31
62
|
|
|
32
63
|
internal val ReadableMap.isSandboxed: Boolean?
|
|
33
|
-
get() =
|
|
64
|
+
get() = getOptionalBoolean("sandboxed")
|
|
65
|
+
|
|
66
|
+
internal val ReadableMap.packageVersion: String?
|
|
67
|
+
get() = getOptionalString("packageVersion")
|
|
34
68
|
|
|
35
69
|
internal val ReadableMap.cardToken: String?
|
|
36
|
-
get() =
|
|
70
|
+
get() = getOptionalString("cardToken")
|
|
37
71
|
|
|
38
72
|
internal val ReadableMap.securityCode: String?
|
|
39
|
-
get()
|
|
40
|
-
if (hasKey("securityCode")) {
|
|
41
|
-
return getString("securityCode")
|
|
42
|
-
}
|
|
43
|
-
return null
|
|
44
|
-
}
|
|
73
|
+
get() = getOptionalString("securityCode")
|
|
45
74
|
|
|
46
75
|
internal val ReadableMap.cardholderName: String?
|
|
47
|
-
get()
|
|
48
|
-
if (hasKey("cardholderName")) {
|
|
49
|
-
return getString("cardholderName")
|
|
50
|
-
}
|
|
51
|
-
return null
|
|
52
|
-
}
|
|
76
|
+
get() = getOptionalString("cardholderName")
|
|
53
77
|
|
|
54
78
|
internal val ReadableMap.cardType: CardNetwork
|
|
55
79
|
get() {
|
|
@@ -60,7 +84,7 @@ internal val ReadableMap.cardType: CardNetwork
|
|
|
60
84
|
}
|
|
61
85
|
|
|
62
86
|
return when {
|
|
63
|
-
cardScheme.contains(CARD_SCHEME_VISA)
|
|
87
|
+
cardScheme.contains(CARD_SCHEME_VISA) -> CardNetwork.VISA
|
|
64
88
|
cardScheme.contains(CARD_SCHEME_MASTERCARD) -> CardNetwork.MASTERCARD
|
|
65
89
|
cardScheme.contains(CARD_SCHEME_AMEX) -> CardNetwork.AMEX
|
|
66
90
|
else -> CardNetwork.OTHER
|
|
@@ -68,537 +92,280 @@ internal val ReadableMap.cardType: CardNetwork
|
|
|
68
92
|
}
|
|
69
93
|
|
|
70
94
|
internal val ReadableMap.judoId: String?
|
|
71
|
-
get() = configuration?.
|
|
95
|
+
get() = configuration?.getOptionalString("judoId")
|
|
72
96
|
|
|
73
97
|
internal val ReadableMap.receiptId: String?
|
|
74
|
-
get() =
|
|
98
|
+
get() = getOptionalString("receiptId")
|
|
75
99
|
|
|
76
100
|
internal val ReadableMap.token: String?
|
|
77
|
-
get() = authorization?.
|
|
101
|
+
get() = authorization?.getOptionalString("token")
|
|
78
102
|
|
|
79
103
|
internal val ReadableMap.secret: String?
|
|
80
|
-
get() = authorization?.
|
|
104
|
+
get() = authorization?.getOptionalString("secret")
|
|
81
105
|
|
|
82
106
|
internal val ReadableMap.paymentSession: String?
|
|
83
|
-
get() = authorization?.
|
|
107
|
+
get() = authorization?.getOptionalString("paymentSession")
|
|
84
108
|
|
|
85
109
|
internal val ReadableMap.amount: ReadableMap?
|
|
86
|
-
get() = configuration?.
|
|
110
|
+
get() = configuration?.getOptionalMap("amount")
|
|
87
111
|
|
|
88
112
|
internal val ReadableMap.amountValue: String?
|
|
89
|
-
get() = amount?.
|
|
113
|
+
get() = amount?.getOptionalString("value")
|
|
90
114
|
|
|
91
115
|
internal val ReadableMap.currencyValue: String?
|
|
92
|
-
get() = amount?.
|
|
116
|
+
get() = amount?.getOptionalString("currency")
|
|
93
117
|
|
|
94
118
|
internal val ReadableMap.reference: ReadableMap?
|
|
95
|
-
get() = configuration?.
|
|
119
|
+
get() = configuration?.getOptionalMap("reference")
|
|
96
120
|
|
|
97
121
|
internal val ReadableMap.consumerReference: String?
|
|
98
|
-
get() = reference?.
|
|
122
|
+
get() = reference?.getOptionalString("consumerReference")
|
|
99
123
|
|
|
100
124
|
internal val ReadableMap.paymentReference: String?
|
|
101
|
-
get() = reference?.
|
|
125
|
+
get() = reference?.getOptionalString("paymentReference")
|
|
102
126
|
|
|
103
127
|
internal val ReadableMap.isInitialRecurringPayment: Boolean?
|
|
104
|
-
get() = configuration?.
|
|
128
|
+
get() = configuration?.getOptionalBoolean("isInitialRecurringPayment")
|
|
105
129
|
|
|
106
130
|
internal val ReadableMap.isDelayedAuthorisation: Boolean?
|
|
107
|
-
get() = configuration?.
|
|
131
|
+
get() = configuration?.getOptionalBoolean("isDelayedAuthorisation")
|
|
108
132
|
|
|
109
133
|
internal val ReadableMap.networkTimeout: ReadableMap?
|
|
110
|
-
get()
|
|
111
|
-
if (configuration.hasKey("networkTimeout")) {
|
|
112
|
-
return configuration?.getMap("networkTimeout")
|
|
113
|
-
}
|
|
114
|
-
return null
|
|
115
|
-
}
|
|
134
|
+
get() = configuration?.getOptionalMap("networkTimeout")
|
|
116
135
|
|
|
117
136
|
internal val ReadableMap.cardAddress: ReadableMap?
|
|
118
|
-
get()
|
|
119
|
-
if (configuration.hasKey("cardAddress")) {
|
|
120
|
-
return configuration?.getMap("cardAddress")
|
|
121
|
-
}
|
|
122
|
-
return null
|
|
123
|
-
}
|
|
137
|
+
get() = configuration?.getOptionalMap("cardAddress")
|
|
124
138
|
|
|
125
139
|
internal val ReadableMap.cardAddressLine1: String?
|
|
126
|
-
get()
|
|
127
|
-
if (cardAddress.hasKey("line1")) {
|
|
128
|
-
return cardAddress?.getString("line1")
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
return null
|
|
132
|
-
}
|
|
140
|
+
get() = cardAddress?.getOptionalString("line1")
|
|
133
141
|
|
|
134
142
|
internal val ReadableMap.cardAddressLine2: String?
|
|
135
|
-
get()
|
|
136
|
-
if (cardAddress.hasKey("line2")) {
|
|
137
|
-
return cardAddress?.getString("line2")
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
return null
|
|
141
|
-
}
|
|
143
|
+
get() = cardAddress?.getOptionalString("line2")
|
|
142
144
|
|
|
143
145
|
internal val ReadableMap.cardAddressLine3: String?
|
|
144
|
-
get()
|
|
145
|
-
if (cardAddress.hasKey("line3")) {
|
|
146
|
-
return cardAddress?.getString("line3")
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
return null
|
|
150
|
-
}
|
|
146
|
+
get() = cardAddress?.getOptionalString("line3")
|
|
151
147
|
|
|
152
148
|
internal val ReadableMap.cardAddressPostCode: String?
|
|
153
|
-
get()
|
|
154
|
-
if (cardAddress.hasKey("postCode")) {
|
|
155
|
-
return cardAddress?.getString("postCode")
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
return null
|
|
159
|
-
}
|
|
149
|
+
get() = cardAddress?.getOptionalString("postCode")
|
|
160
150
|
|
|
161
151
|
internal val ReadableMap.cardAddressTown: String?
|
|
162
|
-
get()
|
|
163
|
-
if (cardAddress.hasKey("town")) {
|
|
164
|
-
return cardAddress?.getString("town")
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
return null
|
|
168
|
-
}
|
|
152
|
+
get() = cardAddress?.getOptionalString("town")
|
|
169
153
|
|
|
170
154
|
internal val ReadableMap.cardAddressCountryCode: Int?
|
|
171
|
-
get()
|
|
172
|
-
if (cardAddress.hasKey("countryCode")) {
|
|
173
|
-
return cardAddress?.getInt("countryCode")
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
return null
|
|
177
|
-
}
|
|
155
|
+
get() = cardAddress?.getOptionalInt("countryCode")
|
|
178
156
|
|
|
179
157
|
internal val ReadableMap.cardAddressState: String?
|
|
180
|
-
get()
|
|
181
|
-
if (cardAddress.hasKey("state")) {
|
|
182
|
-
return cardAddress?.getString("state")
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
return null
|
|
186
|
-
}
|
|
158
|
+
get() = cardAddress?.getOptionalString("state")
|
|
187
159
|
|
|
188
160
|
internal val ReadableMap.networkConnectTimeout: Long?
|
|
189
|
-
get() = networkTimeout?.
|
|
161
|
+
get() = networkTimeout?.getOptionalDouble("connectTimeout")?.toLong()
|
|
190
162
|
|
|
191
163
|
internal val ReadableMap.networkReadTimeout: Long?
|
|
192
|
-
get() = networkTimeout?.
|
|
164
|
+
get() = networkTimeout?.getOptionalDouble("readTimeout")?.toLong()
|
|
193
165
|
|
|
194
166
|
internal val ReadableMap.networkWriteTimeout: Long?
|
|
195
|
-
get() = networkTimeout?.
|
|
167
|
+
get() = networkTimeout?.getOptionalDouble("writeTimeout")?.toLong()
|
|
196
168
|
|
|
197
169
|
internal val ReadableMap.challengeRequestIndicator: String?
|
|
198
|
-
get()
|
|
199
|
-
if (configuration.hasKey("challengeRequestIndicator")) {
|
|
200
|
-
return configuration?.getString("challengeRequestIndicator")
|
|
201
|
-
}
|
|
202
|
-
return null
|
|
203
|
-
}
|
|
170
|
+
get() = configuration?.getOptionalString("challengeRequestIndicator")
|
|
204
171
|
|
|
205
172
|
internal val ReadableMap.scaExemption: String?
|
|
206
|
-
get()
|
|
207
|
-
if (configuration.hasKey("scaExemption")) {
|
|
208
|
-
return configuration?.getString("scaExemption")
|
|
209
|
-
}
|
|
210
|
-
return null
|
|
211
|
-
}
|
|
173
|
+
get() = configuration?.getOptionalString("scaExemption")
|
|
212
174
|
|
|
213
175
|
internal val ReadableMap.mobileNumber: String?
|
|
214
|
-
get()
|
|
215
|
-
if (configuration.hasKey("mobileNumber")) {
|
|
216
|
-
return configuration?.getString("mobileNumber")
|
|
217
|
-
}
|
|
218
|
-
return null
|
|
219
|
-
}
|
|
176
|
+
get() = configuration?.getOptionalString("mobileNumber")
|
|
220
177
|
|
|
221
178
|
internal val ReadableMap.phoneCountryCode: String?
|
|
222
|
-
get()
|
|
223
|
-
if (configuration.hasKey("phoneCountryCode")) {
|
|
224
|
-
return configuration?.getString("phoneCountryCode")
|
|
225
|
-
}
|
|
226
|
-
return null
|
|
227
|
-
}
|
|
179
|
+
get() = configuration?.getOptionalString("phoneCountryCode")
|
|
228
180
|
|
|
229
181
|
internal val ReadableMap.emailAddress: String?
|
|
230
|
-
get()
|
|
231
|
-
if (configuration.hasKey("emailAddress")) {
|
|
232
|
-
return configuration?.getString("emailAddress")
|
|
233
|
-
}
|
|
234
|
-
return null
|
|
235
|
-
}
|
|
182
|
+
get() = configuration?.getOptionalString("emailAddress")
|
|
236
183
|
|
|
237
184
|
internal val ReadableMap.threeDSTwoMaxTimeout: Int?
|
|
238
|
-
get()
|
|
239
|
-
if (configuration.hasKey("threeDSTwoMaxTimeout")) {
|
|
240
|
-
return configuration?.getInt("threeDSTwoMaxTimeout")
|
|
241
|
-
}
|
|
242
|
-
return null
|
|
243
|
-
}
|
|
185
|
+
get() = configuration?.getOptionalInt("threeDSTwoMaxTimeout")
|
|
244
186
|
|
|
245
187
|
internal val ReadableMap.threeDSTwoMessageVersion: String?
|
|
246
|
-
get()
|
|
247
|
-
if (configuration.hasKey("threeDSTwoMessageVersion")) {
|
|
248
|
-
return configuration?.getString("threeDSTwoMessageVersion")
|
|
249
|
-
}
|
|
250
|
-
return null
|
|
251
|
-
}
|
|
188
|
+
get() = configuration?.getOptionalString("threeDSTwoMessageVersion")
|
|
252
189
|
|
|
253
190
|
internal val ReadableMap.metadata: ReadableMap?
|
|
254
|
-
get()
|
|
255
|
-
if (reference.hasKey("metadata")) {
|
|
256
|
-
return reference?.getMap("metadata")
|
|
257
|
-
}
|
|
258
|
-
return null
|
|
259
|
-
}
|
|
191
|
+
get() = reference?.getOptionalMap("metadata")
|
|
260
192
|
|
|
261
193
|
internal val ReadableMap.cardNetworkValue: Int?
|
|
262
|
-
get()
|
|
263
|
-
if (configuration.hasKey("supportedCardNetworks")) {
|
|
264
|
-
return configuration?.getInt("supportedCardNetworks")
|
|
265
|
-
}
|
|
266
|
-
return null
|
|
267
|
-
}
|
|
194
|
+
get() = configuration?.getOptionalInt("supportedCardNetworks")
|
|
268
195
|
|
|
269
196
|
internal val ReadableMap.paymentMethodValue: Int?
|
|
270
|
-
get()
|
|
271
|
-
if (configuration.hasKey("paymentMethods")) {
|
|
272
|
-
return configuration?.getInt("paymentMethods")
|
|
273
|
-
}
|
|
274
|
-
return null
|
|
275
|
-
}
|
|
197
|
+
get() = configuration?.getOptionalInt("paymentMethods")
|
|
276
198
|
|
|
277
199
|
internal val ReadableMap.uiConfiguration: ReadableMap?
|
|
278
|
-
get()
|
|
279
|
-
if (configuration.hasKey("uiConfiguration")) {
|
|
280
|
-
return configuration?.getMap("uiConfiguration")
|
|
281
|
-
}
|
|
282
|
-
return null
|
|
283
|
-
}
|
|
200
|
+
get() = configuration?.getOptionalMap("uiConfiguration")
|
|
284
201
|
|
|
285
202
|
internal val ReadableMap.threeDSUIConfiguration: ReadableMap?
|
|
286
|
-
get()
|
|
287
|
-
if (uiConfiguration.hasKey("threeDSUIConfiguration")) {
|
|
288
|
-
return uiConfiguration?.getMap("threeDSUIConfiguration")
|
|
289
|
-
}
|
|
290
|
-
return null
|
|
291
|
-
}
|
|
203
|
+
get() = uiConfiguration?.getOptionalMap("threeDSUIConfiguration")
|
|
292
204
|
|
|
293
205
|
internal val ReadableMap.threeDSUITextBoxCustomization: ReadableMap?
|
|
294
|
-
get()
|
|
295
|
-
if (threeDSUIConfiguration.hasKey("textBoxCustomization")) {
|
|
296
|
-
return threeDSUIConfiguration?.getMap("textBoxCustomization")
|
|
297
|
-
}
|
|
298
|
-
return null
|
|
299
|
-
}
|
|
206
|
+
get() = threeDSUIConfiguration?.getOptionalMap("textBoxCustomization")
|
|
300
207
|
|
|
301
208
|
internal val ReadableMap.threeDSUIButtonCustomizations: ReadableMap?
|
|
302
|
-
get()
|
|
303
|
-
if (threeDSUIConfiguration.hasKey("buttonCustomizations")) {
|
|
304
|
-
return threeDSUIConfiguration?.getMap("buttonCustomizations")
|
|
305
|
-
}
|
|
306
|
-
return null
|
|
307
|
-
}
|
|
209
|
+
get() = threeDSUIConfiguration?.getOptionalMap("buttonCustomizations")
|
|
308
210
|
|
|
309
211
|
internal val ReadableMap.threeDSUISubmitButtonCustomization: ReadableMap?
|
|
310
|
-
get()
|
|
311
|
-
if (threeDSUIButtonCustomizations.hasKey("SUBMIT")) {
|
|
312
|
-
return threeDSUIButtonCustomizations?.getMap("SUBMIT")
|
|
313
|
-
}
|
|
314
|
-
return null
|
|
315
|
-
}
|
|
212
|
+
get() = threeDSUIButtonCustomizations?.getOptionalMap("SUBMIT")
|
|
316
213
|
|
|
317
214
|
internal val ReadableMap.threeDSUIContinueButtonCustomization: ReadableMap?
|
|
318
|
-
get()
|
|
319
|
-
if (threeDSUIButtonCustomizations.hasKey("CONTINUE")) {
|
|
320
|
-
return threeDSUIButtonCustomizations?.getMap("CONTINUE")
|
|
321
|
-
}
|
|
322
|
-
return null
|
|
323
|
-
}
|
|
215
|
+
get() = threeDSUIButtonCustomizations?.getOptionalMap("CONTINUE")
|
|
324
216
|
|
|
325
217
|
internal val ReadableMap.threeDSUINextButtonCustomization: ReadableMap?
|
|
326
|
-
get()
|
|
327
|
-
if (threeDSUIButtonCustomizations.hasKey("NEXT")) {
|
|
328
|
-
return threeDSUIButtonCustomizations?.getMap("NEXT")
|
|
329
|
-
}
|
|
330
|
-
return null
|
|
331
|
-
}
|
|
218
|
+
get() = threeDSUIButtonCustomizations?.getOptionalMap("NEXT")
|
|
332
219
|
|
|
333
220
|
internal val ReadableMap.threeDSUICancelButtonCustomization: ReadableMap?
|
|
334
|
-
get()
|
|
335
|
-
if (threeDSUIButtonCustomizations.hasKey("CANCEL")) {
|
|
336
|
-
return threeDSUIButtonCustomizations?.getMap("CANCEL")
|
|
337
|
-
}
|
|
338
|
-
return null
|
|
339
|
-
}
|
|
221
|
+
get() = threeDSUIButtonCustomizations?.getOptionalMap("CANCEL")
|
|
340
222
|
|
|
341
223
|
internal val ReadableMap.threeDSUIResendButtonCustomization: ReadableMap?
|
|
342
|
-
get()
|
|
343
|
-
if (threeDSUIButtonCustomizations.hasKey("RESEND")) {
|
|
344
|
-
return threeDSUIButtonCustomizations?.getMap("RESEND")
|
|
345
|
-
}
|
|
346
|
-
return null
|
|
347
|
-
}
|
|
224
|
+
get() = threeDSUIButtonCustomizations?.getOptionalMap("RESEND")
|
|
348
225
|
|
|
349
226
|
internal val ReadableMap.threeDSUIToolbarCustomization: ReadableMap?
|
|
350
|
-
get()
|
|
351
|
-
if (threeDSUIConfiguration.hasKey("toolbarCustomization")) {
|
|
352
|
-
return threeDSUIConfiguration?.getMap("toolbarCustomization")
|
|
353
|
-
}
|
|
354
|
-
return null
|
|
355
|
-
}
|
|
227
|
+
get() = threeDSUIConfiguration?.getOptionalMap("toolbarCustomization")
|
|
356
228
|
|
|
357
229
|
internal val ReadableMap.threeDSUILabelCustomization: ReadableMap?
|
|
358
|
-
get()
|
|
359
|
-
if (threeDSUIConfiguration.hasKey("labelCustomization")) {
|
|
360
|
-
return threeDSUIConfiguration?.getMap("labelCustomization")
|
|
361
|
-
}
|
|
362
|
-
return null
|
|
363
|
-
}
|
|
230
|
+
get() = threeDSUIConfiguration?.getOptionalMap("labelCustomization")
|
|
364
231
|
|
|
365
232
|
internal val ReadableMap.textFontName: String?
|
|
366
|
-
get()
|
|
367
|
-
if (hasKey("textFontName")) {
|
|
368
|
-
return getString("textFontName")
|
|
369
|
-
}
|
|
370
|
-
return null
|
|
371
|
-
}
|
|
233
|
+
get() = getOptionalString("textFontName")
|
|
372
234
|
|
|
373
235
|
internal val ReadableMap.textColor: String?
|
|
374
|
-
get()
|
|
375
|
-
if (hasKey("textColor")) {
|
|
376
|
-
return getString("textColor")
|
|
377
|
-
}
|
|
378
|
-
return null
|
|
379
|
-
}
|
|
236
|
+
get() = getOptionalString("textColor")
|
|
380
237
|
|
|
381
238
|
internal val ReadableMap.backgroundColor: String?
|
|
382
|
-
get()
|
|
383
|
-
if (hasKey("backgroundColor")) {
|
|
384
|
-
return getString("backgroundColor")
|
|
385
|
-
}
|
|
386
|
-
return null
|
|
387
|
-
}
|
|
239
|
+
get() = getOptionalString("backgroundColor")
|
|
388
240
|
|
|
389
241
|
internal val ReadableMap.headerText: String?
|
|
390
|
-
get()
|
|
391
|
-
if (hasKey("headerText")) {
|
|
392
|
-
return getString("headerText")
|
|
393
|
-
}
|
|
394
|
-
return null
|
|
395
|
-
}
|
|
242
|
+
get() = getOptionalString("headerText")
|
|
396
243
|
|
|
397
244
|
internal val ReadableMap.buttonText: String?
|
|
398
|
-
get()
|
|
399
|
-
if (hasKey("buttonText")) {
|
|
400
|
-
return getString("buttonText")
|
|
401
|
-
}
|
|
402
|
-
return null
|
|
403
|
-
}
|
|
245
|
+
get() = getOptionalString("buttonText")
|
|
404
246
|
|
|
405
247
|
internal val ReadableMap.headingTextFontName: String?
|
|
406
|
-
get()
|
|
407
|
-
if (hasKey("headingTextFontName")) {
|
|
408
|
-
return getString("headingTextFontName")
|
|
409
|
-
}
|
|
410
|
-
return null
|
|
411
|
-
}
|
|
248
|
+
get() = getOptionalString("headingTextFontName")
|
|
412
249
|
|
|
413
250
|
internal val ReadableMap.headingTextColor: String?
|
|
414
|
-
get()
|
|
415
|
-
if (hasKey("headingTextColor")) {
|
|
416
|
-
return getString("headingTextColor")
|
|
417
|
-
}
|
|
418
|
-
return null
|
|
419
|
-
}
|
|
251
|
+
get() = getOptionalString("headingTextColor")
|
|
420
252
|
|
|
421
253
|
internal val ReadableMap.borderColor: String?
|
|
422
|
-
get()
|
|
423
|
-
if (hasKey("borderColor")) {
|
|
424
|
-
return getString("borderColor")
|
|
425
|
-
}
|
|
426
|
-
return null
|
|
427
|
-
}
|
|
254
|
+
get() = getOptionalString("borderColor")
|
|
428
255
|
|
|
429
256
|
internal val ReadableMap.textFontSize: Int?
|
|
430
|
-
get()
|
|
431
|
-
if (hasKey("textFontSize")) {
|
|
432
|
-
return getInt("textFontSize")
|
|
433
|
-
}
|
|
434
|
-
return null
|
|
435
|
-
}
|
|
257
|
+
get() = getOptionalInt("textFontSize")
|
|
436
258
|
|
|
437
259
|
internal val ReadableMap.cornerRadius: Int?
|
|
438
|
-
get()
|
|
439
|
-
if (hasKey("cornerRadius")) {
|
|
440
|
-
return getInt("cornerRadius")
|
|
441
|
-
}
|
|
442
|
-
return null
|
|
443
|
-
}
|
|
260
|
+
get() = getOptionalInt("cornerRadius")
|
|
444
261
|
|
|
445
262
|
internal val ReadableMap.headingTextFontSize: Int?
|
|
446
|
-
get()
|
|
447
|
-
if (hasKey("headingTextFontSize")) {
|
|
448
|
-
return getInt("headingTextFontSize")
|
|
449
|
-
}
|
|
450
|
-
return null
|
|
451
|
-
}
|
|
263
|
+
get() = getOptionalInt("headingTextFontSize")
|
|
452
264
|
|
|
453
265
|
internal val ReadableMap.borderWidth: Int?
|
|
454
|
-
get()
|
|
455
|
-
if (hasKey("borderWidth")) {
|
|
456
|
-
return getInt("borderWidth")
|
|
457
|
-
}
|
|
458
|
-
return null
|
|
459
|
-
}
|
|
266
|
+
get() = getOptionalInt("borderWidth")
|
|
460
267
|
|
|
461
268
|
internal val ReadableMap.isAVSEnabled: Boolean?
|
|
462
|
-
get() = uiConfiguration?.
|
|
269
|
+
get() = uiConfiguration?.getOptionalBoolean("isAVSEnabled")
|
|
463
270
|
|
|
464
271
|
internal val ReadableMap.shouldPaymentMethodsDisplayAmount: Boolean?
|
|
465
|
-
get() = uiConfiguration?.
|
|
272
|
+
get() = uiConfiguration?.getOptionalBoolean("shouldPaymentMethodsDisplayAmount")
|
|
466
273
|
|
|
467
274
|
internal val ReadableMap.shouldPaymentButtonDisplayAmount: Boolean?
|
|
468
|
-
get() = uiConfiguration?.
|
|
275
|
+
get() = uiConfiguration?.getOptionalBoolean("shouldPaymentButtonDisplayAmount")
|
|
469
276
|
|
|
470
277
|
internal val ReadableMap.shouldPaymentMethodsVerifySecurityCode: Boolean?
|
|
471
|
-
get() = uiConfiguration?.
|
|
278
|
+
get() = uiConfiguration?.getOptionalBoolean("shouldPaymentMethodsVerifySecurityCode")
|
|
472
279
|
|
|
473
280
|
internal val ReadableMap.shouldAskForBillingInformation: Boolean
|
|
474
|
-
get()
|
|
475
|
-
if (uiConfiguration.hasKey("shouldAskForBillingInformation")) {
|
|
476
|
-
return uiConfiguration?.getBoolean("shouldAskForBillingInformation") ?: true
|
|
477
|
-
}
|
|
478
|
-
return true
|
|
479
|
-
}
|
|
281
|
+
get() = uiConfiguration?.getOptionalBoolean("shouldAskForBillingInformation") ?: true
|
|
480
282
|
|
|
481
283
|
internal val ReadableMap.primaryAccountDetails: ReadableMap?
|
|
482
|
-
get()
|
|
483
|
-
if (configuration.hasKey("primaryAccountDetails")) {
|
|
484
|
-
return configuration?.getMap("primaryAccountDetails")
|
|
485
|
-
}
|
|
486
|
-
return null
|
|
487
|
-
}
|
|
284
|
+
get() = configuration?.getOptionalMap("primaryAccountDetails")
|
|
488
285
|
|
|
489
286
|
internal val ReadableMap.name: String?
|
|
490
|
-
get()
|
|
491
|
-
if (primaryAccountDetails.hasKey("name")) {
|
|
492
|
-
return primaryAccountDetails?.getString("name")
|
|
493
|
-
}
|
|
494
|
-
return null
|
|
495
|
-
}
|
|
287
|
+
get() = primaryAccountDetails?.getOptionalString("name")
|
|
496
288
|
|
|
497
289
|
internal val ReadableMap.accountNumber: String?
|
|
498
|
-
get()
|
|
499
|
-
if (primaryAccountDetails.hasKey("accountNumber")) {
|
|
500
|
-
return primaryAccountDetails?.getString("accountNumber")
|
|
501
|
-
}
|
|
502
|
-
return null
|
|
503
|
-
}
|
|
290
|
+
get() = primaryAccountDetails?.getOptionalString("accountNumber")
|
|
504
291
|
|
|
505
292
|
internal val ReadableMap.dateOfBirth: String?
|
|
506
|
-
get()
|
|
507
|
-
if (primaryAccountDetails.hasKey("dateOfBirth")) {
|
|
508
|
-
return primaryAccountDetails?.getString("dateOfBirth")
|
|
509
|
-
}
|
|
510
|
-
return null
|
|
511
|
-
}
|
|
293
|
+
get() = primaryAccountDetails?.getOptionalString("dateOfBirth")
|
|
512
294
|
|
|
513
295
|
internal val ReadableMap.postCode: String?
|
|
514
|
-
get()
|
|
515
|
-
if (primaryAccountDetails.hasKey("postCode")) {
|
|
516
|
-
return primaryAccountDetails?.getString("postCode")
|
|
517
|
-
}
|
|
518
|
-
return null
|
|
519
|
-
}
|
|
296
|
+
get() = primaryAccountDetails?.getOptionalString("postCode")
|
|
520
297
|
|
|
521
298
|
internal val ReadableMap.googlePayConfiguration: ReadableMap?
|
|
522
|
-
get()
|
|
523
|
-
if (configuration.hasKey("googlePayConfiguration")) {
|
|
524
|
-
return configuration?.getMap("googlePayConfiguration")
|
|
525
|
-
}
|
|
526
|
-
return null
|
|
527
|
-
}
|
|
299
|
+
get() = configuration?.getOptionalMap("googlePayConfiguration")
|
|
528
300
|
|
|
529
301
|
internal val ReadableMap.countryCode: String?
|
|
530
|
-
get() = googlePayConfiguration?.
|
|
302
|
+
get() = googlePayConfiguration?.getOptionalString("countryCode")
|
|
531
303
|
|
|
532
304
|
internal val ReadableMap.environmentValue: Int?
|
|
533
|
-
get() = googlePayConfiguration?.
|
|
305
|
+
get() = googlePayConfiguration?.getOptionalInt("environment")
|
|
306
|
+
|
|
307
|
+
internal val ReadableMap.merchantName: String?
|
|
308
|
+
get() = googlePayConfiguration?.getOptionalString("merchantName")
|
|
309
|
+
|
|
310
|
+
internal val ReadableMap.transactionId: String?
|
|
311
|
+
get() = googlePayConfiguration?.getOptionalString("transactionId")
|
|
312
|
+
|
|
313
|
+
internal val ReadableMap.totalPriceStatus: Int?
|
|
314
|
+
get() = googlePayConfiguration?.getOptionalInt("totalPriceStatus")
|
|
315
|
+
|
|
316
|
+
internal val ReadableMap.totalPriceLabel: String?
|
|
317
|
+
get() = googlePayConfiguration?.getOptionalString("totalPriceLabel")
|
|
318
|
+
|
|
319
|
+
internal val ReadableMap.checkoutOption: Int?
|
|
320
|
+
get() = googlePayConfiguration?.getOptionalInt("checkoutOption")
|
|
534
321
|
|
|
535
322
|
internal val ReadableMap.isEmailRequired: Boolean?
|
|
536
|
-
get() = googlePayConfiguration?.
|
|
323
|
+
get() = googlePayConfiguration?.getOptionalBoolean("isEmailRequired")
|
|
537
324
|
|
|
538
325
|
internal val ReadableMap.isBillingAddressRequired: Boolean?
|
|
539
|
-
get() = googlePayConfiguration?.
|
|
326
|
+
get() = googlePayConfiguration?.getOptionalBoolean("isBillingAddressRequired")
|
|
540
327
|
|
|
541
328
|
internal val ReadableMap.isShippingAddressRequired: Boolean?
|
|
542
|
-
get() = googlePayConfiguration?.
|
|
329
|
+
get() = googlePayConfiguration?.getOptionalBoolean("isShippingAddressRequired")
|
|
543
330
|
|
|
544
331
|
internal val ReadableMap.billingAddressParameters: ReadableMap?
|
|
545
|
-
get()
|
|
546
|
-
if (googlePayConfiguration.hasKey("billingAddressParameters")) {
|
|
547
|
-
return googlePayConfiguration?.getMap("billingAddressParameters")
|
|
548
|
-
}
|
|
549
|
-
return null
|
|
550
|
-
}
|
|
332
|
+
get() = googlePayConfiguration?.getOptionalMap("billingAddressParameters")
|
|
551
333
|
|
|
552
334
|
internal val ReadableMap.shippingAddressParameters: ReadableMap?
|
|
553
|
-
get()
|
|
554
|
-
if (googlePayConfiguration.hasKey("shippingAddressParameters")) {
|
|
555
|
-
return googlePayConfiguration?.getMap("shippingAddressParameters")
|
|
556
|
-
}
|
|
557
|
-
return null
|
|
558
|
-
}
|
|
335
|
+
get() = googlePayConfiguration?.getOptionalMap("shippingAddressParameters")
|
|
559
336
|
|
|
560
337
|
internal val ReadableMap.isBillingPhoneNumberRequired: Boolean?
|
|
561
|
-
get() = billingAddressParameters?.
|
|
338
|
+
get() = billingAddressParameters?.getOptionalBoolean("isPhoneNumberRequired")
|
|
562
339
|
|
|
563
340
|
internal val ReadableMap.addressFormat: Int?
|
|
564
|
-
get() = billingAddressParameters?.
|
|
341
|
+
get() = billingAddressParameters?.getOptionalInt("addressFormat")
|
|
565
342
|
|
|
566
343
|
internal val ReadableMap.isShippingPhoneNumberRequired: Boolean?
|
|
567
|
-
get() = shippingAddressParameters?.
|
|
344
|
+
get() = shippingAddressParameters?.getOptionalBoolean("isPhoneNumberRequired")
|
|
568
345
|
|
|
569
346
|
internal val ReadableMap.allowedCountryCodeList: ReadableArray?
|
|
570
|
-
get()
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
347
|
+
get() = shippingAddressParameters?.getOptionalArray("allowedCountryCodes")
|
|
348
|
+
|
|
349
|
+
internal val ReadableMap.allowPrepaidCards: Boolean?
|
|
350
|
+
get() = googlePayConfiguration?.getOptionalBoolean("allowPrepaidCards")
|
|
351
|
+
|
|
352
|
+
internal val ReadableMap.allowCreditCards: Boolean?
|
|
353
|
+
get() = googlePayConfiguration?.getOptionalBoolean("allowCreditCards")
|
|
576
354
|
|
|
577
355
|
internal val ReadableMap.pbbaConfiguration: ReadableMap?
|
|
578
|
-
get()
|
|
579
|
-
if (configuration.hasKey("pbbaConfiguration")) {
|
|
580
|
-
return configuration?.getMap("pbbaConfiguration")
|
|
581
|
-
}
|
|
582
|
-
return null
|
|
583
|
-
}
|
|
356
|
+
get() = configuration?.getOptionalMap("pbbaConfiguration")
|
|
584
357
|
|
|
585
358
|
internal val ReadableMap.pbbaMobileNumber: String?
|
|
586
|
-
get() = pbbaConfiguration?.
|
|
359
|
+
get() = pbbaConfiguration?.getOptionalString("mobileNumber")
|
|
587
360
|
|
|
588
361
|
internal val ReadableMap.pbbaEmailAddress: String?
|
|
589
|
-
get() = pbbaConfiguration?.
|
|
362
|
+
get() = pbbaConfiguration?.getOptionalString("emailAddress")
|
|
590
363
|
|
|
591
364
|
internal val ReadableMap.deeplinkScheme: String?
|
|
592
|
-
get() = pbbaConfiguration?.
|
|
365
|
+
get() = pbbaConfiguration?.getOptionalString("deeplinkScheme")
|
|
593
366
|
|
|
594
367
|
internal val ReadableMap.deeplinkURL: String?
|
|
595
|
-
get()
|
|
596
|
-
return if (pbbaConfiguration.hasKey("deeplinkURL")) {
|
|
597
|
-
pbbaConfiguration?.getString("deeplinkURL")
|
|
598
|
-
} else {
|
|
599
|
-
null
|
|
600
|
-
}
|
|
601
|
-
}
|
|
368
|
+
get() = pbbaConfiguration?.getOptionalString("deeplinkURL")
|
|
602
369
|
|
|
603
370
|
fun Judo.toJudoActivityIntent(packageContext: Context): Intent =
|
|
604
371
|
Intent(packageContext, JudoActivity::class.java)
|