@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,31 +1,72 @@
1
- import { NativeModule } from 'expo';
2
- import { AcceptThemeConfiguration, AcceptUiBehavior, CardPaymentIntent, CardPaymentResult, SepaPaymentIntent, SepaPaymentResult, CertisPaymentIntent, CertisPaymentResult, KybPrefillData, AcceptSdkReactNativeModuleEvents, AcceptOnboardingStatus, PaymentMethod, PaymentMethodStatus, RefundIntent, RefundResult } from './AcceptSdkReactNative.types';
1
+ import { NativeModule } from "expo";
2
+ import type { AcceptDisplay, AcceptLogEntry, AcceptLogLevel, AcceptTheme, ActivateTerminalResult, MerchantConfig, MerchantInformation, MinimumAmount, OnboardingStatus, PaymentEvent, PaymentOptions, PaymentRequest, PaymentState, PaymentStatus, PluginStatus, PluginUpdateInfo, RefundReason, SdkState } from "./Accept.types";
3
+ /**
4
+ * Events the native module emits.
5
+ *
6
+ * `onPaymentEvent` carries the `requestId` its caller passed to `startPayment`, because several
7
+ * payments can be in flight across a JavaScript reload even though the SDK runs one at a time.
8
+ */
9
+ export type AcceptSdkReactNativeModuleEvents = {
10
+ onStateChange: (payload: {
11
+ state: SdkState;
12
+ }) => void;
13
+ onPaymentEvent: (payload: {
14
+ requestId: string;
15
+ event: PaymentEvent;
16
+ }) => void;
17
+ onLog: (payload: AcceptLogEntry) => void;
18
+ };
19
+ /**
20
+ * The flat native surface. Each function maps to one `Accept.*` call in the Android SDK; the
21
+ * namespaced shape callers use is assembled in `Accept.ts`.
22
+ *
23
+ * Failures reject with an Expo `CodedException` whose `code` is the `AcceptException` subclass
24
+ * name and whose `message` is a JSON object holding the human-readable text and the error's own
25
+ * fields. `toAcceptError` turns that back into a typed `AcceptError`.
26
+ */
3
27
  declare class AcceptSdkReactNativeModule extends NativeModule<AcceptSdkReactNativeModuleEvents> {
4
- initialize(demo: boolean, theme?: AcceptThemeConfiguration): Promise<void>;
5
- setTheme(theme: AcceptThemeConfiguration): Promise<void>;
6
- /** @platform android */
7
- setUiBehavior(behavior: AcceptUiBehavior): Promise<void>;
8
- authenticate(token: string): Promise<boolean>;
9
- getStatus(): Promise<'IDLE' | 'INITIALIZED' | 'LOGGED_IN'>;
10
- getPaymentStatus(paymentIntentId: string): Promise<string>;
11
- logOut(): Promise<boolean>;
12
- requestLocationPermission(): Promise<boolean>;
13
- presentKyb(prefilling?: KybPrefillData): Promise<void>;
14
- isPaymentPending(): Promise<boolean>;
15
- startCardPayment(paymentIntent: CardPaymentIntent): Promise<CardPaymentResult>;
16
- startSepaPayment(paymentIntent: SepaPaymentIntent): Promise<SepaPaymentResult>;
17
- startCertisPayment(paymentIntent: CertisPaymentIntent): Promise<CertisPaymentResult>;
18
- refund(intent: RefundIntent): Promise<RefundResult>;
19
- cancelActivePayment(): Promise<void>;
20
- enableDemoMode(): Promise<void>;
21
- disableDemoMode(): Promise<void>;
22
- isDemoMode(): Promise<boolean>;
23
- getOnboardingStatus(): Promise<AcceptOnboardingStatus>;
24
- getPaymentMethodStatus(method: PaymentMethod): Promise<PaymentMethodStatus>;
25
- pairWithCompanionApp(): Promise<void>;
26
- isCompanionAppInstalled(): Promise<boolean>;
27
- presentCompanionAppSheet(): Promise<void>;
28
+ initialize(isProduction: boolean): void;
29
+ getState(): SdkState;
30
+ clear(): Promise<void>;
31
+ setDebugLoggingEnabled(enabled: boolean): void;
32
+ setLogLevel(level: AcceptLogLevel): void;
33
+ setLogForwardingEnabled(enabled: boolean): void;
34
+ setTheme(theme: AcceptTheme | null): void;
35
+ getTheme(): AcceptTheme | null;
36
+ createLocalThemeImageUri(base64: string, fileExtension: string): string;
37
+ authenticate(merchantToken: string): Promise<void>;
38
+ getSdkVersion(): string;
39
+ isProduction(): boolean;
40
+ getDeviceId(): Promise<string | null>;
41
+ getMinimumAmounts(): Promise<MinimumAmount[]>;
42
+ getMerchantInfo(): Promise<MerchantInformation | null>;
43
+ getMerchantConfig(): Promise<MerchantConfig>;
44
+ getOnboardingStatus(): Promise<OnboardingStatus>;
45
+ getAvailableCurrencies(): Promise<string[]>;
46
+ setPaymentOptions(options: PaymentOptions): void;
47
+ startPayment(requestId: string, request: PaymentRequest): void;
48
+ stopPaymentEvents(requestId: string): void;
49
+ getPaymentStatus(paymentToken: string): Promise<PaymentStatus>;
50
+ cancelPayment(paymentToken: string): Promise<PaymentState>;
51
+ refundPayment(paymentToken: string, reason: RefundReason): Promise<PaymentState>;
52
+ isPluginInstalled(): boolean;
53
+ installPlugin(): Promise<void>;
54
+ activateTerminal(): Promise<ActivateTerminalResult>;
55
+ getPluginStatus(): Promise<PluginStatus>;
56
+ getPluginUpdateInfo(): Promise<PluginUpdateInfo>;
57
+ logoutPlugin(): Promise<void>;
58
+ getDisplays(): AcceptDisplay[];
59
+ getCustomerFacingDisplay(): AcceptDisplay | null;
60
+ isDualScreen(): boolean;
28
61
  }
62
+ /**
63
+ * The native module, resolved lazily.
64
+ *
65
+ * Deferring the lookup past import time is what makes the errors above reachable: a top-level
66
+ * `requireNativeModule` throws while the bundle is still evaluating, which surfaces as a crash at
67
+ * the first `import` of this package rather than at the call that needed it. Importing on iOS is
68
+ * then harmless, and only actually calling a method fails.
69
+ */
29
70
  declare const _default: AcceptSdkReactNativeModule;
30
71
  export default _default;
31
72
  //# sourceMappingURL=AcceptSdkReactNativeModule.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AcceptSdkReactNativeModule.d.ts","sourceRoot":"","sources":["../src/AcceptSdkReactNativeModule.ts"],"names":[],"mapp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AC;IAC9D,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAC1D,aAAa,CACX,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,YAAY,CAAC;IAGxB,iBAAiB,IAAI,OAAO;IAC5B,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAC9B,gBAAgB,IAAI,OAAO,CAAC,sBAAsB,CAAC;IACnD,eAAe,IAAI,OAAO,CAAC,YAAY,CAAC;IACxC,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAChD,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAG7B,WAAW,IAAI,aAAa,EAAE;IAC9B,wBAAwB,IAAI,aAAa,GAAG,IAAI;IAChD,YAAY,IAAI,OAAO;CACxB;AAwCD;;;;;;;GAOG;;AACH,wBAcG"}
@@ -1,4 +1,54 @@
1
- import { requireNativeModule } from 'expo';
2
- // This call loads the native module object from the JSI.
3
- export default requireNativeModule('AcceptSdkReactNative');
1
+ import { requireNativeModule } from "expo";
2
+ import { Platform } from "react-native";
3
+ const NATIVE_MODULE_NAME = "AcceptSdkReactNative";
4
+ /**
5
+ * Loads the native module, replacing the two ways it can be missing with an actionable message.
6
+ *
7
+ * The module is Android-only, so on any other platform the failure is structural and the caller
8
+ * has to branch on `Platform.OS`. On Android the usual cause is a JavaScript-only runtime — Expo
9
+ * Go, or a build made before the config plugin was added — which `requireNativeModule` reports as
10
+ * a bare "Cannot find native module" with no hint about what to do next.
11
+ */
12
+ function loadNativeModule() {
13
+ if (Platform.OS !== "android") {
14
+ throw new Error(`@tapayadot/accept-react-native is Android-only, but it was called on "${Platform.OS}". ` +
15
+ `Guard your calls with \`Platform.OS === 'android'\`, or move them into an ` +
16
+ `\`*.android.ts\` file.`);
17
+ }
18
+ try {
19
+ return requireNativeModule(NATIVE_MODULE_NAME);
20
+ }
21
+ catch (cause) {
22
+ throw new Error(`The native module "${NATIVE_MODULE_NAME}" is not available. This package needs a ` +
23
+ `development build and does not run in Expo Go. Add ` +
24
+ `"@tapayadot/accept-react-native" to the \`plugins\` array in app.json, then rebuild ` +
25
+ `with \`npx expo prebuild --clean\` and \`npx expo run:android\`.`, { cause });
26
+ }
27
+ }
28
+ let nativeModule = null;
29
+ /** Loads the native module on first use, then memoizes it. */
30
+ const native = () => (nativeModule ??= loadNativeModule());
31
+ /**
32
+ * The native module, resolved lazily.
33
+ *
34
+ * Deferring the lookup past import time is what makes the errors above reachable: a top-level
35
+ * `requireNativeModule` throws while the bundle is still evaluating, which surfaces as a crash at
36
+ * the first `import` of this package rather than at the call that needed it. Importing on iOS is
37
+ * then harmless, and only actually calling a method fails.
38
+ */
39
+ export default new Proxy({}, {
40
+ get(_target, property) {
41
+ const module = native();
42
+ // The module itself is the receiver: native methods dispatch through it, and routing a getter
43
+ // back through the proxy would re-enter this trap.
44
+ const value = Reflect.get(module, property, module);
45
+ return typeof value === "function" ? value.bind(module) : value;
46
+ },
47
+ set(_target, property, value) {
48
+ return Reflect.set(native(), property, value);
49
+ },
50
+ has(_target, property) {
51
+ return Reflect.has(native(), property);
52
+ },
53
+ });
4
54
  //# sourceMappingURL=AcceptSdkReactNativeModule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AcceptSdkReactNativeModule.js","sourceRoot":"","sources":["../src/AcceptSdkReactNativeModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,MAAM,CAAC;AA+BzD,yDAAyD;AACzD,eAAe,mBAAmB,CAA6B,sBAAsB,CAAC,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from 'expo';\n\nimport { AcceptThemeConfiguration, AcceptUiBehavior, CardPaymentIntent, CardPaymentResult, SepaPaymentIntent, SepaPaymentResult, CertisPaymentIntent, CertisPaymentResult, KybPrefillData, AcceptSdkReactNativeModuleEvents, AcceptOnboardingStatus, PaymentMethod, PaymentMethodStatus, RefundIntent, RefundResult } from './AcceptSdkReactNative.types';\n\ndeclare class AcceptSdkReactNativeModule extends NativeModule<AcceptSdkReactNativeModuleEvents> {\n initialize(demo: boolean, theme?: AcceptThemeConfiguration): Promise<void>;\n setTheme(theme: AcceptThemeConfiguration): Promise<void>;\n /** @platform android */\n setUiBehavior(behavior: AcceptUiBehavior): Promise<void>;\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 refund(intent: RefundIntent): Promise<RefundResult>;\n cancelActivePayment(): Promise<void>;\n enableDemoMode(): Promise<void>;\n disableDemoMode(): Promise<void>;\n isDemoMode(): Promise<boolean>;\n getOnboardingStatus(): Promise<AcceptOnboardingStatus>;\n getPaymentMethodStatus(method: PaymentMethod): Promise<PaymentMethodStatus>;\n pairWithCompanionApp(): Promise<void>;\n isCompanionAppInstalled(): Promise<boolean>;\n presentCompanionAppSheet(): Promise<void>;\n}\n\n// This call loads the native module object from the JSI.\nexport default requireNativeModule<AcceptSdkReactNativeModule>('AcceptSdkReactNative');\n"]}
1
+ {"version":3,"file":"AcceptSdkReactNativeModule.js","sourceRoot":"","sources":["../src/AcceptSdkReactNativeModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,MAAM,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAmGxC,MAAM,kBAAkB,GAAG,sBAAsB,CAAC;AAElD;;;;;;;GAOG;AACH,SAAS,gBAAgB;IACvB,IAAI,QAAQ,CAAC,EAA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esContent":["import { NativeModule, requireNativeModule } from \"expo\";\nimport { Platform } from \"react-native\";\n\nimport type {\n AcceptDisplay,\n AcceptLogEntry,\n AcceptLogLevel,\n AcceptTheme,\n ActivateTerminalResult,\n MerchantConfig,\n MerchantInformation,\n MinimumAmount,\n OnboardingStatus,\n PaymentEvent,\n PaymentOptions,\n PaymentRequest,\n PaymentState,\n PaymentStatus,\n PluginStatus,\n PluginUpdateInfo,\n RefundReason,\n SdkState,\n} from \"./Accept.types\";\n\n/**\n * Events the native module emits.\n *\n * `onPaymentEvent` carries the `requestId` its caller passed to `startPayment`, because several\n * payments can be in flight across a JavaScript reload even though the SDK runs one at a time.\n */\nexport type AcceptSdkReactNativeModuleEvents = {\n onStateChange: (payload: { state: SdkState }) => void;\n onPaymentEvent: (payload: { requestId: string; event: PaymentEvent }) => void;\n onLog: (payload: AcceptLogEntry) => void;\n};\n\n/**\n * The flat native surface. Each function maps to one `Accept.*` call in the Android SDK; the\n * namespaced shape callers use is assembled in `Accept.ts`.\n *\n * Failures reject with an Expo `CodedException` whose `code` is the `AcceptException` subclass\n * name and whose `message` is a JSON object holding the human-readable text and the error's own\n * fields. `toAcceptError` turns that back into a typed `AcceptError`.\n */\ndeclare class AcceptSdkReactNativeModule extends NativeModule<AcceptSdkReactNativeModuleEvents> {\n // Lifecycle\n initialize(isProduction: boolean): void;\n getState(): SdkState;\n clear(): Promise<void>;\n\n // Diagnostics\n setDebugLoggingEnabled(enabled: boolean): void;\n setLogLevel(level: AcceptLogLevel): void;\n setLogForwardingEnabled(enabled: boolean): void;\n\n // Theming\n setTheme(theme: AcceptTheme | null): void;\n getTheme(): AcceptTheme | null;\n createLocalThemeImageUri(base64: string, fileExtension: string): string;\n\n // Auth\n authenticate(merchantToken: string): Promise<void>;\n\n // SDK\n getSdkVersion(): string;\n isProduction(): boolean;\n getDeviceId(): Promise<string | null>;\n getMinimumAmounts(): Promise<MinimumAmount[]>;\n\n // Merchant\n getMerchantInfo(): Promise<MerchantInformation | null>;\n getMerchantConfig(): Promise<MerchantConfig>;\n getOnboardingStatus(): Promise<OnboardingStatus>;\n getAvailableCurrencies(): Promise<string[]>;\n\n // Payments\n setPaymentOptions(options: PaymentOptions): void;\n startPayment(requestId: string, request: PaymentRequest): void;\n stopPaymentEvents(requestId: string): void;\n getPaymentStatus(paymentToken: string): Promise<PaymentStatus>;\n cancelPayment(paymentToken: string): Promise<PaymentState>;\n refundPayment(\n paymentToken: string,\n reason: RefundReason,\n ): Promise<PaymentState>;\n\n // Plugin\n isPluginInstalled(): boolean;\n installPlugin(): Promise<void>;\n activateTerminal(): Promise<ActivateTerminalResult>;\n getPluginStatus(): Promise<PluginStatus>;\n getPluginUpdateInfo(): Promise<PluginUpdateInfo>;\n logoutPlugin(): Promise<void>;\n\n // Displays\n getDisplays(): AcceptDisplay[];\n getCustomerFacingDisplay(): AcceptDisplay | null;\n isDualScreen(): boolean;\n}\n\nconst NATIVE_MODULE_NAME = \"AcceptSdkReactNative\";\n\n/**\n * Loads the native module, replacing the two ways it can be missing with an actionable message.\n *\n * The module is Android-only, so on any other platform the failure is structural and the caller\n * has to branch on `Platform.OS`. On Android the usual cause is a JavaScript-only runtime — Expo\n * Go, or a build made before the config plugin was added — which `requireNativeModule` reports as\n * a bare \"Cannot find native module\" with no hint about what to do next.\n */\nfunction loadNativeModule(): AcceptSdkReactNativeModule {\n if (Platform.OS !== \"android\") {\n throw new Error(\n `@tapayadot/accept-react-native is Android-only, but it was called on \"${Platform.OS}\". ` +\n `Guard your calls with \\`Platform.OS === 'android'\\`, or move them into an ` +\n `\\`*.android.ts\\` file.`,\n );\n }\n\n try {\n return requireNativeModule<AcceptSdkReactNativeModule>(NATIVE_MODULE_NAME);\n } catch (cause) {\n throw new Error(\n `The native module \"${NATIVE_MODULE_NAME}\" is not available. This package needs a ` +\n `development build and does not run in Expo Go. Add ` +\n `\"@tapayadot/accept-react-native\" to the \\`plugins\\` array in app.json, then rebuild ` +\n `with \\`npx expo prebuild --clean\\` and \\`npx expo run:android\\`.`,\n { cause },\n );\n }\n}\n\nlet nativeModule: AcceptSdkReactNativeModule | null = null;\n\n/** Loads the native module on first use, then memoizes it. */\nconst native = (): AcceptSdkReactNativeModule =>\n (nativeModule ??= loadNativeModule());\n\n/**\n * The native module, resolved lazily.\n *\n * Deferring the lookup past import time is what makes the errors above reachable: a top-level\n * `requireNativeModule` throws while the bundle is still evaluating, which surfaces as a crash at\n * the first `import` of this package rather than at the call that needed it. Importing on iOS is\n * then harmless, and only actually calling a method fails.\n */\nexport default new Proxy({} as AcceptSdkReactNativeModule, {\n get(_target, property) {\n const module = native();\n // The module itself is the receiver: native methods dispatch through it, and routing a getter\n // back through the proxy would re-enter this trap.\n const value = Reflect.get(module, property, module);\n return typeof value === \"function\" ? value.bind(module) : value;\n },\n set(_target, property, value) {\n return Reflect.set(native(), property, value);\n },\n has(_target, property) {\n return Reflect.has(native(), property);\n },\n});\n"]}
package/build/index.d.ts CHANGED
@@ -1,241 +1,11 @@
1
- import { type AcceptThemeConfiguration, type AcceptColorTheme, type AcceptImageTheme, type AcceptUiBehavior, type NfcIndicator, type NfcPosition, type NfcZone, type GradientColors, type CardPaymentResult, type SepaPaymentResult, type CertisPaymentResult, type CardPaymentIntent, type CertisPaymentIntent, type SepaPaymentIntent, type KybPrefillData, type SdkStatus, type AcceptOnboardingStatus, type AcceptPaymentMethodStatus, type PaymentMethod, type PaymentMethodStatus, type RefundIntent, type RefundResult, type RefundReason, type TransactionStatus, CardPaymentStatus, SepaInstantPaymentStatus, CertisInstantPaymentStatus } from './AcceptSdkReactNative.types';
2
- export type { AcceptThemeConfiguration, AcceptColorTheme, AcceptImageTheme, AcceptUiBehavior, NfcIndicator, NfcPosition, NfcZone, GradientColors, CardPaymentResult, SepaPaymentResult, CertisPaymentResult, CardPaymentIntent, SepaPaymentIntent, CertisPaymentIntent, CardPaymentStatus, SepaInstantPaymentStatus, CertisInstantPaymentStatus, SdkStatus, KybPrefillData, AcceptOnboardingStatus, AcceptPaymentMethodStatus, PaymentMethod, PaymentMethodStatus, RefundIntent, RefundResult, RefundReason, TransactionStatus, };
3
1
  /**
4
- * Initializes the SDK. Must be called before any other method.
5
- * @param demo - If `true`, connects to the sandbox environment. Defaults to `false` (production).
6
- * @param theme - Optional UI theme overrides applied at startup.
7
- */
8
- export declare const initialize: (demo?: boolean, theme?: AcceptThemeConfiguration) => Promise<void>;
9
- /**
10
- * Applies a UI theme after initialization. Can be called any time after {@link initialize}.
11
- * @param theme - UI theme overrides. Omit `colors` or `images` to keep SDK defaults for those slots.
12
- */
13
- export declare const setTheme: (theme: AcceptThemeConfiguration) => Promise<void>;
14
- /**
15
- * Configures SDK-owned UI behavior around a transaction —
16
- * result-screen visibility/duration and Tap-to-Pay NFC zone overrides.
17
- * No-op on iOS.
18
- * @platform android
19
- */
20
- export declare const setUiBehavior: (behavior: AcceptUiBehavior) => Promise<void>;
21
- /**
22
- * Authenticates a merchant session using a token obtained from your backend.
23
- * Call after {@link initialize}.
24
- * @param token - Merchant authentication token.
25
- * @throws If authentication fails (invalid token, network error, etc.).
26
- */
27
- export declare const authenticate: (token: string) => Promise<void>;
28
- /**
29
- * Returns the current SDK status.
30
- * - `IDLE` — not initialized
31
- * - `INITIALIZED` — initialized, not authenticated
32
- * - `LOGGED_IN` — authenticated and ready
33
- */
34
- export declare const getStatus: () => Promise<SdkStatus>;
35
- /**
36
- * Fetches the current status and details of a payment by its intent ID.
37
- * @param paymentIntentId - The payment intent identifier.
38
- * @returns The payment result typed to the appropriate payment method.
39
- * @throws If the payment intent is not found or the request fails.
40
- */
41
- export declare const getPaymentStatus: (paymentIntentId: string) => Promise<CardPaymentResult | SepaPaymentResult | CertisPaymentResult>;
42
- /**
43
- * Logs out the current merchant session.
44
- * The SDK remains initialized — call {@link authenticate} again to sign in a different merchant.
45
- */
46
- export declare const logOut: () => Promise<void>;
47
- /**
48
- * Requests fine and coarse location permissions required for card (tap-to-pay) payments.
49
- * @returns `true` if all location permissions were granted.
50
- */
51
- export declare const requestLocationPermission: () => Promise<boolean>;
52
- /**
53
- * Pairs the merchant app with the Tapaya companion app.
2
+ * Accept SDK for React Native / Expo — Android.
54
3
  *
55
- * On iOS this hands over via deep link; on Android it binds the companion app and runs a
56
- * readiness handshake. Rejects if the companion app is not installed or not ready to pair.
57
- */
58
- export declare const pairWithCompanionApp: () => Promise<void>;
59
- /**
60
- * Returns whether the Tapaya companion app is installed on the device.
61
- */
62
- export declare const isCompanionAppInstalled: () => Promise<boolean>;
63
- /**
64
- * Presents the store product page for the Tapaya companion app (App Store sheet on iOS,
65
- * Play Store on Android).
66
- * Use this to prompt the user to install the companion app when {@link isCompanionAppInstalled} returns `false`.
67
- */
68
- export declare const presentCompanionAppSheet: () => Promise<void>;
69
- /** Identity and onboarding methods. */
70
- export declare const identity: {
71
- /**
72
- * Presents the KYB (Know Your Business) onboarding flow.
73
- * Fire-and-forget — resolves as soon as the flow is presented.
74
- * @param prefilling - Optional data to pre-populate the onboarding form.
75
- */
76
- presentKyb: (prefilling?: KybPrefillData) => Promise<void>;
77
- /**
78
- * Returns the merchant's aggregate onboarding status and per-method statuses.
79
- * Requires an authenticated session.
80
- */
81
- getOnboardingStatus: () => Promise<AcceptOnboardingStatus>;
82
- /**
83
- * Returns the onboarding status for a single payment method.
84
- * Requires an authenticated session.
85
- * @param method - The payment method to query.
86
- */
87
- getPaymentMethodStatus: (method: PaymentMethod) => Promise<PaymentMethodStatus>;
88
- };
89
- /** Payment methods for card and bank transfer terminals. */
90
- export declare const payments: {
91
- /**
92
- * Starts a card (tap-to-pay) payment flow.
93
- * Resolves with the final result when the payment completes or fails.
94
- * @param paymentIntent - Payment details.
95
- * @param statusCallback - Called with intermediate status updates during the payment flow.
96
- * @param errorCallback - Called with error details if the terminal encounters an exception.
97
- * @throws If a payment is already in progress, or if the payment flow fails critically.
98
- */
99
- startCardPayment: (paymentIntent: CardPaymentIntent, statusCallback: (status: CardPaymentStatus) => void, errorCallback: (message: string, exception: string) => void) => Promise<CardPaymentResult>;
100
- /**
101
- * Starts a SEPA Instant bank transfer payment flow.
102
- * Resolves with the final result when the payment completes or fails.
103
- * @param paymentIntent - Payment details.
104
- * @param statusCallback - Called with intermediate status updates during the payment flow.
105
- * @param errorCallback - Called with error details if the terminal encounters an exception.
106
- * @throws If a payment is already in progress, or if the payment flow fails critically.
107
- */
108
- startSepaPayment: (paymentIntent: SepaPaymentIntent, statusCallback: (status: SepaInstantPaymentStatus) => void, errorCallback: (message: string, exception: string) => void) => Promise<SepaPaymentResult>;
109
- /**
110
- * Starts a Certis Instant bank transfer payment flow.
111
- * Resolves with the final result when the payment completes or fails.
112
- * @param paymentIntent - Payment details.
113
- * @param statusCallback - Called with intermediate status updates during the payment flow.
114
- * @param errorCallback - Called with error details if the terminal encounters an exception.
115
- * @throws If a payment is already in progress, or if the payment flow fails critically.
116
- */
117
- startCertisPayment: (paymentIntent: CertisPaymentIntent, statusCallback: (status: CertisInstantPaymentStatus) => void, errorCallback: (message: string, exception: string) => void) => Promise<CertisPaymentResult>;
118
- /**
119
- * Refunds a previously completed card payment.
120
- *
121
- * Runs headlessly — no UI is shown.
122
- * @param intent - Refund details.
123
- * @returns The refund result. On iOS, fully populated. On Android, only `status` and `refundReason` are guaranteed —
124
- * call {@link getPaymentStatus} on the source payment for richer state.
125
- * @throws If the source payment is not found, the refund is in conflict (already refunded, wrong state),
126
- * or the SDK is not initialized / authenticated.
127
- */
128
- refund: (intent: RefundIntent) => Promise<RefundResult>;
129
- /**
130
- * Cancels the currently active payment flow.
131
- *
132
- * Dismisses any payment UI and — if still pending — cancels the transaction server-side.
133
- * The in-flight `startCardPayment` / `startSepaPayment` / `startCertisPayment` promise resolves
134
- * to an aborted result.
135
- * @throws If no payment flow is currently in progress.
136
- */
137
- cancelActivePayment: () => Promise<void>;
138
- };
139
- /**
140
- * Demo mode toggles. When enabled, payment flows bypass real terminals and return
141
- * synthetic results — useful for development and screenshots.
4
+ * A thin wrapper over the Accept SDK for Android (`com.tapaya:accept`), which in turn drives the
5
+ * Accept plugin app installed on the terminal. The surfaces here mirror the Android SDK 1:1, so its
6
+ * reference documentation applies unchanged: https://docs.tapaya.com
142
7
  */
143
- export declare const demo: {
144
- /** Enables demo mode. Subsequent payments will be simulated. */
145
- enable: () => Promise<void>;
146
- /** Disables demo mode and returns to real terminal flows. */
147
- disable: () => Promise<void>;
148
- /** Returns whether demo mode is currently enabled. */
149
- isEnabled: () => Promise<boolean>;
150
- };
151
- declare const Accept: {
152
- initialize: (demo?: boolean, theme?: AcceptThemeConfiguration) => Promise<void>;
153
- setTheme: (theme: AcceptThemeConfiguration) => Promise<void>;
154
- setUiBehavior: (behavior: AcceptUiBehavior) => Promise<void>;
155
- authenticate: (token: string) => Promise<void>;
156
- getStatus: () => Promise<SdkStatus>;
157
- getPaymentStatus: (paymentIntentId: string) => Promise<CardPaymentResult | SepaPaymentResult | CertisPaymentResult>;
158
- logOut: () => Promise<void>;
159
- requestLocationPermission: () => Promise<boolean>;
160
- pairWithCompanionApp: () => Promise<void>;
161
- isCompanionAppInstalled: () => Promise<boolean>;
162
- presentCompanionAppSheet: () => Promise<void>;
163
- identity: {
164
- /**
165
- * Presents the KYB (Know Your Business) onboarding flow.
166
- * Fire-and-forget — resolves as soon as the flow is presented.
167
- * @param prefilling - Optional data to pre-populate the onboarding form.
168
- */
169
- presentKyb: (prefilling?: KybPrefillData) => Promise<void>;
170
- /**
171
- * Returns the merchant's aggregate onboarding status and per-method statuses.
172
- * Requires an authenticated session.
173
- */
174
- getOnboardingStatus: () => Promise<AcceptOnboardingStatus>;
175
- /**
176
- * Returns the onboarding status for a single payment method.
177
- * Requires an authenticated session.
178
- * @param method - The payment method to query.
179
- */
180
- getPaymentMethodStatus: (method: PaymentMethod) => Promise<PaymentMethodStatus>;
181
- };
182
- payments: {
183
- /**
184
- * Starts a card (tap-to-pay) payment flow.
185
- * Resolves with the final result when the payment completes or fails.
186
- * @param paymentIntent - Payment details.
187
- * @param statusCallback - Called with intermediate status updates during the payment flow.
188
- * @param errorCallback - Called with error details if the terminal encounters an exception.
189
- * @throws If a payment is already in progress, or if the payment flow fails critically.
190
- */
191
- startCardPayment: (paymentIntent: CardPaymentIntent, statusCallback: (status: CardPaymentStatus) => void, errorCallback: (message: string, exception: string) => void) => Promise<CardPaymentResult>;
192
- /**
193
- * Starts a SEPA Instant bank transfer payment flow.
194
- * Resolves with the final result when the payment completes or fails.
195
- * @param paymentIntent - Payment details.
196
- * @param statusCallback - Called with intermediate status updates during the payment flow.
197
- * @param errorCallback - Called with error details if the terminal encounters an exception.
198
- * @throws If a payment is already in progress, or if the payment flow fails critically.
199
- */
200
- startSepaPayment: (paymentIntent: SepaPaymentIntent, statusCallback: (status: SepaInstantPaymentStatus) => void, errorCallback: (message: string, exception: string) => void) => Promise<SepaPaymentResult>;
201
- /**
202
- * Starts a Certis Instant bank transfer payment flow.
203
- * Resolves with the final result when the payment completes or fails.
204
- * @param paymentIntent - Payment details.
205
- * @param statusCallback - Called with intermediate status updates during the payment flow.
206
- * @param errorCallback - Called with error details if the terminal encounters an exception.
207
- * @throws If a payment is already in progress, or if the payment flow fails critically.
208
- */
209
- startCertisPayment: (paymentIntent: CertisPaymentIntent, statusCallback: (status: CertisInstantPaymentStatus) => void, errorCallback: (message: string, exception: string) => void) => Promise<CertisPaymentResult>;
210
- /**
211
- * Refunds a previously completed card payment.
212
- *
213
- * Runs headlessly — no UI is shown.
214
- * @param intent - Refund details.
215
- * @returns The refund result. On iOS, fully populated. On Android, only `status` and `refundReason` are guaranteed —
216
- * call {@link getPaymentStatus} on the source payment for richer state.
217
- * @throws If the source payment is not found, the refund is in conflict (already refunded, wrong state),
218
- * or the SDK is not initialized / authenticated.
219
- */
220
- refund: (intent: RefundIntent) => Promise<RefundResult>;
221
- /**
222
- * Cancels the currently active payment flow.
223
- *
224
- * Dismisses any payment UI and — if still pending — cancels the transaction server-side.
225
- * The in-flight `startCardPayment` / `startSepaPayment` / `startCertisPayment` promise resolves
226
- * to an aborted result.
227
- * @throws If no payment flow is currently in progress.
228
- */
229
- cancelActivePayment: () => Promise<void>;
230
- };
231
- demo: {
232
- /** Enables demo mode. Subsequent payments will be simulated. */
233
- enable: () => Promise<void>;
234
- /** Disables demo mode and returns to real terminal flows. */
235
- disable: () => Promise<void>;
236
- /** Returns whether demo mode is currently enabled. */
237
- isEnabled: () => Promise<boolean>;
238
- };
239
- };
240
- export default Accept;
8
+ export { Accept, Accept as default } from "./Accept";
9
+ export { AcceptError } from "./AcceptError";
10
+ export * from "./Accept.types";
241
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,iBAAiB,EACjB,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,8BAA8B,CAAC;AAGtC,YAAY,EACV,wBAAwB,EACxB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,wBAAwB,EACxB,0BAA0B,EAC1B,SAAS,EAC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