@tapayadot/accept-react-native 1.3.3 → 1.15.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.
Files changed (47) hide show
  1. package/README.md +196 -363
  2. package/android/build.gradle +23 -34
  3. package/android/src/main/java/com/tapaya/acceptsdkreactnative/AcceptSdkReactNativeModule.kt +191 -673
  4. package/android/src/main/java/com/tapaya/acceptsdkreactnative/Errors.kt +81 -0
  5. package/android/src/main/java/com/tapaya/acceptsdkreactnative/Parsing.kt +166 -0
  6. package/android/src/main/java/com/tapaya/acceptsdkreactnative/Serialization.kt +216 -0
  7. package/app.json +2 -2
  8. package/app.plugin.js +1 -1
  9. package/build/Accept.d.ts +255 -0
  10. package/build/Accept.d.ts.map +1 -0
  11. package/build/Accept.js +387 -0
  12. package/build/Accept.js.map +1 -0
  13. package/build/Accept.types.d.ts +352 -0
  14. package/build/Accept.types.d.ts.map +1 -0
  15. package/build/Accept.types.js +9 -0
  16. package/build/Accept.types.js.map +1 -0
  17. package/build/AcceptError.d.ts +53 -0
  18. package/build/AcceptError.d.ts.map +1 -0
  19. package/build/AcceptError.js +107 -0
  20. package/build/AcceptError.js.map +1 -0
  21. package/build/AcceptSdkReactNativeModule.d.ts +67 -26
  22. package/build/AcceptSdkReactNativeModule.d.ts.map +1 -1
  23. package/build/AcceptSdkReactNativeModule.js +53 -3
  24. package/build/AcceptSdkReactNativeModule.js.map +1 -1
  25. package/build/index.d.ts +7 -237
  26. package/build/index.d.ts.map +1 -1
  27. package/build/index.js +7 -254
  28. package/build/index.js.map +1 -1
  29. package/build/utils.d.ts.map +1 -1
  30. package/build/utils.js +2 -2
  31. package/build/utils.js.map +1 -1
  32. package/expo-module.config.json +1 -6
  33. package/package.json +8 -12
  34. package/plugin/withAcceptSdk.js +45 -0
  35. package/build/AcceptSdkReactNative.types.d.ts +0 -259
  36. package/build/AcceptSdkReactNative.types.d.ts.map +0 -1
  37. package/build/AcceptSdkReactNative.types.js +0 -2
  38. package/build/AcceptSdkReactNative.types.js.map +0 -1
  39. package/ios/.xcode.env +0 -11
  40. package/ios/AcceptSdkReactNative.podspec +0 -33
  41. package/ios/AcceptSdkReactNativeAppDelegate.swift +0 -13
  42. package/ios/AcceptSdkReactNativeModule.swift +0 -749
  43. package/ios/Podfile +0 -63
  44. package/ios/Podfile.properties.json +0 -4
  45. package/ios/acceptsdkreactnative.xcodeproj/project.pbxproj +0 -540
  46. package/ios/acceptsdkreactnative.xcodeproj/xcshareddata/xcschemes/acceptsdkreactnative.xcscheme +0 -88
  47. package/plugin/withCustomRepoModule.js +0 -96
@@ -1,259 +0,0 @@
1
- /** Start and end hex colors for a gradient. */
2
- export type GradientColors = {
3
- /** Hex color string. 6-digit `#RRGGBB` or 8-digit `#AARRGGBB` (alpha first). */
4
- start: string;
5
- /** Hex color string. 6-digit `#RRGGBB` or 8-digit `#AARRGGBB` (alpha first). */
6
- end: string;
7
- };
8
- /**
9
- * Custom color palette. All four base colors are required when providing colors —
10
- * they replace the entire color theme, not individual tokens.
11
- */
12
- export type AcceptColorTheme = {
13
- /** Primary accent color. 6-digit `#RRGGBB` or 8-digit `#AARRGGBB` (alpha first). */
14
- accent: string;
15
- error: string;
16
- warning: string;
17
- success: string;
18
- brandGradientColors?: GradientColors;
19
- brandSubtleGradientColors?: GradientColors;
20
- };
21
- /**
22
- * Custom image assets. All three slots are required when providing images —
23
- * provide all or omit the `images` key entirely to use SDK defaults.
24
- */
25
- export type AcceptImageTheme = {
26
- /** Square logo used on branded screens. Base64-encoded PNG or JPEG. */
27
- brandLogo: string;
28
- /** Logo shown in toolbar / navigation bar. Base64-encoded PNG or JPEG. */
29
- toolbarLogo: string;
30
- /** Solid (monochrome) logo variant. Base64-encoded PNG or JPEG. */
31
- solidLogo: string;
32
- };
33
- /**
34
- * UI theme overrides. Omit `colors` and/or `images` to keep SDK defaults for those slots.
35
- *
36
- * When `themeId` is set, the SDK loads a built-in preset theme (colors + images) by ID and
37
- * ignores `colors`/`images`. Unknown IDs fall back to SDK defaults. Demo only.
38
- */
39
- export type AcceptThemeConfiguration = {
40
- /** Preset theme ID. When set, overrides `colors` and `images`. Demo only. */
41
- themeId?: string;
42
- colors?: AcceptColorTheme;
43
- images?: AcceptImageTheme;
44
- };
45
- /** Where the NFC indicator is drawn relative to the tap zone. */
46
- export type NfcIndicator = 'DEFAULT' | 'ABOVE' | 'BELOW' | 'FRONT' | 'BEHIND';
47
- /**
48
- * Position of the NFC tap zone on screen. Omit `position` from {@link NfcZone} to let the
49
- * underlying terminal pick. Provide `{ xBias, yBias }` (each in `0..1`) for a manual position.
50
- */
51
- export type NfcPosition = {
52
- /** Horizontal bias (0.0 = left, 1.0 = right). */
53
- xBias: number;
54
- /** Vertical bias (0.0 = top, 1.0 = bottom). */
55
- yBias: number;
56
- };
57
- /** Overrides the Tap-to-Pay NFC zone shown over the card payment flow. */
58
- export type NfcZone = {
59
- indicator: NfcIndicator;
60
- /** Omit to let the underlying terminal pick the position. */
61
- position?: NfcPosition;
62
- };
63
- /**
64
- * Configures SDK-owned UI behavior around a transaction.
65
- *
66
- * @property resultScreenDurationSeconds How long the post-transaction result screen stays on
67
- * screen before auto-closing. Ignored when `showResultScreen` is `false`. Defaults to `10`.
68
- * @property showResultScreen Whether the SDK shows its own result screen after a transaction
69
- * completes. Defaults to `true`.
70
- * @property nfcZone Overrides the Tap-to-Pay NFC indicator and tap zone position.
71
- */
72
- export type AcceptUiBehavior = {
73
- resultScreenDurationSeconds?: number;
74
- showResultScreen?: boolean;
75
- nfcZone?: NfcZone;
76
- };
77
- /** Current authentication/initialization state of the SDK. */
78
- export type SdkStatus = 'IDLE' | 'INITIALIZED' | 'LOGGED_IN';
79
- /** Intent for initiating a card (tap-to-pay) payment. */
80
- export type CardPaymentIntent = {
81
- /** Unique payment intent identifier obtained from your backend. */
82
- paymentIntentId: string;
83
- /** Amount in the smallest currency unit (e.g. hellers for CZK, cents for EUR). */
84
- amount: number;
85
- /** ISO 4217 alpha-3 currency code the customer is charged in. */
86
- requestedCurrency: string;
87
- /** ISO 4217 alpha-3 currency code funds settle in. Defaults to `requestedCurrency` when omitted. */
88
- settlementCurrency?: string;
89
- };
90
- /** Intent for initiating a SEPA Instant bank transfer payment. */
91
- export type SepaPaymentIntent = {
92
- /** Unique payment intent identifier obtained from your backend. */
93
- paymentIntentId: string;
94
- /** Amount in the smallest currency unit. */
95
- amount: number;
96
- /** ISO 4217 alpha-3 currency code the customer is charged in. */
97
- requestedCurrency: string;
98
- /** ISO 4217 alpha-3 currency code funds settle in. Defaults to `requestedCurrency` when omitted. */
99
- settlementCurrency?: string;
100
- };
101
- /** Intent for initiating a Certis Instant bank transfer payment. */
102
- export type CertisPaymentIntent = {
103
- /** Unique payment intent identifier obtained from your backend. */
104
- paymentIntentId: string;
105
- /** Amount in the smallest currency unit. */
106
- amount: number;
107
- /** ISO 4217 alpha-3 currency code the customer is charged in. */
108
- requestedCurrency: string;
109
- /** ISO 4217 alpha-3 currency code funds settle in. Defaults to `requestedCurrency` when omitted. */
110
- settlementCurrency?: string;
111
- };
112
- /** Result of a completed card payment. */
113
- export type CardPaymentResult = {
114
- /** Final payment status. */
115
- status: CardPaymentStatus;
116
- /** Last 4 digits of the card number. */
117
- last4?: string;
118
- /** Merchant company name. */
119
- companyName?: string;
120
- companyAddress1?: string;
121
- companyAddress2?: string;
122
- companyCity?: string;
123
- /** ISO 3166-1 alpha-2 country code (e.g. `CZ`, `SK`, `GB`). */
124
- companyCountry?: string;
125
- terminalId?: string;
126
- authorizationCode?: string;
127
- /** Card brand (e.g. `VISA`, `MASTERCARD`). */
128
- brand?: string;
129
- /** Decline or abort reason when status is not `approved`. */
130
- reason?: string;
131
- /** URL to the digital receipt for this transaction. */
132
- receiptUrl?: string;
133
- /** Server-issued token identifying a refund applied to this payment. Present when this card payment was refunded. */
134
- refundToken?: string;
135
- };
136
- /** Intermediate status updates emitted during a card payment flow. */
137
- export type CardPaymentStatus = 'pending' | 'approved' | 'declined' | 'refunded' | 'aborted';
138
- /** Result of a completed SEPA Instant payment. */
139
- export type SepaPaymentResult = {
140
- /** Final payment status. */
141
- status: SepaInstantPaymentStatus;
142
- /** Whether the payment was postponed for later processing. */
143
- postponed: boolean;
144
- /** ISO 8601 timestamp of when funds were received. */
145
- receivedAt: string;
146
- /** IBAN the funds were received from. */
147
- receivedFromIban: string;
148
- /** URL to the digital receipt for this transaction. */
149
- receiptUrl?: string;
150
- };
151
- /** Intermediate status updates emitted during a SEPA Instant payment flow. */
152
- export type SepaInstantPaymentStatus = 'pending' | 'verified' | 'aborted' | 'refunded' | 'declined';
153
- /** Result of a completed Certis Instant payment. */
154
- export type CertisPaymentResult = {
155
- /** Final payment status. */
156
- status: CertisInstantPaymentStatus;
157
- /** Whether the payment was postponed for later processing. */
158
- postponed: boolean;
159
- /** ISO 8601 timestamp of when funds were received. */
160
- receivedAt: string;
161
- /** IBAN the funds were received from. */
162
- receivedFromIban: string;
163
- /** URL to the digital receipt for this transaction. */
164
- receiptUrl?: string;
165
- };
166
- /** Intermediate status updates emitted during a Certis Instant payment flow. */
167
- export type CertisInstantPaymentStatus = 'pending' | 'verified' | 'aborted' | 'refunded' | 'declined';
168
- /** Optional prefill data for the KYB onboarding flow. All fields are optional. */
169
- export type KybPrefillData = {
170
- /** Legal structure of the business. */
171
- businessType?: 'individual' | 'company' | 'nonProfit' | 'governmentEntity';
172
- /** ISO 3166-1 alpha-2 country code (e.g. `"CZ"`, `"DE"`). */
173
- countryCode?: string;
174
- /** Company registration / identification number. */
175
- registrationNumber?: string;
176
- vatNumber?: string;
177
- /** Legal company name. */
178
- legalName?: string;
179
- addressLine1?: string;
180
- addressLine2?: string;
181
- city?: string;
182
- postalCode?: string;
183
- /** 4-digit Merchant Category Code (MCC). */
184
- merchantCategoryCode?: number;
185
- businessEmail?: string;
186
- /** IBAN for payout settlement. */
187
- bankAccountIban?: string;
188
- businessUrl?: string;
189
- productDescription?: string;
190
- supportPhone?: string;
191
- };
192
- /** Supported payment methods for onboarding status queries. */
193
- export type PaymentMethod = 'CARD' | 'SEPA' | 'CERTIS' | 'CRYPTO';
194
- /** Onboarding state for a single payment method. */
195
- export type PaymentMethodStatus = 'NOT_STARTED' | 'PENDING' | 'ACTIVE' | 'ATTENTION_NEEDED' | 'ACTION_REQUIRED' | 'BLOCKED';
196
- /** Per-method onboarding status entry. */
197
- export type AcceptPaymentMethodStatus = {
198
- method: PaymentMethod;
199
- status: PaymentMethodStatus;
200
- };
201
- /** Aggregate onboarding status for the authenticated merchant. */
202
- export type AcceptOnboardingStatus = {
203
- /** `true` when the merchant has completed onboarding for at least one payment method. */
204
- isOnboarded: boolean;
205
- /** Per-method onboarding status entries. */
206
- paymentMethods: AcceptPaymentMethodStatus[];
207
- };
208
- /** Reason a card refund is issued. */
209
- export type RefundReason = 'customerRequest' | 'duplicate' | 'fraudulent' | 'expiredCharge';
210
- /** Final state of a refund transaction. */
211
- export type TransactionStatus = 'pending' | 'success' | 'cancelled' | 'refunded' | 'failed' | 'actionNeeded';
212
- /** Arguments for {@link payments.refund}. */
213
- export type RefundIntent = {
214
- /** Token of the source payment to refund. Accepts the server payment UUID or the original charge's `paymentIntentId`. */
215
- paymentToken: string;
216
- /** Optional client-provided idempotency token. Pass the same value across retries to avoid duplicate refunds. */
217
- refundToken?: string;
218
- /** Reason for the refund. */
219
- reason: RefundReason;
220
- };
221
- /**
222
- * Result of a refund request.
223
- *
224
- * On iOS this is fully populated. On Android only `status` and `refundToken` are populated —
225
- * call {@link getPaymentStatus} on the source payment for richer state.
226
- */
227
- export type RefundResult = {
228
- /** Server-generated refund token. May be undefined on Android. */
229
- refundToken?: string;
230
- /** Status of the refund transaction. */
231
- status: TransactionStatus;
232
- /** Payment method of the original transaction. iOS only. */
233
- paymentMethod?: PaymentMethod;
234
- /** Refund amount in the smallest unit of the requested currency. iOS only. */
235
- requestedAmount?: number;
236
- /** ISO 4217 alpha-3 code of the requested currency. iOS only. */
237
- requestedCurrency?: string;
238
- /** Refund amount in the smallest unit of the settlement currency. iOS only. */
239
- settlementAmount?: number;
240
- /** ISO 4217 alpha-3 code of the settlement currency. iOS only. */
241
- settlementCurrency?: string;
242
- /** Conversion rate from requested currency to settlement currency. iOS only. */
243
- fxRate?: number;
244
- /** Reason for the refund. */
245
- refundReason: RefundReason;
246
- /** ISO 8601 UTC timestamp when the refund was initiated. iOS only. */
247
- createdAt?: string;
248
- /** ISO 8601 UTC timestamp when the refund was processed. iOS only. */
249
- processedAt?: string;
250
- };
251
- export type AcceptSdkReactNativeModuleEvents = {
252
- onCardPaymentStatusChange: (status: Map<string, string>) => void;
253
- onSepaPaymentStatusChange: (status: Map<string, string>) => void;
254
- onCertisPaymentStatusChange: (status: Map<string, string>) => void;
255
- onCardPaymentException: (map: Map<string, string>) => void;
256
- onSepaPaymentException: (map: Map<string, string>) => void;
257
- onCertisPaymentException: (map: Map<string, string>) => void;
258
- };
259
- //# sourceMappingURL=AcceptSdkReactNative.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AcceptSdkReactNative.types.d.ts","sourceRoot":"","sources":["../src/AcceptSdkReactNative.types.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,MAAM,MAAM,cAAc,GAAG;IAC3B,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,GAAG,EAAE,MAAM,CAAC;CACb,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,oFAAoF;IACpF,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,mBAAmB,CAAC,EAAE,cAAc,CAAC;IACrC,yBAAyB,CAAC,EAAE,cAAc,CAAC;CAC5C,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,uEAAuE;IACvE,SAAS,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,WAAW,E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0,0 @@
1
- {"version":3,"file":"AcceptSdkReactNative.types.js","sourceRoot":"","sources":["../src/AcceptSdkReactNative.types.ts"],"names":[],"mappings":"","sourcesContent":["/** Start and end hex colors for a gradient. */\nexport type GradientColors = {\n /** Hex color string. 6-digit `#RRGGBB` or 8-digit `#AARRGGBB` (alpha first). */\n start: string;\n /** Hex color string. 6-digit `#RRGGBB` or 8-digit `#AARRGGBB` (alpha first). */\n end: string;\n}\n\n/**\n * Custom color palette. All four base colors are required when providing colors —\n * they replace the entire color theme, not individual tokens.\n */\nexport type AcceptColorTheme = {\n /** Primary accent color. 6-digit `#RRGGBB` or 8-digit `#AARRGGBB` (alpha first). */\n accent: string;\n error: string;\n warning: string;\n success: string;\n brandGradientColors?: GradientColors;\n brandSubtleGradientColors?: GradientColors;\n}\n\n/**\n * Custom image assets. All three slots are required when providing images —\n * provide all or omit the `images` key entirely to use SDK defaults.\n */\nexport type AcceptImageTheme = {\n /** Square logo used on branded screens. Base64-encoded PNG or JPEG. */\n brandLogo: string;\n /** Logo shown in toolbar / navigation bar. Base64-encoded PNG or JPEG. */\n toolbarLogo: string;\n /** Solid (monochrome) logo variant. Base64-encoded PNG or JPEG. */\n solidLogo: string;\n}\n\n/**\n * UI theme overrides. Omit `colors` and/or `images` to keep SDK defaults for those slots.\n *\n * When `themeId` is set, the SDK loads a built-in preset theme (colors + images) by ID and\n * ignores `colors`/`images`. Unknown IDs fall back to SDK defaults. Demo only.\n */\nexport type AcceptThemeConfiguration = {\n /** Preset theme ID. When set, overrides `colors` and `images`. Demo only. */\n themeId?: string;\n colors?: AcceptColorTheme;\n images?: AcceptImageTheme;\n}\n\n/** Where the NFC indicator is drawn relative to the tap zone. */\nexport type NfcIndicator = 'DEFAULT' | 'ABOVE' | 'BELOW' | 'FRONT' | 'BEHIND';\n\n/**\n * Position of the NFC tap zone on screen. Omit `position` from {@link NfcZone} to let the\n * underlying terminal pick. Provide `{ xBias, yBias }` (each in `0..1`) for a manual position.\n */\nexport type NfcPosition = {\n /** Horizontal bias (0.0 = left, 1.0 = right). */\n xBias: number;\n /** Vertical bias (0.0 = top, 1.0 = bottom). */\n yBias: number;\n}\n\n/** Overrides the Tap-to-Pay NFC zone shown over the card payment flow. */\nexport type NfcZone = {\n indicator: NfcIndicator;\n /** Omit to let the underlying terminal pick the position. */\n position?: NfcPosition;\n}\n\n/**\n * Configures SDK-owned UI behavior around a transaction.\n *\n * @property resultScreenDurationSeconds How long the post-transaction result screen stays on\n * screen before auto-closing. Ignored when `showResultScreen` is `false`. Defaults to `10`.\n * @property showResultScreen Whether the SDK shows its own result screen after a transaction\n * completes. Defaults to `true`.\n * @property nfcZone Overrides the Tap-to-Pay NFC indicator and tap zone position.\n */\nexport type AcceptUiBehavior = {\n resultScreenDurationSeconds?: number;\n showResultScreen?: boolean;\n nfcZone?: NfcZone;\n}\n\n/** Current authentication/initialization state of the SDK. */\nexport type SdkStatus = 'IDLE' | 'INITIALIZED' | 'LOGGED_IN'\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 /** ISO 4217 alpha-3 currency code the customer is charged in. */\n requestedCurrency: string;\n /** ISO 4217 alpha-3 currency code funds settle in. Defaults to `requestedCurrency` when omitted. */\n settlementCurrency?: string;\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 /** ISO 4217 alpha-3 currency code the customer is charged in. */\n requestedCurrency: string;\n /** ISO 4217 alpha-3 currency code funds settle in. Defaults to `requestedCurrency` when omitted. */\n settlementCurrency?: string;\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 /** ISO 4217 alpha-3 currency code the customer is charged in. */\n requestedCurrency: string;\n /** ISO 4217 alpha-3 currency code funds settle in. Defaults to `requestedCurrency` when omitted. */\n settlementCurrency?: string;\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 /** ISO 3166-1 alpha-2 country code (e.g. `CZ`, `SK`, `GB`). */\n companyCountry?: string;\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 /** URL to the digital receipt for this transaction. */\n receiptUrl?: string;\n /** Server-issued token identifying a refund applied to this payment. Present when this card payment was refunded. */\n refundToken?: 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 /** URL to the digital receipt for this transaction. */\n receiptUrl?: 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 /** URL to the digital receipt for this transaction. */\n receiptUrl?: 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\n/** Supported payment methods for onboarding status queries. */\nexport type PaymentMethod = 'CARD' | 'SEPA' | 'CERTIS' | 'CRYPTO';\n\n/** Onboarding state for a single payment method. */\nexport type PaymentMethodStatus =\n | 'NOT_STARTED'\n | 'PENDING'\n | 'ACTIVE'\n | 'ATTENTION_NEEDED'\n | 'ACTION_REQUIRED'\n | 'BLOCKED';\n\n/** Per-method onboarding status entry. */\nexport type AcceptPaymentMethodStatus = {\n method: PaymentMethod;\n status: PaymentMethodStatus;\n}\n\n/** Aggregate onboarding status for the authenticated merchant. */\nexport type AcceptOnboardingStatus = {\n /** `true` when the merchant has completed onboarding for at least one payment method. */\n isOnboarded: boolean;\n /** Per-method onboarding status entries. */\n paymentMethods: AcceptPaymentMethodStatus[];\n}\n\n/** Reason a card refund is issued. */\nexport type RefundReason =\n | 'customerRequest'\n | 'duplicate'\n | 'fraudulent'\n | 'expiredCharge';\n\n/** Final state of a refund transaction. */\nexport type TransactionStatus =\n | 'pending'\n | 'success'\n | 'cancelled'\n | 'refunded'\n | 'failed'\n | 'actionNeeded';\n\n/** Arguments for {@link payments.refund}. */\nexport type RefundIntent = {\n /** Token of the source payment to refund. Accepts the server payment UUID or the original charge's `paymentIntentId`. */\n paymentToken: string;\n /** Optional client-provided idempotency token. Pass the same value across retries to avoid duplicate refunds. */\n refundToken?: string;\n /** Reason for the refund. */\n reason: RefundReason;\n}\n\n/**\n * Result of a refund request.\n *\n * On iOS this is fully populated. On Android only `status` and `refundToken` are populated —\n * call {@link getPaymentStatus} on the source payment for richer state.\n */\nexport type RefundResult = {\n /** Server-generated refund token. May be undefined on Android. */\n refundToken?: string;\n /** Status of the refund transaction. */\n status: TransactionStatus;\n /** Payment method of the original transaction. iOS only. */\n paymentMethod?: PaymentMethod;\n /** Refund amount in the smallest unit of the requested currency. iOS only. */\n requestedAmount?: number;\n /** ISO 4217 alpha-3 code of the requested currency. iOS only. */\n requestedCurrency?: string;\n /** Refund amount in the smallest unit of the settlement currency. iOS only. */\n settlementAmount?: number;\n /** ISO 4217 alpha-3 code of the settlement currency. iOS only. */\n settlementCurrency?: string;\n /** Conversion rate from requested currency to settlement currency. iOS only. */\n fxRate?: number;\n /** Reason for the refund. */\n refundReason: RefundReason;\n /** ISO 8601 UTC timestamp when the refund was initiated. iOS only. */\n createdAt?: string;\n /** ISO 8601 UTC timestamp when the refund was processed. iOS only. */\n processedAt?: 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"]}
package/ios/.xcode.env DELETED
@@ -1,11 +0,0 @@
1
- # This `.xcode.env` file is versioned and is used to source the environment
2
- # used when running script phases inside Xcode.
3
- # To customize your local environment, you can create an `.xcode.env.local`
4
- # file that is not versioned.
5
-
6
- # NODE_BINARY variable contains the PATH to the node executable.
7
- #
8
- # Customize the NODE_BINARY variable here.
9
- # For example, to use nvm with brew, add the following line
10
- # . "$(brew --prefix nvm)/nvm.sh" --no-use
11
- export NODE_BINARY=$(command -v node)
@@ -1,33 +0,0 @@
1
- require 'json'
2
-
3
- package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
4
-
5
- Pod::Spec.new do |s|
6
- s.name = 'AcceptSdkReactNative'
7
- s.version = package['version']
8
- s.summary = package['description']
9
- s.description = package['description']
10
- s.license = package['license']
11
- s.author = package['author']
12
- s.homepage = package['homepage']
13
- s.platforms = {
14
- :ios => '26.0'
15
- }
16
- s.swift_version = '6.0'
17
- s.source = { git: 'https://github.com/tapayadot/accept-react-native' }
18
- s.static_framework = true
19
-
20
- s.dependency 'ExpoModulesCore'
21
-
22
- # Swift/Objective-C compatibility
23
- # AcceptSDK is a static SPM lib — its .swiftmodule lands directly in
24
- # PODS_CONFIGURATION_BUILD_DIR. Dynamic SPM frameworks (Sentry, Lottie) also
25
- # land there (not in a PackageFrameworks/ subdirectory).
26
- s.pod_target_xcconfig = {
27
- 'DEFINES_MODULE' => 'YES',
28
- 'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "$(PODS_CONFIGURATION_BUILD_DIR)"',
29
- 'SWIFT_INCLUDE_PATHS' => '$(inherited) "$(PODS_CONFIGURATION_BUILD_DIR)"',
30
- }
31
-
32
- s.source_files = "*.{h,m,mm,swift,hpp,cpp}"
33
- end
@@ -1,13 +0,0 @@
1
- import AcceptSDK
2
- import ExpoModulesCore
3
- import UIKit
4
-
5
- public class AcceptSdkReactNativeAppDelegate: ExpoAppDelegateSubscriber {
6
- public func application(
7
- _ app: UIApplication,
8
- open url: URL,
9
- options: [UIApplication.OpenURLOptionsKey: Any] = [:]
10
- ) -> Bool {
11
- Accept.handle(url: url)
12
- }
13
- }