@tapayadot/accept-react-native 1.0.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/LICENSE +201 -0
- package/README.md +262 -0
- package/android/build.gradle +49 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/com/tapaya/acceptsdkreactnative/AcceptSdkReactNativeModule.kt +418 -0
- package/app.json +5 -0
- package/app.plugin.js +1 -0
- package/build/AcceptSdkReactNative.types.d.ts +117 -0
- package/build/AcceptSdkReactNative.types.d.ts.map +1 -0
- package/build/AcceptSdkReactNative.types.js +2 -0
- package/build/AcceptSdkReactNative.types.js.map +1 -0
- package/build/AcceptSdkReactNativeModule.d.ts +24 -0
- package/build/AcceptSdkReactNativeModule.d.ts.map +1 -0
- package/build/AcceptSdkReactNativeModule.js +4 -0
- package/build/AcceptSdkReactNativeModule.js.map +1 -0
- package/build/index.d.ts +144 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +180 -0
- package/build/index.js.map +1 -0
- package/expo-module.config.json +11 -0
- package/ios/.xcode.env +11 -0
- package/ios/AcceptSdkReactNative.podspec +33 -0
- package/ios/AcceptSdkReactNativeAppDelegate.swift +13 -0
- package/ios/AcceptSdkReactNativeModule.swift +412 -0
- package/ios/Podfile +63 -0
- package/ios/Podfile.properties.json +4 -0
- package/ios/acceptsdkreactnative.xcodeproj/project.pbxproj +540 -0
- package/ios/acceptsdkreactnative.xcodeproj/xcshareddata/xcschemes/acceptsdkreactnative.xcscheme +88 -0
- package/package.json +85 -0
- package/plugin/withCustomRepoModule.js +78 -0
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
package com.tapaya.acceptsdkreactnative
|
|
2
|
+
|
|
3
|
+
import com.google.gson.Gson
|
|
4
|
+
import com.tapaya.accept.AcceptSDK
|
|
5
|
+
import com.tapaya.accept.external.IdentityData
|
|
6
|
+
import com.tapaya.core.model.external.BusinessType
|
|
7
|
+
import com.tapaya.core.model.external.Currency
|
|
8
|
+
import com.tapaya.core.model.external.exception.AcceptSDKException
|
|
9
|
+
import com.tapaya.core.model.external.intent.CardChargeIntent
|
|
10
|
+
import com.tapaya.core.model.external.intent.CertisInstantPaymentIntent
|
|
11
|
+
import com.tapaya.core.model.external.intent.SepaInstantPaymentIntent
|
|
12
|
+
import com.tapaya.core.model.external.result.AbstractPaymentResult
|
|
13
|
+
import com.tapaya.core.model.external.result.CardPaymentResult
|
|
14
|
+
import com.tapaya.core.model.external.result.CertisInstantPaymentResult
|
|
15
|
+
import com.tapaya.core.model.external.result.SepaInstantPaymentResult
|
|
16
|
+
import expo.modules.interfaces.permissions.PermissionsStatus
|
|
17
|
+
import expo.modules.kotlin.functions.Coroutine
|
|
18
|
+
import expo.modules.kotlin.modules.Module
|
|
19
|
+
import expo.modules.kotlin.modules.ModuleDefinition
|
|
20
|
+
import expo.modules.kotlin.records.Field
|
|
21
|
+
import expo.modules.kotlin.records.Record
|
|
22
|
+
import kotlinx.coroutines.suspendCancellableCoroutine
|
|
23
|
+
import kotlin.coroutines.resume
|
|
24
|
+
import kotlin.coroutines.resumeWithException
|
|
25
|
+
|
|
26
|
+
//region-start
|
|
27
|
+
class CardPaymentIntentReactNative : Record {
|
|
28
|
+
@Field
|
|
29
|
+
var paymentIntentId: String = ""
|
|
30
|
+
|
|
31
|
+
@Field
|
|
32
|
+
var amount: Int = 0
|
|
33
|
+
|
|
34
|
+
@Field
|
|
35
|
+
var requestedCurrency: String = ""
|
|
36
|
+
|
|
37
|
+
@Field
|
|
38
|
+
var settlementCurrency: String = ""
|
|
39
|
+
|
|
40
|
+
fun toCardInstantPaymentIntent(): CardChargeIntent {
|
|
41
|
+
val requested = Currency.valueOf(requestedCurrency)
|
|
42
|
+
return CardChargeIntent(
|
|
43
|
+
paymentIntentId = paymentIntentId,
|
|
44
|
+
amount = amount,
|
|
45
|
+
requestedCurrency = requested,
|
|
46
|
+
settlementCurrency = if (settlementCurrency.isEmpty()) requested else Currency.valueOf(settlementCurrency)
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
class CardPaymentResultReactNative(
|
|
52
|
+
@Field
|
|
53
|
+
var status: String = "",
|
|
54
|
+
@Field
|
|
55
|
+
var readerStatus: String = "",
|
|
56
|
+
@Field
|
|
57
|
+
var last4: String = "",
|
|
58
|
+
@Field
|
|
59
|
+
var companyName: String = "",
|
|
60
|
+
@Field
|
|
61
|
+
var companyAddress1: String = "",
|
|
62
|
+
@Field
|
|
63
|
+
var companyAddress2: String = "",
|
|
64
|
+
@Field
|
|
65
|
+
var companyCity: String = "",
|
|
66
|
+
@Field
|
|
67
|
+
var companyCountry: Int = 0,
|
|
68
|
+
@Field
|
|
69
|
+
var terminalId: String = "",
|
|
70
|
+
@Field
|
|
71
|
+
var authorizationCode: String = "",
|
|
72
|
+
@Field
|
|
73
|
+
var brand: String = "",
|
|
74
|
+
@Field
|
|
75
|
+
var reason: String = "",
|
|
76
|
+
@Field
|
|
77
|
+
var type: String = "",
|
|
78
|
+
) : Record
|
|
79
|
+
|
|
80
|
+
fun CardPaymentResult.toReactNative(): CardPaymentResultReactNative {
|
|
81
|
+
return CardPaymentResultReactNative(
|
|
82
|
+
status = status.name.lowercase(),
|
|
83
|
+
readerStatus = readerStatus?.name?.lowercase() ?: "",
|
|
84
|
+
last4 = last4 ?: "",
|
|
85
|
+
companyName = companyName ?: "",
|
|
86
|
+
companyAddress1 = companyAddress1 ?: "",
|
|
87
|
+
companyAddress2 = companyAddress2 ?: "",
|
|
88
|
+
companyCity = companyCity ?: "",
|
|
89
|
+
companyCountry = companyCountry ?: 0,
|
|
90
|
+
terminalId = terminalId ?: "",
|
|
91
|
+
authorizationCode = authorizationCode ?: "",
|
|
92
|
+
brand = brand?.name ?: "",
|
|
93
|
+
reason = reason?.name ?: "",
|
|
94
|
+
type = "card"
|
|
95
|
+
)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
class SepaPaymentIntentReactNative : Record {
|
|
99
|
+
@Field
|
|
100
|
+
var paymentIntentId: String = ""
|
|
101
|
+
|
|
102
|
+
@Field
|
|
103
|
+
var amount: Int = 0
|
|
104
|
+
|
|
105
|
+
@Field
|
|
106
|
+
var requestedCurrency: String = ""
|
|
107
|
+
|
|
108
|
+
@Field
|
|
109
|
+
var settlementCurrency: String = ""
|
|
110
|
+
|
|
111
|
+
fun toSepaInstantPaymentIntent(): SepaInstantPaymentIntent {
|
|
112
|
+
val requested = Currency.valueOf(requestedCurrency)
|
|
113
|
+
return SepaInstantPaymentIntent(
|
|
114
|
+
paymentIntentId = paymentIntentId,
|
|
115
|
+
amount = amount,
|
|
116
|
+
requestedCurrency = requested,
|
|
117
|
+
settlementCurrency = if (settlementCurrency.isEmpty()) requested else Currency.valueOf(settlementCurrency)
|
|
118
|
+
)
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
class SepaPaymentInstantResultReactNative(
|
|
123
|
+
@Field
|
|
124
|
+
var status: String = "",
|
|
125
|
+
@Field
|
|
126
|
+
var postponed: Boolean = false,
|
|
127
|
+
@Field
|
|
128
|
+
var receivedAt: String = "",
|
|
129
|
+
@Field
|
|
130
|
+
var receivedFromIban: String = "",
|
|
131
|
+
@Field
|
|
132
|
+
var type: String = "",
|
|
133
|
+
) : Record
|
|
134
|
+
|
|
135
|
+
fun SepaInstantPaymentResult.toReactNative(): SepaPaymentInstantResultReactNative {
|
|
136
|
+
return SepaPaymentInstantResultReactNative(
|
|
137
|
+
status = status.name.lowercase(),
|
|
138
|
+
postponed = postponed,
|
|
139
|
+
receivedAt = receivedAt.toString(),
|
|
140
|
+
receivedFromIban = receivedFromIban ?: "",
|
|
141
|
+
type = "sepa"
|
|
142
|
+
)
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
class CertisPaymentIntentReactNative : Record {
|
|
146
|
+
@Field
|
|
147
|
+
var paymentIntentId: String = ""
|
|
148
|
+
|
|
149
|
+
@Field
|
|
150
|
+
var amount: Int = 0
|
|
151
|
+
|
|
152
|
+
@Field
|
|
153
|
+
var requestedCurrency: String = ""
|
|
154
|
+
|
|
155
|
+
@Field
|
|
156
|
+
var settlementCurrency: String = ""
|
|
157
|
+
|
|
158
|
+
fun toCertisInstantPaymentIntent(): CertisInstantPaymentIntent {
|
|
159
|
+
val requested = Currency.valueOf(requestedCurrency)
|
|
160
|
+
return CertisInstantPaymentIntent(
|
|
161
|
+
paymentIntentId = paymentIntentId,
|
|
162
|
+
amount = amount,
|
|
163
|
+
requestedCurrency = requested,
|
|
164
|
+
settlementCurrency = if (settlementCurrency.isEmpty()) requested else Currency.valueOf(settlementCurrency)
|
|
165
|
+
)
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
class CertisPaymentInstantResultReactNative(
|
|
170
|
+
@Field
|
|
171
|
+
var status: String = "",
|
|
172
|
+
@Field
|
|
173
|
+
var postponed: Boolean = false,
|
|
174
|
+
@Field
|
|
175
|
+
var receivedAt: String = "",
|
|
176
|
+
@Field
|
|
177
|
+
var receivedFromIban: String = "",
|
|
178
|
+
@Field
|
|
179
|
+
var type: String = "",
|
|
180
|
+
) : Record
|
|
181
|
+
|
|
182
|
+
fun CertisInstantPaymentResult.toReactNative(): CertisPaymentInstantResultReactNative {
|
|
183
|
+
return CertisPaymentInstantResultReactNative(
|
|
184
|
+
status = status.name.lowercase(),
|
|
185
|
+
postponed = postponed,
|
|
186
|
+
receivedAt = receivedAt.toString(),
|
|
187
|
+
receivedFromIban = receivedFromIban ?: "",
|
|
188
|
+
type = "certis"
|
|
189
|
+
)
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
class KybPrefillDataRecord : Record {
|
|
194
|
+
@Field var businessType: String? = null
|
|
195
|
+
@Field var countryCode: String? = null
|
|
196
|
+
@Field var registrationNumber: String? = null
|
|
197
|
+
@Field var vatNumber: String? = null
|
|
198
|
+
@Field var legalName: String? = null
|
|
199
|
+
@Field var addressLine1: String? = null
|
|
200
|
+
@Field var addressLine2: String? = null
|
|
201
|
+
@Field var city: String? = null
|
|
202
|
+
@Field var postalCode: String? = null
|
|
203
|
+
@Field var merchantCategoryCode: Int? = null
|
|
204
|
+
@Field var businessEmail: String? = null
|
|
205
|
+
@Field var bankAccountIban: String? = null
|
|
206
|
+
@Field var businessUrl: String? = null
|
|
207
|
+
@Field var productDescription: String? = null
|
|
208
|
+
@Field var supportPhone: String? = null
|
|
209
|
+
|
|
210
|
+
fun toIdentityData(): IdentityData = IdentityData(
|
|
211
|
+
businessType = businessType?.let { BusinessType.valueOf(it) },
|
|
212
|
+
countryCode = countryCode,
|
|
213
|
+
registrationNumber = registrationNumber,
|
|
214
|
+
vatNumber = vatNumber,
|
|
215
|
+
legalName = legalName,
|
|
216
|
+
addressLine1 = addressLine1,
|
|
217
|
+
addressLine2 = addressLine2,
|
|
218
|
+
city = city,
|
|
219
|
+
postalCode = postalCode,
|
|
220
|
+
merchantCategoryCode = merchantCategoryCode,
|
|
221
|
+
businessEmail = businessEmail,
|
|
222
|
+
bankAccountIban = bankAccountIban,
|
|
223
|
+
businessUrl = businessUrl,
|
|
224
|
+
productDescription = productDescription,
|
|
225
|
+
supportPhone = supportPhone,
|
|
226
|
+
)
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
//endregion-end
|
|
230
|
+
|
|
231
|
+
class AcceptSdkReactNativeModule : Module() {
|
|
232
|
+
override fun definition() = ModuleDefinition {
|
|
233
|
+
Name("AcceptSdkReactNative")
|
|
234
|
+
|
|
235
|
+
Events(
|
|
236
|
+
"onCardPaymentStatusChange",
|
|
237
|
+
"onSepaPaymentStatusChange",
|
|
238
|
+
"onCertisPaymentStatusChange",
|
|
239
|
+
"onCardPaymentException",
|
|
240
|
+
"onSepaPaymentException",
|
|
241
|
+
"onCertisPaymentException",
|
|
242
|
+
)
|
|
243
|
+
|
|
244
|
+
AsyncFunction("initialize") Coroutine { demo: Boolean ->
|
|
245
|
+
val context = appContext.reactContext ?: throw Exception("Context not available")
|
|
246
|
+
AcceptSDK.initialize(context, demo)
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
AsyncFunction("authenticate") Coroutine { token: String ->
|
|
250
|
+
return@Coroutine suspendCancellableCoroutine<Boolean> { continuation ->
|
|
251
|
+
try {
|
|
252
|
+
AcceptSDK.authenticate(
|
|
253
|
+
token,
|
|
254
|
+
onSuccess = { continuation.resume(true) },
|
|
255
|
+
onError = { error -> (error as? Throwable)?.let { continuation.resumeWithException(it) } }
|
|
256
|
+
)
|
|
257
|
+
} catch (e: Exception) {
|
|
258
|
+
continuation.resumeWithException(e)
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
Function("getStatus") { ->
|
|
264
|
+
try {
|
|
265
|
+
return@Function AcceptSDK.status.name
|
|
266
|
+
} catch (e: Exception) {
|
|
267
|
+
throw e
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
AsyncFunction("getPaymentStatus") Coroutine { paymentIntentId: String ->
|
|
272
|
+
return@Coroutine suspendCancellableCoroutine<String> { continuation ->
|
|
273
|
+
try {
|
|
274
|
+
AcceptSDK.getPaymentStatus(
|
|
275
|
+
paymentIntentId,
|
|
276
|
+
{ result: AbstractPaymentResult ->
|
|
277
|
+
val mapped = when (result) {
|
|
278
|
+
is CardPaymentResult -> result.toReactNative()
|
|
279
|
+
is CertisInstantPaymentResult -> result.toReactNative()
|
|
280
|
+
is SepaInstantPaymentResult -> result.toReactNative()
|
|
281
|
+
else -> throw Exception("Unsupported payment result type")
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
continuation.resume(Gson().toJson(mapped))
|
|
285
|
+
},
|
|
286
|
+
{ error: AcceptSDKException ->
|
|
287
|
+
(error as? Throwable)?.let { continuation.resumeWithException(it) }
|
|
288
|
+
}
|
|
289
|
+
)
|
|
290
|
+
} catch (e: Exception) {
|
|
291
|
+
continuation.resumeWithException(e)
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
AsyncFunction("requestLocationPermission") Coroutine { ->
|
|
297
|
+
return@Coroutine suspendCancellableCoroutine<Boolean> { continuation ->
|
|
298
|
+
appContext.permissions?.askForPermissions(
|
|
299
|
+
{
|
|
300
|
+
val result = it.map { (_, value) ->
|
|
301
|
+
value.status == PermissionsStatus.GRANTED
|
|
302
|
+
}.reduce { acc, i -> acc.and(i) }
|
|
303
|
+
continuation.resume(result)
|
|
304
|
+
},
|
|
305
|
+
"android.permission.ACCESS_FINE_LOCATION",
|
|
306
|
+
"android.permission.ACCESS_COARSE_LOCATION"
|
|
307
|
+
)
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
AsyncFunction("logOut") Coroutine { ->
|
|
312
|
+
return@Coroutine suspendCancellableCoroutine<Boolean> { continuation ->
|
|
313
|
+
try {
|
|
314
|
+
AcceptSDK.logOut {
|
|
315
|
+
continuation.resume(true)
|
|
316
|
+
}
|
|
317
|
+
} catch (e: Exception) {
|
|
318
|
+
continuation.resumeWithException(e)
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
AsyncFunction("isPaymentPending") { ->
|
|
324
|
+
try {
|
|
325
|
+
return@AsyncFunction AcceptSDK.isPaymentPending()
|
|
326
|
+
} catch (e: Exception) {
|
|
327
|
+
throw e
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
AsyncFunction("presentKyb") Coroutine { prefilling: KybPrefillDataRecord? ->
|
|
332
|
+
AcceptSDK.identity.presentKyb(prefilling?.toIdentityData())
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
AsyncFunction("startCardPayment") Coroutine { paymentIntent: CardPaymentIntentReactNative ->
|
|
336
|
+
return@Coroutine suspendCancellableCoroutine<CardPaymentResultReactNative> { continuation ->
|
|
337
|
+
try {
|
|
338
|
+
AcceptSDK.cardTerminal.process(
|
|
339
|
+
paymentIntent.toCardInstantPaymentIntent(),
|
|
340
|
+
onResult = {
|
|
341
|
+
continuation.resume(it.toReactNative())
|
|
342
|
+
},
|
|
343
|
+
onStatus = {
|
|
344
|
+
sendEvent("onCardPaymentStatusChange", mapOf("data" to it.name.lowercase()))
|
|
345
|
+
},
|
|
346
|
+
onError = {
|
|
347
|
+
sendEvent("onCardPaymentException", it.toReactNative())
|
|
348
|
+
}
|
|
349
|
+
)
|
|
350
|
+
} catch (e: Exception) {
|
|
351
|
+
continuation.resumeWithException(e)
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
AsyncFunction("startSepaPayment") Coroutine { paymentIntent: SepaPaymentIntentReactNative ->
|
|
357
|
+
return@Coroutine suspendCancellableCoroutine<SepaPaymentInstantResultReactNative> { continuation ->
|
|
358
|
+
try {
|
|
359
|
+
AcceptSDK.sepaTerminal.process(
|
|
360
|
+
paymentIntent.toSepaInstantPaymentIntent(),
|
|
361
|
+
onResult = {
|
|
362
|
+
continuation.resume(it.toReactNative())
|
|
363
|
+
},
|
|
364
|
+
onStatus = {
|
|
365
|
+
sendEvent("onSepaPaymentStatusChange", mapOf("data" to it.name.lowercase()))
|
|
366
|
+
},
|
|
367
|
+
onError = {
|
|
368
|
+
sendEvent("onSepaPaymentException", it.toReactNative())
|
|
369
|
+
}
|
|
370
|
+
)
|
|
371
|
+
} catch (e: Exception) {
|
|
372
|
+
continuation.resumeWithException(e)
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
AsyncFunction("startCertisPayment") Coroutine { paymentIntent: CertisPaymentIntentReactNative ->
|
|
378
|
+
return@Coroutine suspendCancellableCoroutine<CertisPaymentInstantResultReactNative> { continuation ->
|
|
379
|
+
try {
|
|
380
|
+
AcceptSDK.certisTerminal.process(
|
|
381
|
+
paymentIntent.toCertisInstantPaymentIntent(),
|
|
382
|
+
onResult = {
|
|
383
|
+
continuation.resume(it.toReactNative())
|
|
384
|
+
},
|
|
385
|
+
onStatus = {
|
|
386
|
+
sendEvent("onCertisPaymentStatusChange", mapOf("data" to it.name.lowercase()))
|
|
387
|
+
},
|
|
388
|
+
onError = {
|
|
389
|
+
sendEvent("onCertisPaymentException", it.toReactNative())
|
|
390
|
+
}
|
|
391
|
+
)
|
|
392
|
+
} catch (e: Exception) {
|
|
393
|
+
continuation.resumeWithException(e)
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
AsyncFunction("pairWithCompanionApp") Coroutine { ->
|
|
399
|
+
// Not available on Android
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
AsyncFunction("isCompanionAppInstalled") { ->
|
|
403
|
+
return@AsyncFunction false
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
AsyncFunction("presentCompanionAppSheet") Coroutine { ->
|
|
407
|
+
// Not available on Android
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
private fun AcceptSDKException.toReactNative(): Map<String, String> {
|
|
413
|
+
return mapOf(
|
|
414
|
+
"message" to ((this as Throwable).message ?: ""),
|
|
415
|
+
"exception" to ((this as Throwable).cause?.stackTraceToString() ?: "")
|
|
416
|
+
)
|
|
417
|
+
}
|
|
418
|
+
}
|
package/app.json
ADDED
package/app.plugin.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("./plugin/withCustomRepoModule");
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/** Current authentication/initialization state of the SDK. */
|
|
2
|
+
export type SdkStatus = 'IDLE' | 'INITIALIZED' | 'LOGGED_IN';
|
|
3
|
+
/** Supported settlement and requested currencies. */
|
|
4
|
+
export type Currency = 'CZK' | 'EUR' | 'GBP';
|
|
5
|
+
/** Intent for initiating a card (tap-to-pay) payment. */
|
|
6
|
+
export type CardPaymentIntent = {
|
|
7
|
+
/** Unique payment intent identifier obtained from your backend. */
|
|
8
|
+
paymentIntentId: string;
|
|
9
|
+
/** Amount in the smallest currency unit (e.g. hellers for CZK, cents for EUR). */
|
|
10
|
+
amount: number;
|
|
11
|
+
/** Currency the customer is charged in. */
|
|
12
|
+
requestedCurrency: Currency;
|
|
13
|
+
/** Currency funds settle in. Defaults to `requestedCurrency` when omitted. */
|
|
14
|
+
settlementCurrency?: Currency;
|
|
15
|
+
};
|
|
16
|
+
/** Intent for initiating a SEPA Instant bank transfer payment. */
|
|
17
|
+
export type SepaPaymentIntent = {
|
|
18
|
+
/** Unique payment intent identifier obtained from your backend. */
|
|
19
|
+
paymentIntentId: string;
|
|
20
|
+
/** Amount in the smallest currency unit. */
|
|
21
|
+
amount: number;
|
|
22
|
+
/** Currency the customer is charged in. */
|
|
23
|
+
requestedCurrency: Currency;
|
|
24
|
+
/** Currency funds settle in. Defaults to `requestedCurrency` when omitted. */
|
|
25
|
+
settlementCurrency?: Currency;
|
|
26
|
+
};
|
|
27
|
+
/** Intent for initiating a Certis Instant bank transfer payment. */
|
|
28
|
+
export type CertisPaymentIntent = {
|
|
29
|
+
/** Unique payment intent identifier obtained from your backend. */
|
|
30
|
+
paymentIntentId: string;
|
|
31
|
+
/** Amount in the smallest currency unit. */
|
|
32
|
+
amount: number;
|
|
33
|
+
/** Currency the customer is charged in. */
|
|
34
|
+
requestedCurrency: Currency;
|
|
35
|
+
/** Currency funds settle in. Defaults to `requestedCurrency` when omitted. */
|
|
36
|
+
settlementCurrency?: Currency;
|
|
37
|
+
};
|
|
38
|
+
/** Result of a completed card payment. */
|
|
39
|
+
export type CardPaymentResult = {
|
|
40
|
+
/** Final payment status. */
|
|
41
|
+
status: CardPaymentStatus;
|
|
42
|
+
/** Last 4 digits of the card number. */
|
|
43
|
+
last4?: string;
|
|
44
|
+
/** Merchant company name. */
|
|
45
|
+
companyName?: string;
|
|
46
|
+
companyAddress1?: string;
|
|
47
|
+
companyAddress2?: string;
|
|
48
|
+
companyCity?: string;
|
|
49
|
+
companyCountry?: number;
|
|
50
|
+
terminalId?: string;
|
|
51
|
+
authorizationCode?: string;
|
|
52
|
+
/** Card brand (e.g. `VISA`, `MASTERCARD`). */
|
|
53
|
+
brand?: string;
|
|
54
|
+
/** Decline or abort reason when status is not `approved`. */
|
|
55
|
+
reason?: string;
|
|
56
|
+
};
|
|
57
|
+
/** Intermediate status updates emitted during a card payment flow. */
|
|
58
|
+
export type CardPaymentStatus = 'pending' | 'approved' | 'declined' | 'refunded' | 'aborted';
|
|
59
|
+
/** Result of a completed SEPA Instant payment. */
|
|
60
|
+
export type SepaPaymentResult = {
|
|
61
|
+
/** Final payment status. */
|
|
62
|
+
status: SepaInstantPaymentStatus;
|
|
63
|
+
/** Whether the payment was postponed for later processing. */
|
|
64
|
+
postponed: boolean;
|
|
65
|
+
/** ISO 8601 timestamp of when funds were received. */
|
|
66
|
+
receivedAt: string;
|
|
67
|
+
/** IBAN the funds were received from. */
|
|
68
|
+
receivedFromIban: string;
|
|
69
|
+
};
|
|
70
|
+
/** Intermediate status updates emitted during a SEPA Instant payment flow. */
|
|
71
|
+
export type SepaInstantPaymentStatus = 'pending' | 'verified' | 'aborted' | 'refunded' | 'declined';
|
|
72
|
+
/** Result of a completed Certis Instant payment. */
|
|
73
|
+
export type CertisPaymentResult = {
|
|
74
|
+
/** Final payment status. */
|
|
75
|
+
status: CertisInstantPaymentStatus;
|
|
76
|
+
/** Whether the payment was postponed for later processing. */
|
|
77
|
+
postponed: boolean;
|
|
78
|
+
/** ISO 8601 timestamp of when funds were received. */
|
|
79
|
+
receivedAt: string;
|
|
80
|
+
/** IBAN the funds were received from. */
|
|
81
|
+
receivedFromIban: string;
|
|
82
|
+
};
|
|
83
|
+
/** Intermediate status updates emitted during a Certis Instant payment flow. */
|
|
84
|
+
export type CertisInstantPaymentStatus = 'pending' | 'verified' | 'aborted' | 'refunded' | 'declined';
|
|
85
|
+
/** Optional prefill data for the KYB onboarding flow. All fields are optional. */
|
|
86
|
+
export type KybPrefillData = {
|
|
87
|
+
/** Legal structure of the business. */
|
|
88
|
+
businessType?: 'individual' | 'company' | 'nonProfit' | 'governmentEntity';
|
|
89
|
+
/** ISO 3166-1 alpha-2 country code (e.g. `"CZ"`, `"DE"`). */
|
|
90
|
+
countryCode?: string;
|
|
91
|
+
/** Company registration / identification number. */
|
|
92
|
+
registrationNumber?: string;
|
|
93
|
+
vatNumber?: string;
|
|
94
|
+
/** Legal company name. */
|
|
95
|
+
legalName?: string;
|
|
96
|
+
addressLine1?: string;
|
|
97
|
+
addressLine2?: string;
|
|
98
|
+
city?: string;
|
|
99
|
+
postalCode?: string;
|
|
100
|
+
/** 4-digit Merchant Category Code (MCC). */
|
|
101
|
+
merchantCategoryCode?: number;
|
|
102
|
+
businessEmail?: string;
|
|
103
|
+
/** IBAN for payout settlement. */
|
|
104
|
+
bankAccountIban?: string;
|
|
105
|
+
businessUrl?: string;
|
|
106
|
+
productDescription?: string;
|
|
107
|
+
supportPhone?: string;
|
|
108
|
+
};
|
|
109
|
+
export type AcceptSdkReactNativeModuleEvents = {
|
|
110
|
+
onCardPaymentStatusChange: (status: Map<string, string>) => void;
|
|
111
|
+
onSepaPaymentStatusChange: (status: Map<string, string>) => void;
|
|
112
|
+
onCertisPaymentStatusChange: (status: Map<string, string>) => void;
|
|
113
|
+
onCardPaymentException: (map: Map<string, string>) => void;
|
|
114
|
+
onSepaPaymentException: (map: Map<string, string>) => void;
|
|
115
|
+
onCertisPaymentException: (map: Map<string, string>) => void;
|
|
116
|
+
};
|
|
117
|
+
//# sourceMappingURL=AcceptSdkReactNative.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcceptSdkReactNative.types.d.ts","sourceRoot":"","sources":["../src/AcceptSdkReactNative.types.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,aAAa,GAAG,WAAW,CAAA;AAE5D,qDAAqD;AACrD,MAAM,MAAM,QAAQ,GAAG,KAAK,GAA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Y,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4CAA4C;IAC5C,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kCAAkC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAA;AAED,MAAM,MAAM,gCAAgC,GAAG;IAC7C,yBAAyB,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IACjE,yBAAyB,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IACjE,2BAA2B,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IACnE,sBAAsB,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IAC3D,sBAAsB,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IAC3D,wBAAwB,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;CAC9D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcceptSdkReactNative.types.js","sourceRoot":"","sources":["../src/AcceptSdkReactNative.types.ts"],"names":[],"mappings":"","sourcesContent":["/** Current authentication/initialization state of the SDK. */\nexport type SdkStatus = 'IDLE' | 'INITIALIZED' | 'LOGGED_IN'\n\n/** Supported settlement and requested currencies. */\nexport type Currency = 'CZK' | 'EUR' | 'GBP'\n\n/** Intent for initiating a card (tap-to-pay) payment. */\nexport type CardPaymentIntent = {\n /** Unique payment intent identifier obtained from your backend. */\n paymentIntentId: string;\n /** Amount in the smallest currency unit (e.g. hellers for CZK, cents for EUR). */\n amount: number;\n /** Currency the customer is charged in. */\n requestedCurrency: Currency;\n /** Currency funds settle in. Defaults to `requestedCurrency` when omitted. */\n settlementCurrency?: Currency;\n}\n\n/** Intent for initiating a SEPA Instant bank transfer payment. */\nexport type SepaPaymentIntent = {\n /** Unique payment intent identifier obtained from your backend. */\n paymentIntentId: string;\n /** Amount in the smallest currency unit. */\n amount: number;\n /** Currency the customer is charged in. */\n requestedCurrency: Currency;\n /** Currency funds settle in. Defaults to `requestedCurrency` when omitted. */\n settlementCurrency?: Currency;\n}\n\n/** Intent for initiating a Certis Instant bank transfer payment. */\nexport type CertisPaymentIntent = {\n /** Unique payment intent identifier obtained from your backend. */\n paymentIntentId: string;\n /** Amount in the smallest currency unit. */\n amount: number;\n /** Currency the customer is charged in. */\n requestedCurrency: Currency;\n /** Currency funds settle in. Defaults to `requestedCurrency` when omitted. */\n settlementCurrency?: Currency;\n}\n\n/** Result of a completed card payment. */\nexport type CardPaymentResult = {\n /** Final payment status. */\n status: CardPaymentStatus;\n /** Last 4 digits of the card number. */\n last4?: string;\n /** Merchant company name. */\n companyName?: string;\n companyAddress1?: string;\n companyAddress2?: string;\n companyCity?: string;\n companyCountry?: number;\n terminalId?: string;\n authorizationCode?: string;\n /** Card brand (e.g. `VISA`, `MASTERCARD`). */\n brand?: string;\n /** Decline or abort reason when status is not `approved`. */\n reason?: string;\n}\n\n/** Intermediate status updates emitted during a card payment flow. */\nexport type CardPaymentStatus =\n 'pending' |\n 'approved' |\n 'declined' |\n 'refunded' |\n 'aborted'\n\n/** Result of a completed SEPA Instant payment. */\nexport type SepaPaymentResult = {\n /** Final payment status. */\n status: SepaInstantPaymentStatus;\n /** Whether the payment was postponed for later processing. */\n postponed: boolean;\n /** ISO 8601 timestamp of when funds were received. */\n receivedAt: string;\n /** IBAN the funds were received from. */\n receivedFromIban: string;\n}\n\n/** Intermediate status updates emitted during a SEPA Instant payment flow. */\nexport type SepaInstantPaymentStatus =\n 'pending' |\n 'verified' |\n 'aborted' |\n 'refunded' |\n 'declined'\n\n/** Result of a completed Certis Instant payment. */\nexport type CertisPaymentResult = {\n /** Final payment status. */\n status: CertisInstantPaymentStatus;\n /** Whether the payment was postponed for later processing. */\n postponed: boolean;\n /** ISO 8601 timestamp of when funds were received. */\n receivedAt: string;\n /** IBAN the funds were received from. */\n receivedFromIban: string;\n}\n\n/** Intermediate status updates emitted during a Certis Instant payment flow. */\nexport type CertisInstantPaymentStatus =\n 'pending' |\n 'verified' |\n 'aborted' |\n 'refunded' |\n 'declined'\n\n/** Optional prefill data for the KYB onboarding flow. All fields are optional. */\nexport type KybPrefillData = {\n /** Legal structure of the business. */\n businessType?: 'individual' | 'company' | 'nonProfit' | 'governmentEntity';\n /** ISO 3166-1 alpha-2 country code (e.g. `\"CZ\"`, `\"DE\"`). */\n countryCode?: string;\n /** Company registration / identification number. */\n registrationNumber?: string;\n vatNumber?: string;\n /** Legal company name. */\n legalName?: string;\n addressLine1?: string;\n addressLine2?: string;\n city?: string;\n postalCode?: string;\n /** 4-digit Merchant Category Code (MCC). */\n merchantCategoryCode?: number;\n businessEmail?: string;\n /** IBAN for payout settlement. */\n bankAccountIban?: string;\n businessUrl?: string;\n productDescription?: string;\n supportPhone?: string;\n}\n\nexport type AcceptSdkReactNativeModuleEvents = {\n onCardPaymentStatusChange: (status: Map<string, string>) => void;\n onSepaPaymentStatusChange: (status: Map<string, string>) => void;\n onCertisPaymentStatusChange: (status: Map<string, string>) => void;\n onCardPaymentException: (map: Map<string, string>) => void;\n onSepaPaymentException: (map: Map<string, string>) => void;\n onCertisPaymentException: (map: Map<string, string>) => void;\n};\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { NativeModule } from 'expo';
|
|
2
|
+
import { CardPaymentIntent, CardPaymentResult, SepaPaymentIntent, SepaPaymentResult, CertisPaymentIntent, CertisPaymentResult, KybPrefillData, AcceptSdkReactNativeModuleEvents } from './AcceptSdkReactNative.types';
|
|
3
|
+
declare class AcceptSdkReactNativeModule extends NativeModule<AcceptSdkReactNativeModuleEvents> {
|
|
4
|
+
initialize(demo: boolean): Promise<boolean>;
|
|
5
|
+
authenticate(token: string): Promise<boolean>;
|
|
6
|
+
getStatus(): Promise<'IDLE' | 'INITIALIZED' | 'LOGGED_IN'>;
|
|
7
|
+
getPaymentStatus(paymentIntentId: string): Promise<string>;
|
|
8
|
+
logOut(): Promise<boolean>;
|
|
9
|
+
requestLocationPermission(): Promise<boolean>;
|
|
10
|
+
presentKyb(prefilling?: KybPrefillData): Promise<void>;
|
|
11
|
+
isPaymentPending(): Promise<boolean>;
|
|
12
|
+
startCardPayment(paymentIntent: CardPaymentIntent): Promise<CardPaymentResult>;
|
|
13
|
+
startSepaPayment(paymentIntent: SepaPaymentIntent): Promise<SepaPaymentResult>;
|
|
14
|
+
startCertisPayment(paymentIntent: CertisPaymentIntent): Promise<CertisPaymentResult>;
|
|
15
|
+
/** @platform ios */
|
|
16
|
+
pairWithCompanionApp(): Promise<void>;
|
|
17
|
+
/** @platform ios */
|
|
18
|
+
isCompanionAppInstalled(): Promise<boolean>;
|
|
19
|
+
/** @platform ios */
|
|
20
|
+
presentCompanionAppSheet(): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
declare const _default: AcceptSdkReactNativeModule;
|
|
23
|
+
export default _default;
|
|
24
|
+
//# sourceMappingURL=AcceptSdkReactNativeModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcceptSdkReactNativeModule.d.ts","sourceRoot":"","sources":["../src/AcceptSdkReactNativeModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,MAAM,CAAC;AAEzD,OAAO,EAAE,iBAAiB,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B,mBAAmB,EAAE,MAAM,MAAM,CAAC;AA0BzD,yDAAyD;AACzD,eAAe,mBAAmB,CAA6B,sBAAsB,CAAC,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from 'expo';\n\nimport { CardPaymentIntent, CardPaymentResult, SepaPaymentIntent, SepaPaymentResult, CertisPaymentIntent, CertisPaymentResult, KybPrefillData, AcceptSdkReactNativeModuleEvents } from './AcceptSdkReactNative.types';\n\ndeclare class AcceptSdkReactNativeModule extends NativeModule<AcceptSdkReactNativeModuleEvents> {\n initialize(demo: boolean): Promise<boolean>;\n authenticate(token: string): Promise<boolean>;\n getStatus(): Promise<'IDLE' | 'INITIALIZED' | 'LOGGED_IN'>;\n getPaymentStatus(paymentIntentId: string): Promise<string>;\n logOut(): Promise<boolean>;\n requestLocationPermission(): Promise<boolean>;\n presentKyb(prefilling?: KybPrefillData): Promise<void>;\n isPaymentPending(): Promise<boolean>;\n startCardPayment(paymentIntent: CardPaymentIntent): Promise<CardPaymentResult>;\n startSepaPayment(paymentIntent: SepaPaymentIntent): Promise<SepaPaymentResult>;\n startCertisPayment(paymentIntent: CertisPaymentIntent): Promise<CertisPaymentResult>;\n /** @platform ios */\n pairWithCompanionApp(): Promise<void>;\n\n /** @platform ios */\n isCompanionAppInstalled(): Promise<boolean>;\n\n /** @platform ios */\n presentCompanionAppSheet(): Promise<void>;\n}\n\n// This call loads the native module object from the JSI.\nexport default requireNativeModule<AcceptSdkReactNativeModule>('AcceptSdkReactNative');\n"]}
|