@capawesome/capacitor-square-mobile-payments 0.0.1 → 0.1.0-dev.8f3159be.1767704525

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.
@@ -13,5 +13,11 @@ Pod::Spec.new do |s|
13
13
  s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
14
14
  s.ios.deployment_target = '15.0'
15
15
  s.dependency 'Capacitor'
16
+ s.dependency 'SquareMobilePaymentsSDK', '~> 2.3.1'
16
17
  s.swift_version = '5.1'
18
+
19
+ # Optional MockReaderUI dependency for Debug builds
20
+ s.xcconfig = {
21
+ 'OTHER_LDFLAGS[config=Debug]' => '$(inherited) -weak_framework MockReaderUI'
22
+ }
17
23
  end
package/Package.swift CHANGED
@@ -19,7 +19,8 @@ let package = Package(
19
19
  dependencies: [
20
20
  .product(name: "Capacitor", package: "capacitor-swift-pm"),
21
21
  .product(name: "Cordova", package: "capacitor-swift-pm"),
22
- .product(name: "SquareMobilePaymentsSDK", package: "mobile-payments-sdk-ios")
22
+ .product(name: "SquareMobilePaymentsSDK", package: "mobile-payments-sdk-ios"),
23
+ .product(name: "MockReaderUI", package: "mobile-payments-sdk-ios")
23
24
  ],
24
25
  path: "ios/Plugin"),
25
26
  .testTarget(
package/README.md CHANGED
@@ -19,6 +19,12 @@ This plugin provides a comprehensive integration with Square's Mobile Payments S
19
19
 
20
20
  Missing a feature? Just [open an issue](https://github.com/capawesome-team/capacitor-plugins/issues) and we'll take a look!
21
21
 
22
+ ## Compatibility
23
+
24
+ | Plugin Version | Capacitor Version | Status |
25
+ | -------------- | ----------------- | -------------- |
26
+ | 0.1.x | >=8.x.x | Active support |
27
+
22
28
  ## Installation
23
29
 
24
30
  ```bash
@@ -38,6 +44,59 @@ This can be useful if you encounter dependency conflicts with other plugins in y
38
44
 
39
45
  ### iOS
40
46
 
47
+ #### SDK Initialization
48
+
49
+ The Square Mobile Payments SDK must be initialized in your `AppDelegate.swift` file before using the plugin. Add the following code to your `AppDelegate.swift`:
50
+
51
+ 1. Import the `SquareMobilePaymentsSDK` at the top of the file:
52
+
53
+ ```swift
54
+ import SquareMobilePaymentsSDK
55
+ ```
56
+
57
+ 2. Add the Square Application ID to your `Info.plist` file:
58
+
59
+ ```xml
60
+ <key>SquareApplicationID</key>
61
+ <string>YOUR_SQUARE_APPLICATION_ID_HERE</string>
62
+ ```
63
+
64
+ **Note**: Replace `YOUR_SQUARE_APPLICATION_ID_HERE` with your actual Square Application ID. Do not use the placeholder value in production.
65
+
66
+ 3. Initialize the SDK in the `application(_:didFinishLaunchingWithOptions:)` method:
67
+
68
+ ```swift
69
+ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
70
+ // Initialize Square Mobile Payments SDK
71
+ // Get the Square Application ID from info.plist
72
+ if let squareAppID = Bundle.main.object(forInfoDictionaryKey: "SquareApplicationID") as? String,
73
+ !squareAppID.isEmpty && squareAppID != "YOUR_SQUARE_APPLICATION_ID_HERE" {
74
+ MobilePaymentsSDK.initialize(
75
+ applicationLaunchOptions: launchOptions,
76
+ squareApplicationID: squareAppID
77
+ )
78
+ }
79
+
80
+ // Override point for customization after application launch.
81
+ return true
82
+ }
83
+ ```
84
+
85
+ #### Build Phases
86
+
87
+ Add a new "Run Script Phase" in Xcode to run the Square SDK setup script by following these steps:
88
+
89
+ 1. On the **Build Phases** tab for your application target in Xcode, choose the + button (at the top left of the pane).
90
+ 2. Choose **New Run Script Phase**. The new run script phase should be the last build phase.
91
+ 3. Expand the new Run Script phase and enter the following script:
92
+
93
+ ```
94
+ FRAMEWORKS="${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}"
95
+ "${FRAMEWORKS}/SquareMobilePaymentsSDK.framework/setup"
96
+ ```
97
+
98
+ More details can be found in the [Square Mobile Payments SDK iOS setup guide](https://developer.squareup.com/docs/mobile-payments-sdk/ios).
99
+
41
100
  #### Privacy Descriptions
42
101
 
43
102
  Add the `NSLocationWhenInUseUsageDescription` and `NSBluetoothAlwaysUsageDescription` keys to the `ios/App/App/Info.plist` file, which tells the user why your app is requesting location and Bluetooth permissions:
@@ -49,6 +108,10 @@ Add the `NSLocationWhenInUseUsageDescription` and `NSBluetoothAlwaysUsageDescrip
49
108
  <string>We need your location to confirm payments are occurring in a supported Square location.</string>
50
109
  ```
51
110
 
111
+ ## Configuration
112
+
113
+ No configuration required for this plugin.
114
+
52
115
  ## Usage
53
116
 
54
117
  ```typescript
@@ -141,6 +204,8 @@ const getAvailableMethods = async () => {
141
204
  * [`isAuthorized()`](#isauthorized)
142
205
  * [`deauthorize()`](#deauthorize)
143
206
  * [`showSettings()`](#showsettings)
207
+ * [`showMockReader()`](#showmockreader)
208
+ * [`hideMockReader()`](#hidemockreader)
144
209
  * [`getSettings()`](#getsettings)
145
210
  * [`startPairing()`](#startpairing)
146
211
  * [`stopPairing()`](#stoppairing)
@@ -263,6 +328,40 @@ Only available on Android and iOS.
263
328
  --------------------
264
329
 
265
330
 
331
+ ### showMockReader()
332
+
333
+ ```typescript
334
+ showMockReader() => Promise<void>
335
+ ```
336
+
337
+ Show the Mock Reader UI for testing.
338
+
339
+ This displays a mock reader interface for testing payment flows without
340
+ physical hardware. This is only for development and testing purposes and
341
+ is therefore only available in debug builds.
342
+
343
+ Only available on Android and iOS.
344
+
345
+ **Since:** 0.1.0
346
+
347
+ --------------------
348
+
349
+
350
+ ### hideMockReader()
351
+
352
+ ```typescript
353
+ hideMockReader() => Promise<void>
354
+ ```
355
+
356
+ Hide the Mock Reader UI.
357
+
358
+ Only available on Android and iOS.
359
+
360
+ **Since:** 0.1.0
361
+
362
+ --------------------
363
+
364
+
266
365
  ### getSettings()
267
366
 
268
367
  ```typescript
@@ -1180,4 +1279,12 @@ Callback to receive payment cancellation notifications.
1180
1279
 
1181
1280
  </docgen-api>
1182
1281
 
1282
+ ## Changelog
1283
+
1284
+ See [CHANGELOG.md](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/square-mobile-payments/CHANGELOG.md).
1285
+
1286
+ ## License
1287
+
1288
+ See [LICENSE](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/square-mobile-payments/LICENSE).
1289
+
1183
1290
  [^1]: This project is not affiliated with, endorsed by, sponsored by, or approved by Square, Inc. or any of their affiliates or subsidiaries.
@@ -57,6 +57,8 @@ dependencies {
57
57
  implementation project(':capacitor-android')
58
58
  implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
59
59
  implementation "com.squareup.sdk:mobile-payments-sdk:$squareMobilePaymentsSdkVersion"
60
+ // MockReader UI dependency for testing with simulated reader
61
+ debugImplementation "com.squareup.sdk:mockreader-ui:$squareMobilePaymentsSdkVersion"
60
62
  testImplementation "junit:junit:$junitVersion"
61
63
  androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
62
64
  androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
@@ -473,6 +473,46 @@ public class SquareMobilePayments {
473
473
  }
474
474
  }
475
475
 
476
+ public void showMockReader(@NonNull EmptyCallback callback) {
477
+ try {
478
+ if (!isInitialized) {
479
+ throw CustomExceptions.NOT_INITIALIZED;
480
+ }
481
+
482
+ if (!isAuthorized) {
483
+ throw CustomExceptions.NOT_AUTHORIZED;
484
+ }
485
+
486
+ // Show MockReader UI - only available in Debug builds with mockreader-ui dependency
487
+ // Use reflection to avoid compile-time dependency
488
+ Class<?> mockReaderUIClass = Class.forName("com.squareup.sdk.mockreader.ui.MockReaderUI");
489
+ mockReaderUIClass.getMethod("show").invoke(null);
490
+ callback.success();
491
+ } catch (ClassNotFoundException e) {
492
+ callback.error(
493
+ new Exception("MockReaderUI is only available in Debug builds. Please ensure you're using a Debug build configuration.")
494
+ );
495
+ } catch (Exception exception) {
496
+ callback.error(exception);
497
+ }
498
+ }
499
+
500
+ public void hideMockReader(@NonNull EmptyCallback callback) {
501
+ try {
502
+ // Hide MockReader UI
503
+ // Use reflection to avoid compile-time dependency
504
+ Class<?> mockReaderUIClass = Class.forName("com.squareup.sdk.mockreader.ui.MockReaderUI");
505
+ mockReaderUIClass.getMethod("hide").invoke(null);
506
+ callback.success();
507
+ } catch (ClassNotFoundException e) {
508
+ callback.error(
509
+ new Exception("MockReaderUI is only available in Debug builds. Please ensure you're using a Debug build configuration.")
510
+ );
511
+ } catch (Exception exception) {
512
+ callback.error(exception);
513
+ }
514
+ }
515
+
476
516
  public void setReaderChangedCallback() {
477
517
  if (!isInitialized) {
478
518
  return;
@@ -164,6 +164,50 @@ public class SquareMobilePaymentsPlugin extends Plugin {
164
164
  }
165
165
  }
166
166
 
167
+ @PluginMethod
168
+ public void showMockReader(PluginCall call) {
169
+ try {
170
+ EmptyCallback callback = new EmptyCallback() {
171
+ @Override
172
+ public void success() {
173
+ resolveCall(call);
174
+ }
175
+
176
+ @Override
177
+ public void error(@NonNull Exception exception) {
178
+ rejectCall(call, exception);
179
+ }
180
+ };
181
+
182
+ assert implementation != null;
183
+ implementation.showMockReader(callback);
184
+ } catch (Exception exception) {
185
+ rejectCall(call, exception);
186
+ }
187
+ }
188
+
189
+ @PluginMethod
190
+ public void hideMockReader(PluginCall call) {
191
+ try {
192
+ EmptyCallback callback = new EmptyCallback() {
193
+ @Override
194
+ public void success() {
195
+ resolveCall(call);
196
+ }
197
+
198
+ @Override
199
+ public void error(@NonNull Exception exception) {
200
+ rejectCall(call, exception);
201
+ }
202
+ };
203
+
204
+ assert implementation != null;
205
+ implementation.hideMockReader(callback);
206
+ } catch (Exception exception) {
207
+ rejectCall(call, exception);
208
+ }
209
+ }
210
+
167
211
  @PluginMethod
168
212
  public void getSettings(PluginCall call) {
169
213
  try {
package/dist/docs.json CHANGED
@@ -103,6 +103,36 @@
103
103
  "complexTypes": [],
104
104
  "slug": "showsettings"
105
105
  },
106
+ {
107
+ "name": "showMockReader",
108
+ "signature": "() => Promise<void>",
109
+ "parameters": [],
110
+ "returns": "Promise<void>",
111
+ "tags": [
112
+ {
113
+ "name": "since",
114
+ "text": "0.1.0"
115
+ }
116
+ ],
117
+ "docs": "Show the Mock Reader UI for testing.\n\nThis displays a mock reader interface for testing payment flows without\nphysical hardware. This is only for development and testing purposes and\nis therefore only available in debug builds.\n\nOnly available on Android and iOS.",
118
+ "complexTypes": [],
119
+ "slug": "showmockreader"
120
+ },
121
+ {
122
+ "name": "hideMockReader",
123
+ "signature": "() => Promise<void>",
124
+ "parameters": [],
125
+ "returns": "Promise<void>",
126
+ "tags": [
127
+ {
128
+ "name": "since",
129
+ "text": "0.1.0"
130
+ }
131
+ ],
132
+ "docs": "Hide the Mock Reader UI.\n\nOnly available on Android and iOS.",
133
+ "complexTypes": [],
134
+ "slug": "hidemockreader"
135
+ },
106
136
  {
107
137
  "name": "getSettings",
108
138
  "signature": "() => Promise<GetSettingsResult>",
@@ -48,6 +48,26 @@ export interface SquareMobilePaymentsPlugin {
48
48
  * @since 0.0.1
49
49
  */
50
50
  showSettings(): Promise<void>;
51
+ /**
52
+ * Show the Mock Reader UI for testing.
53
+ *
54
+ * This displays a mock reader interface for testing payment flows without
55
+ * physical hardware. This is only for development and testing purposes and
56
+ * is therefore only available in debug builds.
57
+ *
58
+ * Only available on Android and iOS.
59
+ *
60
+ * @since 0.1.0
61
+ */
62
+ showMockReader(): Promise<void>;
63
+ /**
64
+ * Hide the Mock Reader UI.
65
+ *
66
+ * Only available on Android and iOS.
67
+ *
68
+ * @since 0.1.0
69
+ */
70
+ hideMockReader(): Promise<void>;
51
71
  /**
52
72
  * Get the current SDK settings.
53
73
  *
@@ -730,19 +750,19 @@ export interface Card {
730
750
  *
731
751
  * @since 0.0.1
732
752
  */
733
- export declare type ReaderPairingDidBeginListener = () => void;
753
+ export type ReaderPairingDidBeginListener = () => void;
734
754
  /**
735
755
  * Callback to receive reader pairing success notifications.
736
756
  *
737
757
  * @since 0.0.1
738
758
  */
739
- export declare type ReaderPairingDidSucceedListener = () => void;
759
+ export type ReaderPairingDidSucceedListener = () => void;
740
760
  /**
741
761
  * Callback to receive reader pairing failure notifications.
742
762
  *
743
763
  * @since 0.0.1
744
764
  */
745
- export declare type ReaderPairingDidFailListener = (event: ReaderPairingDidFailEvent) => void;
765
+ export type ReaderPairingDidFailListener = (event: ReaderPairingDidFailEvent) => void;
746
766
  /**
747
767
  * @since 0.0.1
748
768
  */
@@ -765,7 +785,7 @@ export interface ReaderPairingDidFailEvent {
765
785
  *
766
786
  * @since 0.0.1
767
787
  */
768
- export declare type ReaderWasAddedListener = (event: ReaderWasAddedEvent) => void;
788
+ export type ReaderWasAddedListener = (event: ReaderWasAddedEvent) => void;
769
789
  /**
770
790
  * @since 0.0.1
771
791
  */
@@ -782,7 +802,7 @@ export interface ReaderWasAddedEvent {
782
802
  *
783
803
  * @since 0.0.1
784
804
  */
785
- export declare type ReaderWasRemovedListener = (event: ReaderWasRemovedEvent) => void;
805
+ export type ReaderWasRemovedListener = (event: ReaderWasRemovedEvent) => void;
786
806
  /**
787
807
  * @since 0.0.1
788
808
  */
@@ -799,7 +819,7 @@ export interface ReaderWasRemovedEvent {
799
819
  *
800
820
  * @since 0.0.1
801
821
  */
802
- export declare type ReaderDidChangeListener = (event: ReaderDidChangeEvent) => void;
822
+ export type ReaderDidChangeListener = (event: ReaderDidChangeEvent) => void;
803
823
  /**
804
824
  * @since 0.0.1
805
825
  */
@@ -822,7 +842,7 @@ export interface ReaderDidChangeEvent {
822
842
  *
823
843
  * @since 0.0.1
824
844
  */
825
- export declare type AvailableCardInputMethodsDidChangeListener = (event: AvailableCardInputMethodsDidChangeEvent) => void;
845
+ export type AvailableCardInputMethodsDidChangeListener = (event: AvailableCardInputMethodsDidChangeEvent) => void;
826
846
  /**
827
847
  * @since 0.0.1
828
848
  */
@@ -839,7 +859,7 @@ export interface AvailableCardInputMethodsDidChangeEvent {
839
859
  *
840
860
  * @since 0.0.1
841
861
  */
842
- export declare type PaymentDidFinishListener = (event: PaymentDidFinishEvent) => void;
862
+ export type PaymentDidFinishListener = (event: PaymentDidFinishEvent) => void;
843
863
  /**
844
864
  * @since 0.0.1
845
865
  */
@@ -856,7 +876,7 @@ export interface PaymentDidFinishEvent {
856
876
  *
857
877
  * @since 0.0.1
858
878
  */
859
- export declare type PaymentDidFailListener = (event: PaymentDidFailEvent) => void;
879
+ export type PaymentDidFailListener = (event: PaymentDidFailEvent) => void;
860
880
  /**
861
881
  * @since 0.0.1
862
882
  */
@@ -885,7 +905,7 @@ export interface PaymentDidFailEvent {
885
905
  *
886
906
  * @since 0.0.1
887
907
  */
888
- export declare type PaymentDidCancelListener = (event: PaymentDidCancelEvent) => void;
908
+ export type PaymentDidCancelListener = (event: PaymentDidCancelEvent) => void;
889
909
  /**
890
910
  * @since 0.0.1
891
911
  */
@@ -1388,7 +1408,7 @@ export interface PermissionStatus {
1388
1408
  /**
1389
1409
  * @since 0.0.1
1390
1410
  */
1391
- export declare type CurrencyCode = string;
1411
+ export type CurrencyCode = string;
1392
1412
  /**
1393
1413
  * @since 0.0.1
1394
1414
  */
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AA28BA;;GAEG;AACH,MAAM,CAAN,IAAY,WAaX;AAbD,WAAY,WAAW;IACrB;;;;OAIG;IACH,wCAAyB,CAAA;IACzB;;;;OAIG;IACH,kCAAmB,CAAA;AACrB,CAAC,EAbW,WAAW,KAAX,WAAW,QAatB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,eAyBX;AAzBD,WAAY,eAAe;IACzB;;;;OAIG;IACH,8BAAW,CAAA;IACX;;;;OAIG;IACH,8BAAW,CAAA;IACX;;;;OAIG;IACH,kCAAe,CAAA;IACf;;;;OAIG;IACH,kCAAe,CAAA;AACjB,CAAC,EAzBW,eAAe,KAAf,eAAe,QAyB1B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAmBX;AAnBD,WAAY,cAAc;IACxB;;;;OAIG;IACH,4CAA0B,CAAA;IAC1B;;;;OAIG;IACH,4CAA0B,CAAA;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;OAIG;IACH,sCAAyB,CAAA;IACzB;;;;OAIG;IACH,iDAAoC,CAAA;IACpC;;;;OAIG;IACH,kCAAqB,CAAA;IACrB;;;;OAIG;IACH,+CAAkC,CAAA;IAClC;;;;OAIG;IACH,wBAAW,CAAA;IACX;;;;OAIG;IACH,mCAAsB,CAAA;IACtB;;;;OAIG;IACH,gCAAmB,CAAA;IACnB;;;;OAIG;IACH,8BAAiB,CAAA;IACjB;;;;OAIG;IACH,4BAAe,CAAA;AACjB,CAAC,EA7DW,SAAS,KAAT,SAAS,QA6DpB;AAqED;;GAEG;AACH,MAAM,CAAN,IAAY,SAyEX;AAzED,WAAY,SAAS;IACnB;;;;OAIG;IACH,sDAAyC,CAAA;IACzC;;;;OAIG;IACH,wDAA2C,CAAA;IAC3C;;;;OAIG;IACH,0DAA6C,CAAA;IAC7C;;;;OAIG;IACH,oEAAuD,CAAA;IACvD;;;;OAIG;IACH,kEAAqD,CAAA;IACrD;;;;OAIG;IACH,wDAA2C,CAAA;IAC3C;;;;OAIG;IACH,mEAAsD,CAAA;IACtD;;;;OAIG;IACH,+CAAkC,CAAA;IAClC;;;;OAIG;IACH,6CAAgC,CAAA;IAChC;;;;OAIG;IACH,qEAAwD,CAAA;IACxD;;;;OAIG;IACH,2DAA8C,CAAA;IAC9C;;;;OAIG;IACH,gDAAmC,CAAA;AACrC,CAAC,EAzEW,SAAS,KAAT,SAAS,QAyEpB","sourcesContent":["import type { PermissionState, PluginListenerHandle } from '@capacitor/core';\n\n/**\n * @since 0.0.1\n */\nexport interface SquareMobilePaymentsPlugin {\n /**\n * Initialize the Square Mobile Payments SDK.\n *\n * This method must be called before any other method.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n initialize(options: InitializeOptions): Promise<void>;\n /**\n * Authorize the SDK with a Square access token.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n authorize(options: AuthorizeOptions): Promise<void>;\n /**\n * Check if the SDK is currently authorized.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n isAuthorized(): Promise<IsAuthorizedResult>;\n /**\n * Deauthorize the SDK and clear the current authorization.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n deauthorize(): Promise<void>;\n /**\n * Show the Square settings screen.\n *\n * This displays a pre-built settings UI where merchants can view and manage\n * their paired readers.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n showSettings(): Promise<void>;\n /**\n * Get the current SDK settings.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n getSettings(): Promise<GetSettingsResult>;\n /**\n * Start pairing with a Square reader.\n *\n * This initiates the reader pairing process. The SDK will search for nearby\n * readers and pair with the first one found.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n startPairing(): Promise<void>;\n /**\n * Stop the reader pairing process.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n stopPairing(): Promise<void>;\n /**\n * Check if a pairing process is currently in progress.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n isPairingInProgress(): Promise<IsPairingInProgressResult>;\n /**\n * Get a list of all paired readers.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n getReaders(): Promise<GetReadersResult>;\n /**\n * Forget a paired reader.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n forgetReader(options: ForgetReaderOptions): Promise<void>;\n /**\n * Retry connecting to a reader.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n retryConnection(options: RetryConnectionOptions): Promise<void>;\n /**\n * Start a payment flow.\n *\n * This presents the payment UI and processes the payment using the specified\n * parameters. Only one payment can be active at a time.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n startPayment(options: StartPaymentOptions): Promise<void>;\n /**\n * Cancel an ongoing payment.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n cancelPayment(): Promise<void>;\n /**\n * Get the currently available card input methods.\n *\n * This returns the card entry methods that are available based on the\n * connected readers (e.g., TAP, DIP, SWIPE, KEYED).\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n getAvailableCardInputMethods(): Promise<GetAvailableCardInputMethodsResult>;\n /**\n * Check the current permission status.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n checkPermissions(): Promise<PermissionStatus>;\n /**\n * Request the required permissions.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n requestPermissions(): Promise<PermissionStatus>;\n /**\n * Listen for reader pairing events.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n addListener(\n eventName: 'readerPairingDidBegin',\n listenerFunc: ReaderPairingDidBeginListener,\n ): Promise<PluginListenerHandle>;\n /**\n * Listen for successful reader pairing events.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n addListener(\n eventName: 'readerPairingDidSucceed',\n listenerFunc: ReaderPairingDidSucceedListener,\n ): Promise<PluginListenerHandle>;\n /**\n * Listen for failed reader pairing events.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n addListener(\n eventName: 'readerPairingDidFail',\n listenerFunc: ReaderPairingDidFailListener,\n ): Promise<PluginListenerHandle>;\n /**\n * Listen for reader added events.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n addListener(\n eventName: 'readerWasAdded',\n listenerFunc: ReaderWasAddedListener,\n ): Promise<PluginListenerHandle>;\n /**\n * Listen for reader removed events.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n addListener(\n eventName: 'readerWasRemoved',\n listenerFunc: ReaderWasRemovedListener,\n ): Promise<PluginListenerHandle>;\n /**\n * Listen for reader status and property changes.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n addListener(\n eventName: 'readerDidChange',\n listenerFunc: ReaderDidChangeListener,\n ): Promise<PluginListenerHandle>;\n /**\n * Listen for available card input method changes.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n addListener(\n eventName: 'availableCardInputMethodsDidChange',\n listenerFunc: AvailableCardInputMethodsDidChangeListener,\n ): Promise<PluginListenerHandle>;\n /**\n * Listen for successful payment completion events.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n addListener(\n eventName: 'paymentDidFinish',\n listenerFunc: PaymentDidFinishListener,\n ): Promise<PluginListenerHandle>;\n /**\n * Listen for failed payment events.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n addListener(\n eventName: 'paymentDidFail',\n listenerFunc: PaymentDidFailListener,\n ): Promise<PluginListenerHandle>;\n /**\n * Listen for cancelled payment events.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n addListener(\n eventName: 'paymentDidCancel',\n listenerFunc: PaymentDidCancelListener,\n ): Promise<PluginListenerHandle>;\n /**\n * Remove all listeners for this plugin.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n removeAllListeners(): Promise<void>;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface InitializeOptions {\n /**\n * The Square location ID.\n *\n * @since 0.0.1\n * @example 'LOCATION_ID'\n */\n locationId: string;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface AuthorizeOptions {\n /**\n * The Square access token.\n *\n * @since 0.0.1\n * @example 'EAAAEOuLQPDbLd...'\n */\n accessToken: string;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface IsAuthorizedResult {\n /**\n * Whether the SDK is currently authorized.\n *\n * @since 0.0.1\n */\n authorized: boolean;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface GetSettingsResult {\n /**\n * The SDK version.\n *\n * @since 0.0.1\n * @example '2.0.0'\n */\n version: string;\n /**\n * The current environment.\n *\n * @since 0.0.1\n * @example 'production'\n */\n environment: Environment;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface IsPairingInProgressResult {\n /**\n * Whether a pairing process is currently in progress.\n *\n * @since 0.0.1\n */\n inProgress: boolean;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface GetReadersResult {\n /**\n * The list of paired readers.\n *\n * @since 0.0.1\n */\n readers: ReaderInfo[];\n}\n\n/**\n * @since 0.0.1\n */\nexport interface ForgetReaderOptions {\n /**\n * The serial number of the reader to forget.\n *\n * @since 0.0.1\n * @example 'CRR123456789'\n */\n serialNumber: string;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface RetryConnectionOptions {\n /**\n * The serial number of the reader to retry connection.\n *\n * @since 0.0.1\n * @example 'CRR123456789'\n */\n serialNumber: string;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface StartPaymentOptions {\n /**\n * The payment parameters.\n *\n * @since 0.0.1\n */\n paymentParameters: PaymentParameters;\n /**\n * The prompt parameters.\n *\n * @since 0.0.1\n */\n promptParameters: PromptParameters;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface PaymentParameters {\n /**\n * The amount of money to charge.\n *\n * @since 0.0.1\n */\n amountMoney: Money;\n /**\n * A unique identifier for this payment attempt.\n *\n * This is used for idempotent payment requests.\n *\n * @since 0.0.1\n * @example 'a1b2c3d4-e5f6-4a5b-8c9d-1e2f3a4b5c6d'\n */\n paymentAttemptId: string;\n /**\n * The processing mode for this payment.\n *\n * @since 0.0.1\n * @default ProcessingMode.AutoDetect\n */\n processingMode?: ProcessingMode;\n /**\n * A user-defined reference ID to associate with the payment.\n *\n * @since 0.0.1\n * @example 'ORDER-12345'\n */\n referenceId?: string;\n /**\n * An optional note to add to the payment.\n *\n * @since 0.0.1\n * @example 'Birthday gift'\n */\n note?: string;\n /**\n * The Square order ID to associate with this payment.\n *\n * @since 0.0.1\n * @example 'CAISENgvlJ6jLWAzERDzjyHVybY'\n */\n orderId?: string;\n /**\n * The tip amount.\n *\n * @since 0.0.1\n */\n tipMoney?: Money;\n /**\n * The application fee.\n *\n * @since 0.0.1\n */\n applicationFee?: Money;\n /**\n * Whether to automatically complete the payment.\n *\n * If false, the payment will be authorized but not captured, requiring\n * manual completion via the Payments API.\n *\n * @since 0.0.1\n * @default true\n */\n autocomplete?: boolean;\n /**\n * The duration to delay before automatically completing or canceling the payment.\n *\n * Only applicable when autocomplete is false.\n *\n * @since 0.0.1\n * @example 'PT1H'\n */\n delayDuration?: string;\n /**\n * The action to take when the delay duration expires.\n *\n * Only applicable when autocomplete is false.\n *\n * @since 0.0.1\n */\n delayAction?: DelayAction;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface PromptParameters {\n /**\n * The prompt mode.\n *\n * @since 0.0.1\n * @default PromptMode.Default\n */\n mode?: PromptMode;\n /**\n * Additional payment methods to allow.\n *\n * @since 0.0.1\n * @default []\n */\n additionalMethods?: AdditionalPaymentMethod[];\n}\n\n/**\n * @since 0.0.1\n */\nexport interface Money {\n /**\n * The amount in the smallest currency unit (e.g., cents for USD).\n *\n * @since 0.0.1\n * @example 100\n */\n amount: number;\n /**\n * The ISO 4217 currency code.\n *\n * @since 0.0.1\n * @example 'USD'\n */\n currency: CurrencyCode;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface GetAvailableCardInputMethodsResult {\n /**\n * The available card input methods.\n *\n * @since 0.0.1\n */\n cardInputMethods: CardInputMethod[];\n}\n\n/**\n * @since 0.0.1\n */\nexport interface ReaderInfo {\n /**\n * The reader's serial number.\n *\n * @since 0.0.1\n * @example 'CRR123456789'\n */\n serialNumber: string;\n /**\n * The reader's model.\n *\n * @since 0.0.1\n */\n model: ReaderModel;\n /**\n * The reader's current status.\n *\n * @since 0.0.1\n */\n status: ReaderStatus;\n /**\n * The reader's firmware version.\n *\n * @since 0.0.1\n * @example '1.2.3'\n */\n firmwareVersion?: string;\n /**\n * The reader's battery level (0-100).\n *\n * @since 0.0.1\n * @example 85\n */\n batteryLevel?: number;\n /**\n * Whether the reader is currently charging.\n *\n * @since 0.0.1\n */\n isCharging?: boolean;\n /**\n * The card input methods supported by this reader.\n *\n * @since 0.0.1\n */\n supportedCardInputMethods: CardInputMethod[];\n /**\n * Additional information about why the reader is unavailable.\n *\n * Only present when status is ReaderUnavailable.\n *\n * @since 0.0.1\n */\n unavailableReasonInfo?: UnavailableReasonInfo;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface UnavailableReasonInfo {\n /**\n * The reason code why the reader is unavailable.\n *\n * @since 0.0.1\n */\n reason: UnavailableReason;\n /**\n * A human-readable message describing why the reader is unavailable.\n *\n * @since 0.0.1\n */\n message?: string;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface Payment {\n /**\n * The unique identifier for this payment.\n *\n * For offline payments, this may be null until synced.\n *\n * @since 0.0.1\n * @example 'AbCdEfGhIjKlMnOpQrStUvWxYz'\n */\n id: string | null;\n /**\n * The payment type.\n *\n * @since 0.0.1\n */\n type: PaymentType;\n /**\n * The payment status.\n *\n * @since 0.0.1\n */\n status: PaymentStatus;\n /**\n * The amount paid.\n *\n * @since 0.0.1\n */\n amountMoney: Money;\n /**\n * The tip amount.\n *\n * @since 0.0.1\n */\n tipMoney?: Money;\n /**\n * The application fee.\n *\n * @since 0.0.1\n */\n applicationFee?: Money;\n /**\n * The reference ID provided in the payment parameters.\n *\n * @since 0.0.1\n */\n referenceId?: string;\n /**\n * The order ID associated with this payment.\n *\n * @since 0.0.1\n */\n orderId?: string;\n /**\n * Card payment details.\n *\n * Only present for card payments.\n *\n * @since 0.0.1\n */\n cardDetails?: CardPaymentDetails;\n /**\n * The time the payment was created (ISO 8601 format).\n *\n * @since 0.0.1\n * @example '2024-01-15T10:30:00Z'\n */\n createdAt?: string;\n /**\n * The time the payment was updated (ISO 8601 format).\n *\n * @since 0.0.1\n * @example '2024-01-15T10:30:00Z'\n */\n updatedAt?: string;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface CardPaymentDetails {\n /**\n * The card information.\n *\n * @since 0.0.1\n */\n card: Card;\n /**\n * The card entry method used.\n *\n * @since 0.0.1\n */\n entryMethod: CardInputMethod;\n /**\n * The authorization code.\n *\n * @since 0.0.1\n * @example '123456'\n */\n authorizationCode?: string;\n /**\n * The EMV application name.\n *\n * @since 0.0.1\n * @example 'VISA CREDIT'\n */\n applicationName?: string;\n /**\n * The EMV application identifier.\n *\n * @since 0.0.1\n * @example 'A0000000031010'\n */\n applicationId?: string;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface Card {\n /**\n * The card brand.\n *\n * @since 0.0.1\n */\n brand: CardBrand;\n /**\n * The last four digits of the card number.\n *\n * @since 0.0.1\n * @example '1234'\n */\n lastFourDigits: string;\n /**\n * The cardholder name.\n *\n * @since 0.0.1\n * @example 'John Doe'\n */\n cardholderName?: string;\n /**\n * The card expiration month (1-12).\n *\n * @since 0.0.1\n * @example 12\n */\n expirationMonth?: number;\n /**\n * The card expiration year.\n *\n * @since 0.0.1\n * @example 2025\n */\n expirationYear?: number;\n}\n\n/**\n * Callback to receive reader pairing start notifications.\n *\n * @since 0.0.1\n */\nexport type ReaderPairingDidBeginListener = () => void;\n\n/**\n * Callback to receive reader pairing success notifications.\n *\n * @since 0.0.1\n */\nexport type ReaderPairingDidSucceedListener = () => void;\n\n/**\n * Callback to receive reader pairing failure notifications.\n *\n * @since 0.0.1\n */\nexport type ReaderPairingDidFailListener = (\n event: ReaderPairingDidFailEvent,\n) => void;\n\n/**\n * @since 0.0.1\n */\nexport interface ReaderPairingDidFailEvent {\n /**\n * The error code.\n *\n * @since 0.0.1\n */\n code?: string;\n /**\n * The error message.\n *\n * @since 0.0.1\n */\n message: string;\n}\n\n/**\n * Callback to receive reader added notifications.\n *\n * @since 0.0.1\n */\nexport type ReaderWasAddedListener = (event: ReaderWasAddedEvent) => void;\n\n/**\n * @since 0.0.1\n */\nexport interface ReaderWasAddedEvent {\n /**\n * The reader that was added.\n *\n * @since 0.0.1\n */\n reader: ReaderInfo;\n}\n\n/**\n * Callback to receive reader removed notifications.\n *\n * @since 0.0.1\n */\nexport type ReaderWasRemovedListener = (event: ReaderWasRemovedEvent) => void;\n\n/**\n * @since 0.0.1\n */\nexport interface ReaderWasRemovedEvent {\n /**\n * The reader that was removed.\n *\n * @since 0.0.1\n */\n reader: ReaderInfo;\n}\n\n/**\n * Callback to receive reader change notifications.\n *\n * @since 0.0.1\n */\nexport type ReaderDidChangeListener = (event: ReaderDidChangeEvent) => void;\n\n/**\n * @since 0.0.1\n */\nexport interface ReaderDidChangeEvent {\n /**\n * The reader that changed.\n *\n * @since 0.0.1\n */\n reader: ReaderInfo;\n /**\n * The type of change that occurred.\n *\n * @since 0.0.1\n */\n change: ReaderChange;\n}\n\n/**\n * Callback to receive available card input method change notifications.\n *\n * @since 0.0.1\n */\nexport type AvailableCardInputMethodsDidChangeListener = (\n event: AvailableCardInputMethodsDidChangeEvent,\n) => void;\n\n/**\n * @since 0.0.1\n */\nexport interface AvailableCardInputMethodsDidChangeEvent {\n /**\n * The available card input methods.\n *\n * @since 0.0.1\n */\n cardInputMethods: CardInputMethod[];\n}\n\n/**\n * Callback to receive payment completion notifications.\n *\n * @since 0.0.1\n */\nexport type PaymentDidFinishListener = (event: PaymentDidFinishEvent) => void;\n\n/**\n * @since 0.0.1\n */\nexport interface PaymentDidFinishEvent {\n /**\n * The completed payment.\n *\n * @since 0.0.1\n */\n payment: Payment;\n}\n\n/**\n * Callback to receive payment failure notifications.\n *\n * @since 0.0.1\n */\nexport type PaymentDidFailListener = (event: PaymentDidFailEvent) => void;\n\n/**\n * @since 0.0.1\n */\nexport interface PaymentDidFailEvent {\n /**\n * The failed payment.\n *\n * @since 0.0.1\n */\n payment?: Payment;\n /**\n * The error code.\n *\n * @since 0.0.1\n */\n code?: string;\n /**\n * The error message.\n *\n * @since 0.0.1\n */\n message: string;\n}\n\n/**\n * Callback to receive payment cancellation notifications.\n *\n * @since 0.0.1\n */\nexport type PaymentDidCancelListener = (event: PaymentDidCancelEvent) => void;\n\n/**\n * @since 0.0.1\n */\nexport interface PaymentDidCancelEvent {\n /**\n * The cancelled payment.\n *\n * @since 0.0.1\n */\n payment?: Payment;\n}\n\n/**\n * @since 0.0.1\n */\nexport enum Environment {\n /**\n * Production environment.\n *\n * @since 0.0.1\n */\n Production = 'production',\n /**\n * Sandbox environment for testing.\n *\n * @since 0.0.1\n */\n Sandbox = 'sandbox',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum CardInputMethod {\n /**\n * Contactless card tap (NFC).\n *\n * @since 0.0.1\n */\n Tap = 'TAP',\n /**\n * EMV chip card insertion.\n *\n * @since 0.0.1\n */\n Dip = 'DIP',\n /**\n * Magnetic stripe swipe.\n *\n * @since 0.0.1\n */\n Swipe = 'SWIPE',\n /**\n * Manually keyed card entry.\n *\n * @since 0.0.1\n */\n Keyed = 'KEYED',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum ProcessingMode {\n /**\n * Automatically detect the best processing mode (online or offline).\n *\n * @since 0.0.1\n */\n AutoDetect = 'AUTO_DETECT',\n /**\n * Process the payment online only.\n *\n * @since 0.0.1\n */\n OnlineOnly = 'ONLINE_ONLY',\n /**\n * Allow offline payment processing.\n *\n * @since 0.0.1\n */\n OfflineOnly = 'OFFLINE_ONLY',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum PromptMode {\n /**\n * Use the default Square payment UI.\n *\n * @since 0.0.1\n */\n Default = 'DEFAULT',\n /**\n * Use a custom payment UI.\n *\n * @since 0.0.1\n */\n Custom = 'CUSTOM',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum AdditionalPaymentMethod {\n /**\n * Allow manually keyed card entry.\n *\n * @since 0.0.1\n */\n Keyed = 'KEYED',\n /**\n * Allow cash payments.\n *\n * @since 0.0.1\n */\n Cash = 'CASH',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum DelayAction {\n /**\n * Automatically complete the payment when the delay expires.\n *\n * @since 0.0.1\n */\n Complete = 'COMPLETE',\n /**\n * Automatically cancel the payment when the delay expires.\n *\n * @since 0.0.1\n */\n Cancel = 'CANCEL',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum ReaderModel {\n /**\n * Square Reader for contactless and chip.\n *\n * @since 0.0.1\n */\n ContactlessAndChip = 'CONTACTLESS_AND_CHIP',\n /**\n * Square Reader for magstripe.\n *\n * @since 0.0.1\n */\n Magstripe = 'MAGSTRIPE',\n /**\n * Square Stand.\n *\n * @since 0.0.1\n */\n Stand = 'STAND',\n /**\n * Unknown reader model.\n *\n * @since 0.0.1\n */\n Unknown = 'UNKNOWN',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum ReaderStatus {\n /**\n * Reader is paired, connected, and ready to accept payments.\n *\n * @since 0.0.1\n */\n Ready = 'READY',\n /**\n * Reader is connecting to Square servers.\n *\n * @since 0.0.1\n */\n ConnectingToSquare = 'CONNECTING_TO_SQUARE',\n /**\n * Reader is connecting to the mobile device.\n *\n * @since 0.0.1\n */\n ConnectingToDevice = 'CONNECTING_TO_DEVICE',\n /**\n * Reader has a hardware or connection error in an unrecoverable state.\n *\n * @since 0.0.1\n */\n Faulty = 'FAULTY',\n /**\n * Reader is connected but unable to process payments.\n *\n * @since 0.0.1\n */\n ReaderUnavailable = 'READER_UNAVAILABLE',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum ReaderChange {\n /**\n * Reader battery started charging.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n BatteryDidBeginCharging = 'BATTERY_DID_BEGIN_CHARGING',\n /**\n * Reader battery stopped charging.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n BatteryDidEndCharging = 'BATTERY_DID_END_CHARGING',\n /**\n * Reader battery level changed.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n BatteryLevelDidChange = 'BATTERY_LEVEL_DID_CHANGE',\n /**\n * Reader battery charging status changed.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n BatteryCharging = 'BATTERY_CHARGING',\n /**\n * Reader was added.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n Added = 'ADDED',\n /**\n * Reader was removed.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n Removed = 'REMOVED',\n /**\n * Reader status changed.\n *\n * @since 0.0.1\n */\n StatusDidChange = 'STATUS_DID_CHANGE',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum UnavailableReason {\n /**\n * Bluetooth connection issue.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n BluetoothError = 'BLUETOOTH_ERROR',\n /**\n * Bluetooth failure.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n BluetoothFailure = 'BLUETOOTH_FAILURE',\n /**\n * Bluetooth is disabled.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n BluetoothDisabled = 'BLUETOOTH_DISABLED',\n /**\n * Reader firmware is updating.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n FirmwareUpdate = 'FIRMWARE_UPDATE',\n /**\n * Blocking firmware update.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n BlockingUpdate = 'BLOCKING_UPDATE',\n /**\n * Reader is unavailable offline.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n ReaderUnavailableOffline = 'READER_UNAVAILABLE_OFFLINE',\n /**\n * Device is in developer mode.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n DeviceDeveloperMode = 'DEVICE_DEVELOPER_MODE',\n /**\n * Unknown reason.\n *\n * @since 0.0.1\n */\n Unknown = 'UNKNOWN',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum PaymentType {\n /**\n * Payment processed online.\n *\n * @since 0.0.1\n */\n Online = 'ONLINE',\n /**\n * Payment processed offline.\n *\n * @since 0.0.1\n */\n Offline = 'OFFLINE',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum PaymentStatus {\n /**\n * Payment was completed successfully.\n *\n * @since 0.0.1\n */\n Completed = 'COMPLETED',\n /**\n * Payment was approved but not yet completed.\n *\n * @since 0.0.1\n */\n Approved = 'APPROVED',\n /**\n * Payment was canceled.\n *\n * @since 0.0.1\n */\n Canceled = 'CANCELED',\n /**\n * Payment failed.\n *\n * @since 0.0.1\n */\n Failed = 'FAILED',\n /**\n * Payment is pending.\n *\n * @since 0.0.1\n */\n Pending = 'PENDING',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum CardBrand {\n /**\n * Visa card.\n *\n * @since 0.0.1\n */\n Visa = 'VISA',\n /**\n * Mastercard.\n *\n * @since 0.0.1\n */\n Mastercard = 'MASTERCARD',\n /**\n * American Express card.\n *\n * @since 0.0.1\n */\n AmericanExpress = 'AMERICAN_EXPRESS',\n /**\n * Discover card.\n *\n * @since 0.0.1\n */\n Discover = 'DISCOVER',\n /**\n * Discover Diners card.\n *\n * @since 0.0.1\n */\n DiscoverDiners = 'DISCOVER_DINERS',\n /**\n * JCB card.\n *\n * @since 0.0.1\n */\n Jcb = 'JCB',\n /**\n * UnionPay card.\n *\n * @since 0.0.1\n */\n UnionPay = 'UNION_PAY',\n /**\n * Interac card.\n *\n * @since 0.0.1\n */\n Interac = 'INTERAC',\n /**\n * Eftpos card.\n *\n * @since 0.0.1\n */\n Eftpos = 'EFTPOS',\n /**\n * Other or unknown card brand.\n *\n * @since 0.0.1\n */\n Other = 'OTHER',\n}\n\n/**\n * @since 0.0.1\n */\nexport interface PermissionStatus {\n /**\n * Permission state for accessing location.\n *\n * Required to confirm that payments are occurring in a supported Square location.\n *\n * @since 0.0.1\n */\n location: PermissionState;\n /**\n * Permission state for recording audio.\n *\n * Required to receive data from magstripe readers.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n recordAudio?: PermissionState;\n /**\n * Permission state for Bluetooth connect.\n *\n * Required to receive data from contactless and chip readers.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n bluetoothConnect?: PermissionState;\n /**\n * Permission state for Bluetooth scan.\n *\n * Required to store information during checkout.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n bluetoothScan?: PermissionState;\n /**\n * Permission state for reading phone state.\n *\n * Required to identify the device sending information to Square servers.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n readPhoneState?: PermissionState;\n /**\n * Permission state for using Bluetooth.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n bluetooth?: PermissionState;\n}\n\n/**\n * @since 0.0.1\n */\nexport type CurrencyCode = string;\n\n/**\n * @since 0.0.1\n */\nexport enum ErrorCode {\n /**\n * The location ID is missing.\n *\n * @since 0.0.1\n */\n LocationIdMissing = 'LOCATION_ID_MISSING',\n /**\n * The access token is missing.\n *\n * @since 0.0.1\n */\n AccessTokenMissing = 'ACCESS_TOKEN_MISSING',\n /**\n * The serial number is missing.\n *\n * @since 0.0.1\n */\n SerialNumberMissing = 'SERIAL_NUMBER_MISSING',\n /**\n * The payment parameters are missing.\n *\n * @since 0.0.1\n */\n PaymentParametersMissing = 'PAYMENT_PARAMETERS_MISSING',\n /**\n * The prompt parameters are missing.\n *\n * @since 0.0.1\n */\n PromptParametersMissing = 'PROMPT_PARAMETERS_MISSING',\n /**\n * The amount money is missing.\n *\n * @since 0.0.1\n */\n AmountMoneyMissing = 'AMOUNT_MONEY_MISSING',\n /**\n * The payment attempt ID is missing.\n *\n * @since 0.0.1\n */\n PaymentAttemptIdMissing = 'PAYMENT_ATTEMPT_ID_MISSING',\n /**\n * The SDK is not initialized.\n *\n * @since 0.0.1\n */\n NotInitialized = 'NOT_INITIALIZED',\n /**\n * The SDK is not authorized.\n *\n * @since 0.0.1\n */\n NotAuthorized = 'NOT_AUTHORIZED',\n /**\n * A pairing process is already in progress.\n *\n * @since 0.0.1\n */\n PairingAlreadyInProgress = 'PAIRING_ALREADY_IN_PROGRESS',\n /**\n * No payment is in progress.\n *\n * @since 0.0.1\n */\n NoPaymentInProgress = 'NO_PAYMENT_IN_PROGRESS',\n /**\n * Reader not found.\n *\n * @since 0.0.1\n */\n ReaderNotFound = 'READER_NOT_FOUND',\n}\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AA+9BA;;GAEG;AACH,MAAM,CAAN,IAAY,WAaX;AAbD,WAAY,WAAW;IACrB;;;;OAIG;IACH,wCAAyB,CAAA;IACzB;;;;OAIG;IACH,kCAAmB,CAAA;AACrB,CAAC,EAbW,WAAW,KAAX,WAAW,QAatB;AAED;;GAEG;AACH,MAAM,CA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["import type { PermissionState, PluginListenerHandle } from '@capacitor/core';\n\n/**\n * @since 0.0.1\n */\nexport interface SquareMobilePaymentsPlugin {\n /**\n * Initialize the Square Mobile Payments SDK.\n *\n * This method must be called before any other method.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n initialize(options: InitializeOptions): Promise<void>;\n /**\n * Authorize the SDK with a Square access token.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n authorize(options: AuthorizeOptions): Promise<void>;\n /**\n * Check if the SDK is currently authorized.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n isAuthorized(): Promise<IsAuthorizedResult>;\n /**\n * Deauthorize the SDK and clear the current authorization.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n deauthorize(): Promise<void>;\n /**\n * Show the Square settings screen.\n *\n * This displays a pre-built settings UI where merchants can view and manage\n * their paired readers.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n showSettings(): Promise<void>;\n /**\n * Show the Mock Reader UI for testing.\n *\n * This displays a mock reader interface for testing payment flows without\n * physical hardware. This is only for development and testing purposes and\n * is therefore only available in debug builds.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n showMockReader(): Promise<void>;\n /**\n * Hide the Mock Reader UI.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n hideMockReader(): Promise<void>;\n /**\n * Get the current SDK settings.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n getSettings(): Promise<GetSettingsResult>;\n /**\n * Start pairing with a Square reader.\n *\n * This initiates the reader pairing process. The SDK will search for nearby\n * readers and pair with the first one found.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n startPairing(): Promise<void>;\n /**\n * Stop the reader pairing process.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n stopPairing(): Promise<void>;\n /**\n * Check if a pairing process is currently in progress.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n isPairingInProgress(): Promise<IsPairingInProgressResult>;\n /**\n * Get a list of all paired readers.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n getReaders(): Promise<GetReadersResult>;\n /**\n * Forget a paired reader.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n forgetReader(options: ForgetReaderOptions): Promise<void>;\n /**\n * Retry connecting to a reader.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n retryConnection(options: RetryConnectionOptions): Promise<void>;\n /**\n * Start a payment flow.\n *\n * This presents the payment UI and processes the payment using the specified\n * parameters. Only one payment can be active at a time.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n startPayment(options: StartPaymentOptions): Promise<void>;\n /**\n * Cancel an ongoing payment.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n cancelPayment(): Promise<void>;\n /**\n * Get the currently available card input methods.\n *\n * This returns the card entry methods that are available based on the\n * connected readers (e.g., TAP, DIP, SWIPE, KEYED).\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n getAvailableCardInputMethods(): Promise<GetAvailableCardInputMethodsResult>;\n /**\n * Check the current permission status.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n checkPermissions(): Promise<PermissionStatus>;\n /**\n * Request the required permissions.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n requestPermissions(): Promise<PermissionStatus>;\n /**\n * Listen for reader pairing events.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n addListener(\n eventName: 'readerPairingDidBegin',\n listenerFunc: ReaderPairingDidBeginListener,\n ): Promise<PluginListenerHandle>;\n /**\n * Listen for successful reader pairing events.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n addListener(\n eventName: 'readerPairingDidSucceed',\n listenerFunc: ReaderPairingDidSucceedListener,\n ): Promise<PluginListenerHandle>;\n /**\n * Listen for failed reader pairing events.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n addListener(\n eventName: 'readerPairingDidFail',\n listenerFunc: ReaderPairingDidFailListener,\n ): Promise<PluginListenerHandle>;\n /**\n * Listen for reader added events.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n addListener(\n eventName: 'readerWasAdded',\n listenerFunc: ReaderWasAddedListener,\n ): Promise<PluginListenerHandle>;\n /**\n * Listen for reader removed events.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n addListener(\n eventName: 'readerWasRemoved',\n listenerFunc: ReaderWasRemovedListener,\n ): Promise<PluginListenerHandle>;\n /**\n * Listen for reader status and property changes.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n addListener(\n eventName: 'readerDidChange',\n listenerFunc: ReaderDidChangeListener,\n ): Promise<PluginListenerHandle>;\n /**\n * Listen for available card input method changes.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n addListener(\n eventName: 'availableCardInputMethodsDidChange',\n listenerFunc: AvailableCardInputMethodsDidChangeListener,\n ): Promise<PluginListenerHandle>;\n /**\n * Listen for successful payment completion events.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n addListener(\n eventName: 'paymentDidFinish',\n listenerFunc: PaymentDidFinishListener,\n ): Promise<PluginListenerHandle>;\n /**\n * Listen for failed payment events.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n addListener(\n eventName: 'paymentDidFail',\n listenerFunc: PaymentDidFailListener,\n ): Promise<PluginListenerHandle>;\n /**\n * Listen for cancelled payment events.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n addListener(\n eventName: 'paymentDidCancel',\n listenerFunc: PaymentDidCancelListener,\n ): Promise<PluginListenerHandle>;\n /**\n * Remove all listeners for this plugin.\n *\n * Only available on Android and iOS.\n *\n * @since 0.0.1\n */\n removeAllListeners(): Promise<void>;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface InitializeOptions {\n /**\n * The Square location ID.\n *\n * @since 0.0.1\n * @example 'LOCATION_ID'\n */\n locationId: string;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface AuthorizeOptions {\n /**\n * The Square access token.\n *\n * @since 0.0.1\n * @example 'EAAAEOuLQPDbLd...'\n */\n accessToken: string;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface IsAuthorizedResult {\n /**\n * Whether the SDK is currently authorized.\n *\n * @since 0.0.1\n */\n authorized: boolean;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface GetSettingsResult {\n /**\n * The SDK version.\n *\n * @since 0.0.1\n * @example '2.0.0'\n */\n version: string;\n /**\n * The current environment.\n *\n * @since 0.0.1\n * @example 'production'\n */\n environment: Environment;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface IsPairingInProgressResult {\n /**\n * Whether a pairing process is currently in progress.\n *\n * @since 0.0.1\n */\n inProgress: boolean;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface GetReadersResult {\n /**\n * The list of paired readers.\n *\n * @since 0.0.1\n */\n readers: ReaderInfo[];\n}\n\n/**\n * @since 0.0.1\n */\nexport interface ForgetReaderOptions {\n /**\n * The serial number of the reader to forget.\n *\n * @since 0.0.1\n * @example 'CRR123456789'\n */\n serialNumber: string;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface RetryConnectionOptions {\n /**\n * The serial number of the reader to retry connection.\n *\n * @since 0.0.1\n * @example 'CRR123456789'\n */\n serialNumber: string;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface StartPaymentOptions {\n /**\n * The payment parameters.\n *\n * @since 0.0.1\n */\n paymentParameters: PaymentParameters;\n /**\n * The prompt parameters.\n *\n * @since 0.0.1\n */\n promptParameters: PromptParameters;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface PaymentParameters {\n /**\n * The amount of money to charge.\n *\n * @since 0.0.1\n */\n amountMoney: Money;\n /**\n * A unique identifier for this payment attempt.\n *\n * This is used for idempotent payment requests.\n *\n * @since 0.0.1\n * @example 'a1b2c3d4-e5f6-4a5b-8c9d-1e2f3a4b5c6d'\n */\n paymentAttemptId: string;\n /**\n * The processing mode for this payment.\n *\n * @since 0.0.1\n * @default ProcessingMode.AutoDetect\n */\n processingMode?: ProcessingMode;\n /**\n * A user-defined reference ID to associate with the payment.\n *\n * @since 0.0.1\n * @example 'ORDER-12345'\n */\n referenceId?: string;\n /**\n * An optional note to add to the payment.\n *\n * @since 0.0.1\n * @example 'Birthday gift'\n */\n note?: string;\n /**\n * The Square order ID to associate with this payment.\n *\n * @since 0.0.1\n * @example 'CAISENgvlJ6jLWAzERDzjyHVybY'\n */\n orderId?: string;\n /**\n * The tip amount.\n *\n * @since 0.0.1\n */\n tipMoney?: Money;\n /**\n * The application fee.\n *\n * @since 0.0.1\n */\n applicationFee?: Money;\n /**\n * Whether to automatically complete the payment.\n *\n * If false, the payment will be authorized but not captured, requiring\n * manual completion via the Payments API.\n *\n * @since 0.0.1\n * @default true\n */\n autocomplete?: boolean;\n /**\n * The duration to delay before automatically completing or canceling the payment.\n *\n * Only applicable when autocomplete is false.\n *\n * @since 0.0.1\n * @example 'PT1H'\n */\n delayDuration?: string;\n /**\n * The action to take when the delay duration expires.\n *\n * Only applicable when autocomplete is false.\n *\n * @since 0.0.1\n */\n delayAction?: DelayAction;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface PromptParameters {\n /**\n * The prompt mode.\n *\n * @since 0.0.1\n * @default PromptMode.Default\n */\n mode?: PromptMode;\n /**\n * Additional payment methods to allow.\n *\n * @since 0.0.1\n * @default []\n */\n additionalMethods?: AdditionalPaymentMethod[];\n}\n\n/**\n * @since 0.0.1\n */\nexport interface Money {\n /**\n * The amount in the smallest currency unit (e.g., cents for USD).\n *\n * @since 0.0.1\n * @example 100\n */\n amount: number;\n /**\n * The ISO 4217 currency code.\n *\n * @since 0.0.1\n * @example 'USD'\n */\n currency: CurrencyCode;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface GetAvailableCardInputMethodsResult {\n /**\n * The available card input methods.\n *\n * @since 0.0.1\n */\n cardInputMethods: CardInputMethod[];\n}\n\n/**\n * @since 0.0.1\n */\nexport interface ReaderInfo {\n /**\n * The reader's serial number.\n *\n * @since 0.0.1\n * @example 'CRR123456789'\n */\n serialNumber: string;\n /**\n * The reader's model.\n *\n * @since 0.0.1\n */\n model: ReaderModel;\n /**\n * The reader's current status.\n *\n * @since 0.0.1\n */\n status: ReaderStatus;\n /**\n * The reader's firmware version.\n *\n * @since 0.0.1\n * @example '1.2.3'\n */\n firmwareVersion?: string;\n /**\n * The reader's battery level (0-100).\n *\n * @since 0.0.1\n * @example 85\n */\n batteryLevel?: number;\n /**\n * Whether the reader is currently charging.\n *\n * @since 0.0.1\n */\n isCharging?: boolean;\n /**\n * The card input methods supported by this reader.\n *\n * @since 0.0.1\n */\n supportedCardInputMethods: CardInputMethod[];\n /**\n * Additional information about why the reader is unavailable.\n *\n * Only present when status is ReaderUnavailable.\n *\n * @since 0.0.1\n */\n unavailableReasonInfo?: UnavailableReasonInfo;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface UnavailableReasonInfo {\n /**\n * The reason code why the reader is unavailable.\n *\n * @since 0.0.1\n */\n reason: UnavailableReason;\n /**\n * A human-readable message describing why the reader is unavailable.\n *\n * @since 0.0.1\n */\n message?: string;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface Payment {\n /**\n * The unique identifier for this payment.\n *\n * For offline payments, this may be null until synced.\n *\n * @since 0.0.1\n * @example 'AbCdEfGhIjKlMnOpQrStUvWxYz'\n */\n id: string | null;\n /**\n * The payment type.\n *\n * @since 0.0.1\n */\n type: PaymentType;\n /**\n * The payment status.\n *\n * @since 0.0.1\n */\n status: PaymentStatus;\n /**\n * The amount paid.\n *\n * @since 0.0.1\n */\n amountMoney: Money;\n /**\n * The tip amount.\n *\n * @since 0.0.1\n */\n tipMoney?: Money;\n /**\n * The application fee.\n *\n * @since 0.0.1\n */\n applicationFee?: Money;\n /**\n * The reference ID provided in the payment parameters.\n *\n * @since 0.0.1\n */\n referenceId?: string;\n /**\n * The order ID associated with this payment.\n *\n * @since 0.0.1\n */\n orderId?: string;\n /**\n * Card payment details.\n *\n * Only present for card payments.\n *\n * @since 0.0.1\n */\n cardDetails?: CardPaymentDetails;\n /**\n * The time the payment was created (ISO 8601 format).\n *\n * @since 0.0.1\n * @example '2024-01-15T10:30:00Z'\n */\n createdAt?: string;\n /**\n * The time the payment was updated (ISO 8601 format).\n *\n * @since 0.0.1\n * @example '2024-01-15T10:30:00Z'\n */\n updatedAt?: string;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface CardPaymentDetails {\n /**\n * The card information.\n *\n * @since 0.0.1\n */\n card: Card;\n /**\n * The card entry method used.\n *\n * @since 0.0.1\n */\n entryMethod: CardInputMethod;\n /**\n * The authorization code.\n *\n * @since 0.0.1\n * @example '123456'\n */\n authorizationCode?: string;\n /**\n * The EMV application name.\n *\n * @since 0.0.1\n * @example 'VISA CREDIT'\n */\n applicationName?: string;\n /**\n * The EMV application identifier.\n *\n * @since 0.0.1\n * @example 'A0000000031010'\n */\n applicationId?: string;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface Card {\n /**\n * The card brand.\n *\n * @since 0.0.1\n */\n brand: CardBrand;\n /**\n * The last four digits of the card number.\n *\n * @since 0.0.1\n * @example '1234'\n */\n lastFourDigits: string;\n /**\n * The cardholder name.\n *\n * @since 0.0.1\n * @example 'John Doe'\n */\n cardholderName?: string;\n /**\n * The card expiration month (1-12).\n *\n * @since 0.0.1\n * @example 12\n */\n expirationMonth?: number;\n /**\n * The card expiration year.\n *\n * @since 0.0.1\n * @example 2025\n */\n expirationYear?: number;\n}\n\n/**\n * Callback to receive reader pairing start notifications.\n *\n * @since 0.0.1\n */\nexport type ReaderPairingDidBeginListener = () => void;\n\n/**\n * Callback to receive reader pairing success notifications.\n *\n * @since 0.0.1\n */\nexport type ReaderPairingDidSucceedListener = () => void;\n\n/**\n * Callback to receive reader pairing failure notifications.\n *\n * @since 0.0.1\n */\nexport type ReaderPairingDidFailListener = (\n event: ReaderPairingDidFailEvent,\n) => void;\n\n/**\n * @since 0.0.1\n */\nexport interface ReaderPairingDidFailEvent {\n /**\n * The error code.\n *\n * @since 0.0.1\n */\n code?: string;\n /**\n * The error message.\n *\n * @since 0.0.1\n */\n message: string;\n}\n\n/**\n * Callback to receive reader added notifications.\n *\n * @since 0.0.1\n */\nexport type ReaderWasAddedListener = (event: ReaderWasAddedEvent) => void;\n\n/**\n * @since 0.0.1\n */\nexport interface ReaderWasAddedEvent {\n /**\n * The reader that was added.\n *\n * @since 0.0.1\n */\n reader: ReaderInfo;\n}\n\n/**\n * Callback to receive reader removed notifications.\n *\n * @since 0.0.1\n */\nexport type ReaderWasRemovedListener = (event: ReaderWasRemovedEvent) => void;\n\n/**\n * @since 0.0.1\n */\nexport interface ReaderWasRemovedEvent {\n /**\n * The reader that was removed.\n *\n * @since 0.0.1\n */\n reader: ReaderInfo;\n}\n\n/**\n * Callback to receive reader change notifications.\n *\n * @since 0.0.1\n */\nexport type ReaderDidChangeListener = (event: ReaderDidChangeEvent) => void;\n\n/**\n * @since 0.0.1\n */\nexport interface ReaderDidChangeEvent {\n /**\n * The reader that changed.\n *\n * @since 0.0.1\n */\n reader: ReaderInfo;\n /**\n * The type of change that occurred.\n *\n * @since 0.0.1\n */\n change: ReaderChange;\n}\n\n/**\n * Callback to receive available card input method change notifications.\n *\n * @since 0.0.1\n */\nexport type AvailableCardInputMethodsDidChangeListener = (\n event: AvailableCardInputMethodsDidChangeEvent,\n) => void;\n\n/**\n * @since 0.0.1\n */\nexport interface AvailableCardInputMethodsDidChangeEvent {\n /**\n * The available card input methods.\n *\n * @since 0.0.1\n */\n cardInputMethods: CardInputMethod[];\n}\n\n/**\n * Callback to receive payment completion notifications.\n *\n * @since 0.0.1\n */\nexport type PaymentDidFinishListener = (event: PaymentDidFinishEvent) => void;\n\n/**\n * @since 0.0.1\n */\nexport interface PaymentDidFinishEvent {\n /**\n * The completed payment.\n *\n * @since 0.0.1\n */\n payment: Payment;\n}\n\n/**\n * Callback to receive payment failure notifications.\n *\n * @since 0.0.1\n */\nexport type PaymentDidFailListener = (event: PaymentDidFailEvent) => void;\n\n/**\n * @since 0.0.1\n */\nexport interface PaymentDidFailEvent {\n /**\n * The failed payment.\n *\n * @since 0.0.1\n */\n payment?: Payment;\n /**\n * The error code.\n *\n * @since 0.0.1\n */\n code?: string;\n /**\n * The error message.\n *\n * @since 0.0.1\n */\n message: string;\n}\n\n/**\n * Callback to receive payment cancellation notifications.\n *\n * @since 0.0.1\n */\nexport type PaymentDidCancelListener = (event: PaymentDidCancelEvent) => void;\n\n/**\n * @since 0.0.1\n */\nexport interface PaymentDidCancelEvent {\n /**\n * The cancelled payment.\n *\n * @since 0.0.1\n */\n payment?: Payment;\n}\n\n/**\n * @since 0.0.1\n */\nexport enum Environment {\n /**\n * Production environment.\n *\n * @since 0.0.1\n */\n Production = 'production',\n /**\n * Sandbox environment for testing.\n *\n * @since 0.0.1\n */\n Sandbox = 'sandbox',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum CardInputMethod {\n /**\n * Contactless card tap (NFC).\n *\n * @since 0.0.1\n */\n Tap = 'TAP',\n /**\n * EMV chip card insertion.\n *\n * @since 0.0.1\n */\n Dip = 'DIP',\n /**\n * Magnetic stripe swipe.\n *\n * @since 0.0.1\n */\n Swipe = 'SWIPE',\n /**\n * Manually keyed card entry.\n *\n * @since 0.0.1\n */\n Keyed = 'KEYED',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum ProcessingMode {\n /**\n * Automatically detect the best processing mode (online or offline).\n *\n * @since 0.0.1\n */\n AutoDetect = 'AUTO_DETECT',\n /**\n * Process the payment online only.\n *\n * @since 0.0.1\n */\n OnlineOnly = 'ONLINE_ONLY',\n /**\n * Allow offline payment processing.\n *\n * @since 0.0.1\n */\n OfflineOnly = 'OFFLINE_ONLY',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum PromptMode {\n /**\n * Use the default Square payment UI.\n *\n * @since 0.0.1\n */\n Default = 'DEFAULT',\n /**\n * Use a custom payment UI.\n *\n * @since 0.0.1\n */\n Custom = 'CUSTOM',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum AdditionalPaymentMethod {\n /**\n * Allow manually keyed card entry.\n *\n * @since 0.0.1\n */\n Keyed = 'KEYED',\n /**\n * Allow cash payments.\n *\n * @since 0.0.1\n */\n Cash = 'CASH',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum DelayAction {\n /**\n * Automatically complete the payment when the delay expires.\n *\n * @since 0.0.1\n */\n Complete = 'COMPLETE',\n /**\n * Automatically cancel the payment when the delay expires.\n *\n * @since 0.0.1\n */\n Cancel = 'CANCEL',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum ReaderModel {\n /**\n * Square Reader for contactless and chip.\n *\n * @since 0.0.1\n */\n ContactlessAndChip = 'CONTACTLESS_AND_CHIP',\n /**\n * Square Reader for magstripe.\n *\n * @since 0.0.1\n */\n Magstripe = 'MAGSTRIPE',\n /**\n * Square Stand.\n *\n * @since 0.0.1\n */\n Stand = 'STAND',\n /**\n * Unknown reader model.\n *\n * @since 0.0.1\n */\n Unknown = 'UNKNOWN',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum ReaderStatus {\n /**\n * Reader is paired, connected, and ready to accept payments.\n *\n * @since 0.0.1\n */\n Ready = 'READY',\n /**\n * Reader is connecting to Square servers.\n *\n * @since 0.0.1\n */\n ConnectingToSquare = 'CONNECTING_TO_SQUARE',\n /**\n * Reader is connecting to the mobile device.\n *\n * @since 0.0.1\n */\n ConnectingToDevice = 'CONNECTING_TO_DEVICE',\n /**\n * Reader has a hardware or connection error in an unrecoverable state.\n *\n * @since 0.0.1\n */\n Faulty = 'FAULTY',\n /**\n * Reader is connected but unable to process payments.\n *\n * @since 0.0.1\n */\n ReaderUnavailable = 'READER_UNAVAILABLE',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum ReaderChange {\n /**\n * Reader battery started charging.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n BatteryDidBeginCharging = 'BATTERY_DID_BEGIN_CHARGING',\n /**\n * Reader battery stopped charging.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n BatteryDidEndCharging = 'BATTERY_DID_END_CHARGING',\n /**\n * Reader battery level changed.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n BatteryLevelDidChange = 'BATTERY_LEVEL_DID_CHANGE',\n /**\n * Reader battery charging status changed.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n BatteryCharging = 'BATTERY_CHARGING',\n /**\n * Reader was added.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n Added = 'ADDED',\n /**\n * Reader was removed.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n Removed = 'REMOVED',\n /**\n * Reader status changed.\n *\n * @since 0.0.1\n */\n StatusDidChange = 'STATUS_DID_CHANGE',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum UnavailableReason {\n /**\n * Bluetooth connection issue.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n BluetoothError = 'BLUETOOTH_ERROR',\n /**\n * Bluetooth failure.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n BluetoothFailure = 'BLUETOOTH_FAILURE',\n /**\n * Bluetooth is disabled.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n BluetoothDisabled = 'BLUETOOTH_DISABLED',\n /**\n * Reader firmware is updating.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n FirmwareUpdate = 'FIRMWARE_UPDATE',\n /**\n * Blocking firmware update.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n BlockingUpdate = 'BLOCKING_UPDATE',\n /**\n * Reader is unavailable offline.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n ReaderUnavailableOffline = 'READER_UNAVAILABLE_OFFLINE',\n /**\n * Device is in developer mode.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n DeviceDeveloperMode = 'DEVICE_DEVELOPER_MODE',\n /**\n * Unknown reason.\n *\n * @since 0.0.1\n */\n Unknown = 'UNKNOWN',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum PaymentType {\n /**\n * Payment processed online.\n *\n * @since 0.0.1\n */\n Online = 'ONLINE',\n /**\n * Payment processed offline.\n *\n * @since 0.0.1\n */\n Offline = 'OFFLINE',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum PaymentStatus {\n /**\n * Payment was completed successfully.\n *\n * @since 0.0.1\n */\n Completed = 'COMPLETED',\n /**\n * Payment was approved but not yet completed.\n *\n * @since 0.0.1\n */\n Approved = 'APPROVED',\n /**\n * Payment was canceled.\n *\n * @since 0.0.1\n */\n Canceled = 'CANCELED',\n /**\n * Payment failed.\n *\n * @since 0.0.1\n */\n Failed = 'FAILED',\n /**\n * Payment is pending.\n *\n * @since 0.0.1\n */\n Pending = 'PENDING',\n}\n\n/**\n * @since 0.0.1\n */\nexport enum CardBrand {\n /**\n * Visa card.\n *\n * @since 0.0.1\n */\n Visa = 'VISA',\n /**\n * Mastercard.\n *\n * @since 0.0.1\n */\n Mastercard = 'MASTERCARD',\n /**\n * American Express card.\n *\n * @since 0.0.1\n */\n AmericanExpress = 'AMERICAN_EXPRESS',\n /**\n * Discover card.\n *\n * @since 0.0.1\n */\n Discover = 'DISCOVER',\n /**\n * Discover Diners card.\n *\n * @since 0.0.1\n */\n DiscoverDiners = 'DISCOVER_DINERS',\n /**\n * JCB card.\n *\n * @since 0.0.1\n */\n Jcb = 'JCB',\n /**\n * UnionPay card.\n *\n * @since 0.0.1\n */\n UnionPay = 'UNION_PAY',\n /**\n * Interac card.\n *\n * @since 0.0.1\n */\n Interac = 'INTERAC',\n /**\n * Eftpos card.\n *\n * @since 0.0.1\n */\n Eftpos = 'EFTPOS',\n /**\n * Other or unknown card brand.\n *\n * @since 0.0.1\n */\n Other = 'OTHER',\n}\n\n/**\n * @since 0.0.1\n */\nexport interface PermissionStatus {\n /**\n * Permission state for accessing location.\n *\n * Required to confirm that payments are occurring in a supported Square location.\n *\n * @since 0.0.1\n */\n location: PermissionState;\n /**\n * Permission state for recording audio.\n *\n * Required to receive data from magstripe readers.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n recordAudio?: PermissionState;\n /**\n * Permission state for Bluetooth connect.\n *\n * Required to receive data from contactless and chip readers.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n bluetoothConnect?: PermissionState;\n /**\n * Permission state for Bluetooth scan.\n *\n * Required to store information during checkout.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n bluetoothScan?: PermissionState;\n /**\n * Permission state for reading phone state.\n *\n * Required to identify the device sending information to Square servers.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n readPhoneState?: PermissionState;\n /**\n * Permission state for using Bluetooth.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n bluetooth?: PermissionState;\n}\n\n/**\n * @since 0.0.1\n */\nexport type CurrencyCode = string;\n\n/**\n * @since 0.0.1\n */\nexport enum ErrorCode {\n /**\n * The location ID is missing.\n *\n * @since 0.0.1\n */\n LocationIdMissing = 'LOCATION_ID_MISSING',\n /**\n * The access token is missing.\n *\n * @since 0.0.1\n */\n AccessTokenMissing = 'ACCESS_TOKEN_MISSING',\n /**\n * The serial number is missing.\n *\n * @since 0.0.1\n */\n SerialNumberMissing = 'SERIAL_NUMBER_MISSING',\n /**\n * The payment parameters are missing.\n *\n * @since 0.0.1\n */\n PaymentParametersMissing = 'PAYMENT_PARAMETERS_MISSING',\n /**\n * The prompt parameters are missing.\n *\n * @since 0.0.1\n */\n PromptParametersMissing = 'PROMPT_PARAMETERS_MISSING',\n /**\n * The amount money is missing.\n *\n * @since 0.0.1\n */\n AmountMoneyMissing = 'AMOUNT_MONEY_MISSING',\n /**\n * The payment attempt ID is missing.\n *\n * @since 0.0.1\n */\n PaymentAttemptIdMissing = 'PAYMENT_ATTEMPT_ID_MISSING',\n /**\n * The SDK is not initialized.\n *\n * @since 0.0.1\n */\n NotInitialized = 'NOT_INITIALIZED',\n /**\n * The SDK is not authorized.\n *\n * @since 0.0.1\n */\n NotAuthorized = 'NOT_AUTHORIZED',\n /**\n * A pairing process is already in progress.\n *\n * @since 0.0.1\n */\n PairingAlreadyInProgress = 'PAIRING_ALREADY_IN_PROGRESS',\n /**\n * No payment is in progress.\n *\n * @since 0.0.1\n */\n NoPaymentInProgress = 'NO_PAYMENT_IN_PROGRESS',\n /**\n * Reader not found.\n *\n * @since 0.0.1\n */\n ReaderNotFound = 'READER_NOT_FOUND',\n}\n"]}
package/dist/esm/web.d.ts CHANGED
@@ -6,6 +6,8 @@ export declare class SquareMobilePaymentsWeb extends WebPlugin implements Square
6
6
  isAuthorized(): Promise<IsAuthorizedResult>;
7
7
  deauthorize(): Promise<void>;
8
8
  showSettings(): Promise<void>;
9
+ showMockReader(): Promise<void>;
10
+ hideMockReader(): Promise<void>;
9
11
  getSettings(): Promise<GetSettingsResult>;
10
12
  startPairing(): Promise<void>;
11
13
  stopPairing(): Promise<void>;
package/dist/esm/web.js CHANGED
@@ -15,6 +15,12 @@ export class SquareMobilePaymentsWeb extends WebPlugin {
15
15
  async showSettings() {
16
16
  throw this.unimplemented('Not implemented on web.');
17
17
  }
18
+ async showMockReader() {
19
+ throw this.unimplemented('Not implemented on web.');
20
+ }
21
+ async hideMockReader() {
22
+ throw this.unimplemented('Not implemented on web.');
23
+ }
18
24
  async getSettings() {
19
25
  throw this.unimplemented('Not implemented on web.');
20
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAiB5C,MAAM,OAAO,uBACX,SAAQ,SAAS;IAGjB,KAAK,CAAC,UAAU,CAAC,QAA2B;QAC1C,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,QAA0B;QACxC,MAAM,IAAI,CAAC,aA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a,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,gBAAgB;QACpB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,kBAAkB;QACtB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n AuthorizeOptions,\n ForgetReaderOptions,\n GetAvailableCardInputMethodsResult,\n GetReadersResult,\n GetSettingsResult,\n InitializeOptions,\n IsAuthorizedResult,\n IsPairingInProgressResult,\n PermissionStatus,\n RetryConnectionOptions,\n SquareMobilePaymentsPlugin,\n StartPaymentOptions,\n} from './definitions';\n\nexport class SquareMobilePaymentsWeb\n extends WebPlugin\n implements SquareMobilePaymentsPlugin\n{\n async initialize(_options: InitializeOptions): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async authorize(_options: AuthorizeOptions): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async isAuthorized(): Promise<IsAuthorizedResult> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async deauthorize(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async showSettings(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async getSettings(): Promise<GetSettingsResult> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async startPairing(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async stopPairing(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async isPairingInProgress(): Promise<IsPairingInProgressResult> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async getReaders(): Promise<GetReadersResult> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async forgetReader(_options: ForgetReaderOptions): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async retryConnection(_options: RetryConnectionOptions): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async startPayment(_options: StartPaymentOptions): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async cancelPayment(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async getAvailableCardInputMethods(): Promise<GetAvailableCardInputMethodsResult> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async checkPermissions(): Promise<PermissionStatus> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async requestPermissions(): Promise<PermissionStatus> {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAiB5C,MAAM,OAAO,uBACX,SAAQ,SAAS;IAGjB,KAAK,CAAC,UAAU,CAAC,QAA2B;QAC1C,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,QAA0B;QACxC,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,WAAW;QACf,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,cAAc;QAClB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,cAAc;QAClB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,WAAW;QACf,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,WAAW;QACf,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,mBAAmB;QACvB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,UAAU;QACd,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,QAA6B;QAC9C,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,QAAgC;QACpD,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,QAA6B;QAC9C,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,aAAa;QACjB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,4BAA4B;QAChC,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,gBAAgB;QACpB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,kBAAkB;QACtB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n AuthorizeOptions,\n ForgetReaderOptions,\n GetAvailableCardInputMethodsResult,\n GetReadersResult,\n GetSettingsResult,\n InitializeOptions,\n IsAuthorizedResult,\n IsPairingInProgressResult,\n PermissionStatus,\n RetryConnectionOptions,\n SquareMobilePaymentsPlugin,\n StartPaymentOptions,\n} from './definitions';\n\nexport class SquareMobilePaymentsWeb\n extends WebPlugin\n implements SquareMobilePaymentsPlugin\n{\n async initialize(_options: InitializeOptions): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async authorize(_options: AuthorizeOptions): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async isAuthorized(): Promise<IsAuthorizedResult> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async deauthorize(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async showSettings(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async showMockReader(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async hideMockReader(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async getSettings(): Promise<GetSettingsResult> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async startPairing(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async stopPairing(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async isPairingInProgress(): Promise<IsPairingInProgressResult> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async getReaders(): Promise<GetReadersResult> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async forgetReader(_options: ForgetReaderOptions): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async retryConnection(_options: RetryConnectionOptions): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async startPayment(_options: StartPaymentOptions): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async cancelPayment(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async getAvailableCardInputMethods(): Promise<GetAvailableCardInputMethodsResult> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async checkPermissions(): Promise<PermissionStatus> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async requestPermissions(): Promise<PermissionStatus> {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n"]}
@@ -541,6 +541,12 @@ class SquareMobilePaymentsWeb extends core.WebPlugin {
541
541
  async showSettings() {
542
542
  throw this.unimplemented('Not implemented on web.');
543
543
  }
544
+ async showMockReader() {
545
+ throw this.unimplemented('Not implemented on web.');
546
+ }
547
+ async hideMockReader() {
548
+ throw this.unimplemented('Not implemented on web.');
549
+ }
544
550
  async getSettings() {
545
551
  throw this.unimplemented('Not implemented on web.');
546
552
  }
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * @since 0.0.1\n */\nexport var Environment;\n(function (Environment) {\n /**\n * Production environment.\n *\n * @since 0.0.1\n */\n Environment[\"Production\"] = \"production\";\n /**\n * Sandbox environment for testing.\n *\n * @since 0.0.1\n */\n Environment[\"Sandbox\"] = \"sandbox\";\n})(Environment || (Environment = {}));\n/**\n * @since 0.0.1\n */\nexport var CardInputMethod;\n(function (CardInputMethod) {\n /**\n * Contactless card tap (NFC).\n *\n * @since 0.0.1\n */\n CardInputMethod[\"Tap\"] = \"TAP\";\n /**\n * EMV chip card insertion.\n *\n * @since 0.0.1\n */\n CardInputMethod[\"Dip\"] = \"DIP\";\n /**\n * Magnetic stripe swipe.\n *\n * @since 0.0.1\n */\n CardInputMethod[\"Swipe\"] = \"SWIPE\";\n /**\n * Manually keyed card entry.\n *\n * @since 0.0.1\n */\n CardInputMethod[\"Keyed\"] = \"KEYED\";\n})(CardInputMethod || (CardInputMethod = {}));\n/**\n * @since 0.0.1\n */\nexport var ProcessingMode;\n(function (ProcessingMode) {\n /**\n * Automatically detect the best processing mode (online or offline).\n *\n * @since 0.0.1\n */\n ProcessingMode[\"AutoDetect\"] = \"AUTO_DETECT\";\n /**\n * Process the payment online only.\n *\n * @since 0.0.1\n */\n ProcessingMode[\"OnlineOnly\"] = \"ONLINE_ONLY\";\n /**\n * Allow offline payment processing.\n *\n * @since 0.0.1\n */\n ProcessingMode[\"OfflineOnly\"] = \"OFFLINE_ONLY\";\n})(ProcessingMode || (ProcessingMode = {}));\n/**\n * @since 0.0.1\n */\nexport var PromptMode;\n(function (PromptMode) {\n /**\n * Use the default Square payment UI.\n *\n * @since 0.0.1\n */\n PromptMode[\"Default\"] = \"DEFAULT\";\n /**\n * Use a custom payment UI.\n *\n * @since 0.0.1\n */\n PromptMode[\"Custom\"] = \"CUSTOM\";\n})(PromptMode || (PromptMode = {}));\n/**\n * @since 0.0.1\n */\nexport var AdditionalPaymentMethod;\n(function (AdditionalPaymentMethod) {\n /**\n * Allow manually keyed card entry.\n *\n * @since 0.0.1\n */\n AdditionalPaymentMethod[\"Keyed\"] = \"KEYED\";\n /**\n * Allow cash payments.\n *\n * @since 0.0.1\n */\n AdditionalPaymentMethod[\"Cash\"] = \"CASH\";\n})(AdditionalPaymentMethod || (AdditionalPaymentMethod = {}));\n/**\n * @since 0.0.1\n */\nexport var DelayAction;\n(function (DelayAction) {\n /**\n * Automatically complete the payment when the delay expires.\n *\n * @since 0.0.1\n */\n DelayAction[\"Complete\"] = \"COMPLETE\";\n /**\n * Automatically cancel the payment when the delay expires.\n *\n * @since 0.0.1\n */\n DelayAction[\"Cancel\"] = \"CANCEL\";\n})(DelayAction || (DelayAction = {}));\n/**\n * @since 0.0.1\n */\nexport var ReaderModel;\n(function (ReaderModel) {\n /**\n * Square Reader for contactless and chip.\n *\n * @since 0.0.1\n */\n ReaderModel[\"ContactlessAndChip\"] = \"CONTACTLESS_AND_CHIP\";\n /**\n * Square Reader for magstripe.\n *\n * @since 0.0.1\n */\n ReaderModel[\"Magstripe\"] = \"MAGSTRIPE\";\n /**\n * Square Stand.\n *\n * @since 0.0.1\n */\n ReaderModel[\"Stand\"] = \"STAND\";\n /**\n * Unknown reader model.\n *\n * @since 0.0.1\n */\n ReaderModel[\"Unknown\"] = \"UNKNOWN\";\n})(ReaderModel || (ReaderModel = {}));\n/**\n * @since 0.0.1\n */\nexport var ReaderStatus;\n(function (ReaderStatus) {\n /**\n * Reader is paired, connected, and ready to accept payments.\n *\n * @since 0.0.1\n */\n ReaderStatus[\"Ready\"] = \"READY\";\n /**\n * Reader is connecting to Square servers.\n *\n * @since 0.0.1\n */\n ReaderStatus[\"ConnectingToSquare\"] = \"CONNECTING_TO_SQUARE\";\n /**\n * Reader is connecting to the mobile device.\n *\n * @since 0.0.1\n */\n ReaderStatus[\"ConnectingToDevice\"] = \"CONNECTING_TO_DEVICE\";\n /**\n * Reader has a hardware or connection error in an unrecoverable state.\n *\n * @since 0.0.1\n */\n ReaderStatus[\"Faulty\"] = \"FAULTY\";\n /**\n * Reader is connected but unable to process payments.\n *\n * @since 0.0.1\n */\n ReaderStatus[\"ReaderUnavailable\"] = \"READER_UNAVAILABLE\";\n})(ReaderStatus || (ReaderStatus = {}));\n/**\n * @since 0.0.1\n */\nexport var ReaderChange;\n(function (ReaderChange) {\n /**\n * Reader battery started charging.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n ReaderChange[\"BatteryDidBeginCharging\"] = \"BATTERY_DID_BEGIN_CHARGING\";\n /**\n * Reader battery stopped charging.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n ReaderChange[\"BatteryDidEndCharging\"] = \"BATTERY_DID_END_CHARGING\";\n /**\n * Reader battery level changed.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n ReaderChange[\"BatteryLevelDidChange\"] = \"BATTERY_LEVEL_DID_CHANGE\";\n /**\n * Reader battery charging status changed.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n ReaderChange[\"BatteryCharging\"] = \"BATTERY_CHARGING\";\n /**\n * Reader was added.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n ReaderChange[\"Added\"] = \"ADDED\";\n /**\n * Reader was removed.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n ReaderChange[\"Removed\"] = \"REMOVED\";\n /**\n * Reader status changed.\n *\n * @since 0.0.1\n */\n ReaderChange[\"StatusDidChange\"] = \"STATUS_DID_CHANGE\";\n})(ReaderChange || (ReaderChange = {}));\n/**\n * @since 0.0.1\n */\nexport var UnavailableReason;\n(function (UnavailableReason) {\n /**\n * Bluetooth connection issue.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"BluetoothError\"] = \"BLUETOOTH_ERROR\";\n /**\n * Bluetooth failure.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"BluetoothFailure\"] = \"BLUETOOTH_FAILURE\";\n /**\n * Bluetooth is disabled.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"BluetoothDisabled\"] = \"BLUETOOTH_DISABLED\";\n /**\n * Reader firmware is updating.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"FirmwareUpdate\"] = \"FIRMWARE_UPDATE\";\n /**\n * Blocking firmware update.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"BlockingUpdate\"] = \"BLOCKING_UPDATE\";\n /**\n * Reader is unavailable offline.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"ReaderUnavailableOffline\"] = \"READER_UNAVAILABLE_OFFLINE\";\n /**\n * Device is in developer mode.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"DeviceDeveloperMode\"] = \"DEVICE_DEVELOPER_MODE\";\n /**\n * Unknown reason.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"Unknown\"] = \"UNKNOWN\";\n})(UnavailableReason || (UnavailableReason = {}));\n/**\n * @since 0.0.1\n */\nexport var PaymentType;\n(function (PaymentType) {\n /**\n * Payment processed online.\n *\n * @since 0.0.1\n */\n PaymentType[\"Online\"] = \"ONLINE\";\n /**\n * Payment processed offline.\n *\n * @since 0.0.1\n */\n PaymentType[\"Offline\"] = \"OFFLINE\";\n})(PaymentType || (PaymentType = {}));\n/**\n * @since 0.0.1\n */\nexport var PaymentStatus;\n(function (PaymentStatus) {\n /**\n * Payment was completed successfully.\n *\n * @since 0.0.1\n */\n PaymentStatus[\"Completed\"] = \"COMPLETED\";\n /**\n * Payment was approved but not yet completed.\n *\n * @since 0.0.1\n */\n PaymentStatus[\"Approved\"] = \"APPROVED\";\n /**\n * Payment was canceled.\n *\n * @since 0.0.1\n */\n PaymentStatus[\"Canceled\"] = \"CANCELED\";\n /**\n * Payment failed.\n *\n * @since 0.0.1\n */\n PaymentStatus[\"Failed\"] = \"FAILED\";\n /**\n * Payment is pending.\n *\n * @since 0.0.1\n */\n PaymentStatus[\"Pending\"] = \"PENDING\";\n})(PaymentStatus || (PaymentStatus = {}));\n/**\n * @since 0.0.1\n */\nexport var CardBrand;\n(function (CardBrand) {\n /**\n * Visa card.\n *\n * @since 0.0.1\n */\n CardBrand[\"Visa\"] = \"VISA\";\n /**\n * Mastercard.\n *\n * @since 0.0.1\n */\n CardBrand[\"Mastercard\"] = \"MASTERCARD\";\n /**\n * American Express card.\n *\n * @since 0.0.1\n */\n CardBrand[\"AmericanExpress\"] = \"AMERICAN_EXPRESS\";\n /**\n * Discover card.\n *\n * @since 0.0.1\n */\n CardBrand[\"Discover\"] = \"DISCOVER\";\n /**\n * Discover Diners card.\n *\n * @since 0.0.1\n */\n CardBrand[\"DiscoverDiners\"] = \"DISCOVER_DINERS\";\n /**\n * JCB card.\n *\n * @since 0.0.1\n */\n CardBrand[\"Jcb\"] = \"JCB\";\n /**\n * UnionPay card.\n *\n * @since 0.0.1\n */\n CardBrand[\"UnionPay\"] = \"UNION_PAY\";\n /**\n * Interac card.\n *\n * @since 0.0.1\n */\n CardBrand[\"Interac\"] = \"INTERAC\";\n /**\n * Eftpos card.\n *\n * @since 0.0.1\n */\n CardBrand[\"Eftpos\"] = \"EFTPOS\";\n /**\n * Other or unknown card brand.\n *\n * @since 0.0.1\n */\n CardBrand[\"Other\"] = \"OTHER\";\n})(CardBrand || (CardBrand = {}));\n/**\n * @since 0.0.1\n */\nexport var ErrorCode;\n(function (ErrorCode) {\n /**\n * The location ID is missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"LocationIdMissing\"] = \"LOCATION_ID_MISSING\";\n /**\n * The access token is missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"AccessTokenMissing\"] = \"ACCESS_TOKEN_MISSING\";\n /**\n * The serial number is missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"SerialNumberMissing\"] = \"SERIAL_NUMBER_MISSING\";\n /**\n * The payment parameters are missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PaymentParametersMissing\"] = \"PAYMENT_PARAMETERS_MISSING\";\n /**\n * The prompt parameters are missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PromptParametersMissing\"] = \"PROMPT_PARAMETERS_MISSING\";\n /**\n * The amount money is missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"AmountMoneyMissing\"] = \"AMOUNT_MONEY_MISSING\";\n /**\n * The payment attempt ID is missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PaymentAttemptIdMissing\"] = \"PAYMENT_ATTEMPT_ID_MISSING\";\n /**\n * The SDK is not initialized.\n *\n * @since 0.0.1\n */\n ErrorCode[\"NotInitialized\"] = \"NOT_INITIALIZED\";\n /**\n * The SDK is not authorized.\n *\n * @since 0.0.1\n */\n ErrorCode[\"NotAuthorized\"] = \"NOT_AUTHORIZED\";\n /**\n * A pairing process is already in progress.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PairingAlreadyInProgress\"] = \"PAIRING_ALREADY_IN_PROGRESS\";\n /**\n * No payment is in progress.\n *\n * @since 0.0.1\n */\n ErrorCode[\"NoPaymentInProgress\"] = \"NO_PAYMENT_IN_PROGRESS\";\n /**\n * Reader not found.\n *\n * @since 0.0.1\n */\n ErrorCode[\"ReaderNotFound\"] = \"READER_NOT_FOUND\";\n})(ErrorCode || (ErrorCode = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst SquareMobilePayments = registerPlugin('SquareMobilePayments', {\n web: () => import('./web').then(m => new m.SquareMobilePaymentsWeb()),\n});\nexport * from './definitions';\nexport { SquareMobilePayments };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class SquareMobilePaymentsWeb extends WebPlugin {\n async initialize(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async authorize(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async isAuthorized() {\n throw this.unimplemented('Not implemented on web.');\n }\n async deauthorize() {\n throw this.unimplemented('Not implemented on web.');\n }\n async showSettings() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getSettings() {\n throw this.unimplemented('Not implemented on web.');\n }\n async startPairing() {\n throw this.unimplemented('Not implemented on web.');\n }\n async stopPairing() {\n throw this.unimplemented('Not implemented on web.');\n }\n async isPairingInProgress() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getReaders() {\n throw this.unimplemented('Not implemented on web.');\n }\n async forgetReader(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async retryConnection(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async startPayment(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async cancelPayment() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getAvailableCardInputMethods() {\n throw this.unimplemented('Not implemented on web.');\n }\n async checkPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n async requestPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["Environment","CardInputMethod","ProcessingMode","PromptMode","AdditionalPaymentMethod","DelayAction","ReaderModel","ReaderStatus","ReaderChange","UnavailableReason","PaymentType","PaymentStatus","CardBrand","ErrorCode","registerPlugin","WebPlugin"],"mappings":";;;;AAAA;AACA;AACA;AACWA;AACX,CAAC,UAAU,WAAW,EAAE;AACxB;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,YAAY,CAAC,GAAG,YAAY;AAC5C;A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BAAyB,CAAC;AAC3D;AACA;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * @since 0.0.1\n */\nexport var Environment;\n(function (Environment) {\n /**\n * Production environment.\n *\n * @since 0.0.1\n */\n Environment[\"Production\"] = \"production\";\n /**\n * Sandbox environment for testing.\n *\n * @since 0.0.1\n */\n Environment[\"Sandbox\"] = \"sandbox\";\n})(Environment || (Environment = {}));\n/**\n * @since 0.0.1\n */\nexport var CardInputMethod;\n(function (CardInputMethod) {\n /**\n * Contactless card tap (NFC).\n *\n * @since 0.0.1\n */\n CardInputMethod[\"Tap\"] = \"TAP\";\n /**\n * EMV chip card insertion.\n *\n * @since 0.0.1\n */\n CardInputMethod[\"Dip\"] = \"DIP\";\n /**\n * Magnetic stripe swipe.\n *\n * @since 0.0.1\n */\n CardInputMethod[\"Swipe\"] = \"SWIPE\";\n /**\n * Manually keyed card entry.\n *\n * @since 0.0.1\n */\n CardInputMethod[\"Keyed\"] = \"KEYED\";\n})(CardInputMethod || (CardInputMethod = {}));\n/**\n * @since 0.0.1\n */\nexport var ProcessingMode;\n(function (ProcessingMode) {\n /**\n * Automatically detect the best processing mode (online or offline).\n *\n * @since 0.0.1\n */\n ProcessingMode[\"AutoDetect\"] = \"AUTO_DETECT\";\n /**\n * Process the payment online only.\n *\n * @since 0.0.1\n */\n ProcessingMode[\"OnlineOnly\"] = \"ONLINE_ONLY\";\n /**\n * Allow offline payment processing.\n *\n * @since 0.0.1\n */\n ProcessingMode[\"OfflineOnly\"] = \"OFFLINE_ONLY\";\n})(ProcessingMode || (ProcessingMode = {}));\n/**\n * @since 0.0.1\n */\nexport var PromptMode;\n(function (PromptMode) {\n /**\n * Use the default Square payment UI.\n *\n * @since 0.0.1\n */\n PromptMode[\"Default\"] = \"DEFAULT\";\n /**\n * Use a custom payment UI.\n *\n * @since 0.0.1\n */\n PromptMode[\"Custom\"] = \"CUSTOM\";\n})(PromptMode || (PromptMode = {}));\n/**\n * @since 0.0.1\n */\nexport var AdditionalPaymentMethod;\n(function (AdditionalPaymentMethod) {\n /**\n * Allow manually keyed card entry.\n *\n * @since 0.0.1\n */\n AdditionalPaymentMethod[\"Keyed\"] = \"KEYED\";\n /**\n * Allow cash payments.\n *\n * @since 0.0.1\n */\n AdditionalPaymentMethod[\"Cash\"] = \"CASH\";\n})(AdditionalPaymentMethod || (AdditionalPaymentMethod = {}));\n/**\n * @since 0.0.1\n */\nexport var DelayAction;\n(function (DelayAction) {\n /**\n * Automatically complete the payment when the delay expires.\n *\n * @since 0.0.1\n */\n DelayAction[\"Complete\"] = \"COMPLETE\";\n /**\n * Automatically cancel the payment when the delay expires.\n *\n * @since 0.0.1\n */\n DelayAction[\"Cancel\"] = \"CANCEL\";\n})(DelayAction || (DelayAction = {}));\n/**\n * @since 0.0.1\n */\nexport var ReaderModel;\n(function (ReaderModel) {\n /**\n * Square Reader for contactless and chip.\n *\n * @since 0.0.1\n */\n ReaderModel[\"ContactlessAndChip\"] = \"CONTACTLESS_AND_CHIP\";\n /**\n * Square Reader for magstripe.\n *\n * @since 0.0.1\n */\n ReaderModel[\"Magstripe\"] = \"MAGSTRIPE\";\n /**\n * Square Stand.\n *\n * @since 0.0.1\n */\n ReaderModel[\"Stand\"] = \"STAND\";\n /**\n * Unknown reader model.\n *\n * @since 0.0.1\n */\n ReaderModel[\"Unknown\"] = \"UNKNOWN\";\n})(ReaderModel || (ReaderModel = {}));\n/**\n * @since 0.0.1\n */\nexport var ReaderStatus;\n(function (ReaderStatus) {\n /**\n * Reader is paired, connected, and ready to accept payments.\n *\n * @since 0.0.1\n */\n ReaderStatus[\"Ready\"] = \"READY\";\n /**\n * Reader is connecting to Square servers.\n *\n * @since 0.0.1\n */\n ReaderStatus[\"ConnectingToSquare\"] = \"CONNECTING_TO_SQUARE\";\n /**\n * Reader is connecting to the mobile device.\n *\n * @since 0.0.1\n */\n ReaderStatus[\"ConnectingToDevice\"] = \"CONNECTING_TO_DEVICE\";\n /**\n * Reader has a hardware or connection error in an unrecoverable state.\n *\n * @since 0.0.1\n */\n ReaderStatus[\"Faulty\"] = \"FAULTY\";\n /**\n * Reader is connected but unable to process payments.\n *\n * @since 0.0.1\n */\n ReaderStatus[\"ReaderUnavailable\"] = \"READER_UNAVAILABLE\";\n})(ReaderStatus || (ReaderStatus = {}));\n/**\n * @since 0.0.1\n */\nexport var ReaderChange;\n(function (ReaderChange) {\n /**\n * Reader battery started charging.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n ReaderChange[\"BatteryDidBeginCharging\"] = \"BATTERY_DID_BEGIN_CHARGING\";\n /**\n * Reader battery stopped charging.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n ReaderChange[\"BatteryDidEndCharging\"] = \"BATTERY_DID_END_CHARGING\";\n /**\n * Reader battery level changed.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n ReaderChange[\"BatteryLevelDidChange\"] = \"BATTERY_LEVEL_DID_CHANGE\";\n /**\n * Reader battery charging status changed.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n ReaderChange[\"BatteryCharging\"] = \"BATTERY_CHARGING\";\n /**\n * Reader was added.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n ReaderChange[\"Added\"] = \"ADDED\";\n /**\n * Reader was removed.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n ReaderChange[\"Removed\"] = \"REMOVED\";\n /**\n * Reader status changed.\n *\n * @since 0.0.1\n */\n ReaderChange[\"StatusDidChange\"] = \"STATUS_DID_CHANGE\";\n})(ReaderChange || (ReaderChange = {}));\n/**\n * @since 0.0.1\n */\nexport var UnavailableReason;\n(function (UnavailableReason) {\n /**\n * Bluetooth connection issue.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"BluetoothError\"] = \"BLUETOOTH_ERROR\";\n /**\n * Bluetooth failure.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"BluetoothFailure\"] = \"BLUETOOTH_FAILURE\";\n /**\n * Bluetooth is disabled.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"BluetoothDisabled\"] = \"BLUETOOTH_DISABLED\";\n /**\n * Reader firmware is updating.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"FirmwareUpdate\"] = \"FIRMWARE_UPDATE\";\n /**\n * Blocking firmware update.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"BlockingUpdate\"] = \"BLOCKING_UPDATE\";\n /**\n * Reader is unavailable offline.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"ReaderUnavailableOffline\"] = \"READER_UNAVAILABLE_OFFLINE\";\n /**\n * Device is in developer mode.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"DeviceDeveloperMode\"] = \"DEVICE_DEVELOPER_MODE\";\n /**\n * Unknown reason.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"Unknown\"] = \"UNKNOWN\";\n})(UnavailableReason || (UnavailableReason = {}));\n/**\n * @since 0.0.1\n */\nexport var PaymentType;\n(function (PaymentType) {\n /**\n * Payment processed online.\n *\n * @since 0.0.1\n */\n PaymentType[\"Online\"] = \"ONLINE\";\n /**\n * Payment processed offline.\n *\n * @since 0.0.1\n */\n PaymentType[\"Offline\"] = \"OFFLINE\";\n})(PaymentType || (PaymentType = {}));\n/**\n * @since 0.0.1\n */\nexport var PaymentStatus;\n(function (PaymentStatus) {\n /**\n * Payment was completed successfully.\n *\n * @since 0.0.1\n */\n PaymentStatus[\"Completed\"] = \"COMPLETED\";\n /**\n * Payment was approved but not yet completed.\n *\n * @since 0.0.1\n */\n PaymentStatus[\"Approved\"] = \"APPROVED\";\n /**\n * Payment was canceled.\n *\n * @since 0.0.1\n */\n PaymentStatus[\"Canceled\"] = \"CANCELED\";\n /**\n * Payment failed.\n *\n * @since 0.0.1\n */\n PaymentStatus[\"Failed\"] = \"FAILED\";\n /**\n * Payment is pending.\n *\n * @since 0.0.1\n */\n PaymentStatus[\"Pending\"] = \"PENDING\";\n})(PaymentStatus || (PaymentStatus = {}));\n/**\n * @since 0.0.1\n */\nexport var CardBrand;\n(function (CardBrand) {\n /**\n * Visa card.\n *\n * @since 0.0.1\n */\n CardBrand[\"Visa\"] = \"VISA\";\n /**\n * Mastercard.\n *\n * @since 0.0.1\n */\n CardBrand[\"Mastercard\"] = \"MASTERCARD\";\n /**\n * American Express card.\n *\n * @since 0.0.1\n */\n CardBrand[\"AmericanExpress\"] = \"AMERICAN_EXPRESS\";\n /**\n * Discover card.\n *\n * @since 0.0.1\n */\n CardBrand[\"Discover\"] = \"DISCOVER\";\n /**\n * Discover Diners card.\n *\n * @since 0.0.1\n */\n CardBrand[\"DiscoverDiners\"] = \"DISCOVER_DINERS\";\n /**\n * JCB card.\n *\n * @since 0.0.1\n */\n CardBrand[\"Jcb\"] = \"JCB\";\n /**\n * UnionPay card.\n *\n * @since 0.0.1\n */\n CardBrand[\"UnionPay\"] = \"UNION_PAY\";\n /**\n * Interac card.\n *\n * @since 0.0.1\n */\n CardBrand[\"Interac\"] = \"INTERAC\";\n /**\n * Eftpos card.\n *\n * @since 0.0.1\n */\n CardBrand[\"Eftpos\"] = \"EFTPOS\";\n /**\n * Other or unknown card brand.\n *\n * @since 0.0.1\n */\n CardBrand[\"Other\"] = \"OTHER\";\n})(CardBrand || (CardBrand = {}));\n/**\n * @since 0.0.1\n */\nexport var ErrorCode;\n(function (ErrorCode) {\n /**\n * The location ID is missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"LocationIdMissing\"] = \"LOCATION_ID_MISSING\";\n /**\n * The access token is missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"AccessTokenMissing\"] = \"ACCESS_TOKEN_MISSING\";\n /**\n * The serial number is missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"SerialNumberMissing\"] = \"SERIAL_NUMBER_MISSING\";\n /**\n * The payment parameters are missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PaymentParametersMissing\"] = \"PAYMENT_PARAMETERS_MISSING\";\n /**\n * The prompt parameters are missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PromptParametersMissing\"] = \"PROMPT_PARAMETERS_MISSING\";\n /**\n * The amount money is missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"AmountMoneyMissing\"] = \"AMOUNT_MONEY_MISSING\";\n /**\n * The payment attempt ID is missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PaymentAttemptIdMissing\"] = \"PAYMENT_ATTEMPT_ID_MISSING\";\n /**\n * The SDK is not initialized.\n *\n * @since 0.0.1\n */\n ErrorCode[\"NotInitialized\"] = \"NOT_INITIALIZED\";\n /**\n * The SDK is not authorized.\n *\n * @since 0.0.1\n */\n ErrorCode[\"NotAuthorized\"] = \"NOT_AUTHORIZED\";\n /**\n * A pairing process is already in progress.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PairingAlreadyInProgress\"] = \"PAIRING_ALREADY_IN_PROGRESS\";\n /**\n * No payment is in progress.\n *\n * @since 0.0.1\n */\n ErrorCode[\"NoPaymentInProgress\"] = \"NO_PAYMENT_IN_PROGRESS\";\n /**\n * Reader not found.\n *\n * @since 0.0.1\n */\n ErrorCode[\"ReaderNotFound\"] = \"READER_NOT_FOUND\";\n})(ErrorCode || (ErrorCode = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst SquareMobilePayments = registerPlugin('SquareMobilePayments', {\n web: () => import('./web').then(m => new m.SquareMobilePaymentsWeb()),\n});\nexport * from './definitions';\nexport { SquareMobilePayments };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class SquareMobilePaymentsWeb extends WebPlugin {\n async initialize(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async authorize(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async isAuthorized() {\n throw this.unimplemented('Not implemented on web.');\n }\n async deauthorize() {\n throw this.unimplemented('Not implemented on web.');\n }\n async showSettings() {\n throw this.unimplemented('Not implemented on web.');\n }\n async showMockReader() {\n throw this.unimplemented('Not implemented on web.');\n }\n async hideMockReader() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getSettings() {\n throw this.unimplemented('Not implemented on web.');\n }\n async startPairing() {\n throw this.unimplemented('Not implemented on web.');\n }\n async stopPairing() {\n throw this.unimplemented('Not implemented on web.');\n }\n async isPairingInProgress() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getReaders() {\n throw this.unimplemented('Not implemented on web.');\n }\n async forgetReader(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async retryConnection(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async startPayment(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async cancelPayment() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getAvailableCardInputMethods() {\n throw this.unimplemented('Not implemented on web.');\n }\n async checkPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n async requestPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["Environment","CardInputMethod","ProcessingMode","PromptMode","AdditionalPaymentMethod","DelayAction","ReaderModel","ReaderStatus","ReaderChange","UnavailableReason","PaymentType","PaymentStatus","CardBrand","ErrorCode","registerPlugin","WebPlugin"],"mappings":";;;;AAAA;AACA;AACA;AACWA;AACX,CAAC,UAAU,WAAW,EAAE;AACxB;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,YAAY,CAAC,GAAG,YAAY;AAC5C;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,SAAS,CAAC,GAAG,SAAS;AACtC,CAAC,EAAEA,mBAAW,KAAKA,mBAAW,GAAG,EAAE,CAAC,CAAC;AACrC;AACA;AACA;AACWC;AACX,CAAC,UAAU,eAAe,EAAE;AAC5B;AACA;AACA;AACA;AACA;AACA,IAAI,e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yB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,kBAAkB,GAAG;AAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -540,6 +540,12 @@ var capacitorSquareMobilePayments = (function (exports, core) {
540
540
  async showSettings() {
541
541
  throw this.unimplemented('Not implemented on web.');
542
542
  }
543
+ async showMockReader() {
544
+ throw this.unimplemented('Not implemented on web.');
545
+ }
546
+ async hideMockReader() {
547
+ throw this.unimplemented('Not implemented on web.');
548
+ }
543
549
  async getSettings() {
544
550
  throw this.unimplemented('Not implemented on web.');
545
551
  }
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * @since 0.0.1\n */\nexport var Environment;\n(function (Environment) {\n /**\n * Production environment.\n *\n * @since 0.0.1\n */\n Environment[\"Production\"] = \"production\";\n /**\n * Sandbox environment for testing.\n *\n * @since 0.0.1\n */\n Environment[\"Sandbox\"] = \"sandbox\";\n})(Environment || (Environment = {}));\n/**\n * @since 0.0.1\n */\nexport var CardInputMethod;\n(function (CardInputMethod) {\n /**\n * Contactless card tap (NFC).\n *\n * @since 0.0.1\n */\n CardInputMethod[\"Tap\"] = \"TAP\";\n /**\n * EMV chip card insertion.\n *\n * @since 0.0.1\n */\n CardInputMethod[\"Dip\"] = \"DIP\";\n /**\n * Magnetic stripe swipe.\n *\n * @since 0.0.1\n */\n CardInputMethod[\"Swipe\"] = \"SWIPE\";\n /**\n * Manually keyed card entry.\n *\n * @since 0.0.1\n */\n CardInputMethod[\"Keyed\"] = \"KEYED\";\n})(CardInputMethod || (CardInputMethod = {}));\n/**\n * @since 0.0.1\n */\nexport var ProcessingMode;\n(function (ProcessingMode) {\n /**\n * Automatically detect the best processing mode (online or offline).\n *\n * @since 0.0.1\n */\n ProcessingMode[\"AutoDetect\"] = \"AUTO_DETECT\";\n /**\n * Process the payment online only.\n *\n * @since 0.0.1\n */\n ProcessingMode[\"OnlineOnly\"] = \"ONLINE_ONLY\";\n /**\n * Allow offline payment processing.\n *\n * @since 0.0.1\n */\n ProcessingMode[\"OfflineOnly\"] = \"OFFLINE_ONLY\";\n})(ProcessingMode || (ProcessingMode = {}));\n/**\n * @since 0.0.1\n */\nexport var PromptMode;\n(function (PromptMode) {\n /**\n * Use the default Square payment UI.\n *\n * @since 0.0.1\n */\n PromptMode[\"Default\"] = \"DEFAULT\";\n /**\n * Use a custom payment UI.\n *\n * @since 0.0.1\n */\n PromptMode[\"Custom\"] = \"CUSTOM\";\n})(PromptMode || (PromptMode = {}));\n/**\n * @since 0.0.1\n */\nexport var AdditionalPaymentMethod;\n(function (AdditionalPaymentMethod) {\n /**\n * Allow manually keyed card entry.\n *\n * @since 0.0.1\n */\n AdditionalPaymentMethod[\"Keyed\"] = \"KEYED\";\n /**\n * Allow cash payments.\n *\n * @since 0.0.1\n */\n AdditionalPaymentMethod[\"Cash\"] = \"CASH\";\n})(AdditionalPaymentMethod || (AdditionalPaymentMethod = {}));\n/**\n * @since 0.0.1\n */\nexport var DelayAction;\n(function (DelayAction) {\n /**\n * Automatically complete the payment when the delay expires.\n *\n * @since 0.0.1\n */\n DelayAction[\"Complete\"] = \"COMPLETE\";\n /**\n * Automatically cancel the payment when the delay expires.\n *\n * @since 0.0.1\n */\n DelayAction[\"Cancel\"] = \"CANCEL\";\n})(DelayAction || (DelayAction = {}));\n/**\n * @since 0.0.1\n */\nexport var ReaderModel;\n(function (ReaderModel) {\n /**\n * Square Reader for contactless and chip.\n *\n * @since 0.0.1\n */\n ReaderModel[\"ContactlessAndChip\"] = \"CONTACTLESS_AND_CHIP\";\n /**\n * Square Reader for magstripe.\n *\n * @since 0.0.1\n */\n ReaderModel[\"Magstripe\"] = \"MAGSTRIPE\";\n /**\n * Square Stand.\n *\n * @since 0.0.1\n */\n ReaderModel[\"Stand\"] = \"STAND\";\n /**\n * Unknown reader model.\n *\n * @since 0.0.1\n */\n ReaderModel[\"Unknown\"] = \"UNKNOWN\";\n})(ReaderModel || (ReaderModel = {}));\n/**\n * @since 0.0.1\n */\nexport var ReaderStatus;\n(function (ReaderStatus) {\n /**\n * Reader is paired, connected, and ready to accept payments.\n *\n * @since 0.0.1\n */\n ReaderStatus[\"Ready\"] = \"READY\";\n /**\n * Reader is connecting to Square servers.\n *\n * @since 0.0.1\n */\n ReaderStatus[\"ConnectingToSquare\"] = \"CONNECTING_TO_SQUARE\";\n /**\n * Reader is connecting to the mobile device.\n *\n * @since 0.0.1\n */\n ReaderStatus[\"ConnectingToDevice\"] = \"CONNECTING_TO_DEVICE\";\n /**\n * Reader has a hardware or connection error in an unrecoverable state.\n *\n * @since 0.0.1\n */\n ReaderStatus[\"Faulty\"] = \"FAULTY\";\n /**\n * Reader is connected but unable to process payments.\n *\n * @since 0.0.1\n */\n ReaderStatus[\"ReaderUnavailable\"] = \"READER_UNAVAILABLE\";\n})(ReaderStatus || (ReaderStatus = {}));\n/**\n * @since 0.0.1\n */\nexport var ReaderChange;\n(function (ReaderChange) {\n /**\n * Reader battery started charging.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n ReaderChange[\"BatteryDidBeginCharging\"] = \"BATTERY_DID_BEGIN_CHARGING\";\n /**\n * Reader battery stopped charging.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n ReaderChange[\"BatteryDidEndCharging\"] = \"BATTERY_DID_END_CHARGING\";\n /**\n * Reader battery level changed.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n ReaderChange[\"BatteryLevelDidChange\"] = \"BATTERY_LEVEL_DID_CHANGE\";\n /**\n * Reader battery charging status changed.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n ReaderChange[\"BatteryCharging\"] = \"BATTERY_CHARGING\";\n /**\n * Reader was added.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n ReaderChange[\"Added\"] = \"ADDED\";\n /**\n * Reader was removed.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n ReaderChange[\"Removed\"] = \"REMOVED\";\n /**\n * Reader status changed.\n *\n * @since 0.0.1\n */\n ReaderChange[\"StatusDidChange\"] = \"STATUS_DID_CHANGE\";\n})(ReaderChange || (ReaderChange = {}));\n/**\n * @since 0.0.1\n */\nexport var UnavailableReason;\n(function (UnavailableReason) {\n /**\n * Bluetooth connection issue.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"BluetoothError\"] = \"BLUETOOTH_ERROR\";\n /**\n * Bluetooth failure.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"BluetoothFailure\"] = \"BLUETOOTH_FAILURE\";\n /**\n * Bluetooth is disabled.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"BluetoothDisabled\"] = \"BLUETOOTH_DISABLED\";\n /**\n * Reader firmware is updating.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"FirmwareUpdate\"] = \"FIRMWARE_UPDATE\";\n /**\n * Blocking firmware update.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"BlockingUpdate\"] = \"BLOCKING_UPDATE\";\n /**\n * Reader is unavailable offline.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"ReaderUnavailableOffline\"] = \"READER_UNAVAILABLE_OFFLINE\";\n /**\n * Device is in developer mode.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"DeviceDeveloperMode\"] = \"DEVICE_DEVELOPER_MODE\";\n /**\n * Unknown reason.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"Unknown\"] = \"UNKNOWN\";\n})(UnavailableReason || (UnavailableReason = {}));\n/**\n * @since 0.0.1\n */\nexport var PaymentType;\n(function (PaymentType) {\n /**\n * Payment processed online.\n *\n * @since 0.0.1\n */\n PaymentType[\"Online\"] = \"ONLINE\";\n /**\n * Payment processed offline.\n *\n * @since 0.0.1\n */\n PaymentType[\"Offline\"] = \"OFFLINE\";\n})(PaymentType || (PaymentType = {}));\n/**\n * @since 0.0.1\n */\nexport var PaymentStatus;\n(function (PaymentStatus) {\n /**\n * Payment was completed successfully.\n *\n * @since 0.0.1\n */\n PaymentStatus[\"Completed\"] = \"COMPLETED\";\n /**\n * Payment was approved but not yet completed.\n *\n * @since 0.0.1\n */\n PaymentStatus[\"Approved\"] = \"APPROVED\";\n /**\n * Payment was canceled.\n *\n * @since 0.0.1\n */\n PaymentStatus[\"Canceled\"] = \"CANCELED\";\n /**\n * Payment failed.\n *\n * @since 0.0.1\n */\n PaymentStatus[\"Failed\"] = \"FAILED\";\n /**\n * Payment is pending.\n *\n * @since 0.0.1\n */\n PaymentStatus[\"Pending\"] = \"PENDING\";\n})(PaymentStatus || (PaymentStatus = {}));\n/**\n * @since 0.0.1\n */\nexport var CardBrand;\n(function (CardBrand) {\n /**\n * Visa card.\n *\n * @since 0.0.1\n */\n CardBrand[\"Visa\"] = \"VISA\";\n /**\n * Mastercard.\n *\n * @since 0.0.1\n */\n CardBrand[\"Mastercard\"] = \"MASTERCARD\";\n /**\n * American Express card.\n *\n * @since 0.0.1\n */\n CardBrand[\"AmericanExpress\"] = \"AMERICAN_EXPRESS\";\n /**\n * Discover card.\n *\n * @since 0.0.1\n */\n CardBrand[\"Discover\"] = \"DISCOVER\";\n /**\n * Discover Diners card.\n *\n * @since 0.0.1\n */\n CardBrand[\"DiscoverDiners\"] = \"DISCOVER_DINERS\";\n /**\n * JCB card.\n *\n * @since 0.0.1\n */\n CardBrand[\"Jcb\"] = \"JCB\";\n /**\n * UnionPay card.\n *\n * @since 0.0.1\n */\n CardBrand[\"UnionPay\"] = \"UNION_PAY\";\n /**\n * Interac card.\n *\n * @since 0.0.1\n */\n CardBrand[\"Interac\"] = \"INTERAC\";\n /**\n * Eftpos card.\n *\n * @since 0.0.1\n */\n CardBrand[\"Eftpos\"] = \"EFTPOS\";\n /**\n * Other or unknown card brand.\n *\n * @since 0.0.1\n */\n CardBrand[\"Other\"] = \"OTHER\";\n})(CardBrand || (CardBrand = {}));\n/**\n * @since 0.0.1\n */\nexport var ErrorCode;\n(function (ErrorCode) {\n /**\n * The location ID is missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"LocationIdMissing\"] = \"LOCATION_ID_MISSING\";\n /**\n * The access token is missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"AccessTokenMissing\"] = \"ACCESS_TOKEN_MISSING\";\n /**\n * The serial number is missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"SerialNumberMissing\"] = \"SERIAL_NUMBER_MISSING\";\n /**\n * The payment parameters are missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PaymentParametersMissing\"] = \"PAYMENT_PARAMETERS_MISSING\";\n /**\n * The prompt parameters are missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PromptParametersMissing\"] = \"PROMPT_PARAMETERS_MISSING\";\n /**\n * The amount money is missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"AmountMoneyMissing\"] = \"AMOUNT_MONEY_MISSING\";\n /**\n * The payment attempt ID is missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PaymentAttemptIdMissing\"] = \"PAYMENT_ATTEMPT_ID_MISSING\";\n /**\n * The SDK is not initialized.\n *\n * @since 0.0.1\n */\n ErrorCode[\"NotInitialized\"] = \"NOT_INITIALIZED\";\n /**\n * The SDK is not authorized.\n *\n * @since 0.0.1\n */\n ErrorCode[\"NotAuthorized\"] = \"NOT_AUTHORIZED\";\n /**\n * A pairing process is already in progress.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PairingAlreadyInProgress\"] = \"PAIRING_ALREADY_IN_PROGRESS\";\n /**\n * No payment is in progress.\n *\n * @since 0.0.1\n */\n ErrorCode[\"NoPaymentInProgress\"] = \"NO_PAYMENT_IN_PROGRESS\";\n /**\n * Reader not found.\n *\n * @since 0.0.1\n */\n ErrorCode[\"ReaderNotFound\"] = \"READER_NOT_FOUND\";\n})(ErrorCode || (ErrorCode = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst SquareMobilePayments = registerPlugin('SquareMobilePayments', {\n web: () => import('./web').then(m => new m.SquareMobilePaymentsWeb()),\n});\nexport * from './definitions';\nexport { SquareMobilePayments };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class SquareMobilePaymentsWeb extends WebPlugin {\n async initialize(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async authorize(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async isAuthorized() {\n throw this.unimplemented('Not implemented on web.');\n }\n async deauthorize() {\n throw this.unimplemented('Not implemented on web.');\n }\n async showSettings() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getSettings() {\n throw this.unimplemented('Not implemented on web.');\n }\n async startPairing() {\n throw this.unimplemented('Not implemented on web.');\n }\n async stopPairing() {\n throw this.unimplemented('Not implemented on web.');\n }\n async isPairingInProgress() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getReaders() {\n throw this.unimplemented('Not implemented on web.');\n }\n async forgetReader(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async retryConnection(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async startPayment(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async cancelPayment() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getAvailableCardInputMethods() {\n throw this.unimplemented('Not implemented on web.');\n }\n async checkPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n async requestPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["Environment","CardInputMethod","ProcessingMode","PromptMode","AdditionalPaymentMethod","DelayAction","ReaderModel","ReaderStatus","ReaderChange","UnavailableReason","PaymentType","PaymentStatus","CardBrand","ErrorCode","registerPlugin","WebPlugin"],"mappings":";;;IAAA;IACA;IACA;AACWA;IACX,CAAC,UAA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AyB,CAAC;IAC3D;IACA,IAAI,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D;IACA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * @since 0.0.1\n */\nexport var Environment;\n(function (Environment) {\n /**\n * Production environment.\n *\n * @since 0.0.1\n */\n Environment[\"Production\"] = \"production\";\n /**\n * Sandbox environment for testing.\n *\n * @since 0.0.1\n */\n Environment[\"Sandbox\"] = \"sandbox\";\n})(Environment || (Environment = {}));\n/**\n * @since 0.0.1\n */\nexport var CardInputMethod;\n(function (CardInputMethod) {\n /**\n * Contactless card tap (NFC).\n *\n * @since 0.0.1\n */\n CardInputMethod[\"Tap\"] = \"TAP\";\n /**\n * EMV chip card insertion.\n *\n * @since 0.0.1\n */\n CardInputMethod[\"Dip\"] = \"DIP\";\n /**\n * Magnetic stripe swipe.\n *\n * @since 0.0.1\n */\n CardInputMethod[\"Swipe\"] = \"SWIPE\";\n /**\n * Manually keyed card entry.\n *\n * @since 0.0.1\n */\n CardInputMethod[\"Keyed\"] = \"KEYED\";\n})(CardInputMethod || (CardInputMethod = {}));\n/**\n * @since 0.0.1\n */\nexport var ProcessingMode;\n(function (ProcessingMode) {\n /**\n * Automatically detect the best processing mode (online or offline).\n *\n * @since 0.0.1\n */\n ProcessingMode[\"AutoDetect\"] = \"AUTO_DETECT\";\n /**\n * Process the payment online only.\n *\n * @since 0.0.1\n */\n ProcessingMode[\"OnlineOnly\"] = \"ONLINE_ONLY\";\n /**\n * Allow offline payment processing.\n *\n * @since 0.0.1\n */\n ProcessingMode[\"OfflineOnly\"] = \"OFFLINE_ONLY\";\n})(ProcessingMode || (ProcessingMode = {}));\n/**\n * @since 0.0.1\n */\nexport var PromptMode;\n(function (PromptMode) {\n /**\n * Use the default Square payment UI.\n *\n * @since 0.0.1\n */\n PromptMode[\"Default\"] = \"DEFAULT\";\n /**\n * Use a custom payment UI.\n *\n * @since 0.0.1\n */\n PromptMode[\"Custom\"] = \"CUSTOM\";\n})(PromptMode || (PromptMode = {}));\n/**\n * @since 0.0.1\n */\nexport var AdditionalPaymentMethod;\n(function (AdditionalPaymentMethod) {\n /**\n * Allow manually keyed card entry.\n *\n * @since 0.0.1\n */\n AdditionalPaymentMethod[\"Keyed\"] = \"KEYED\";\n /**\n * Allow cash payments.\n *\n * @since 0.0.1\n */\n AdditionalPaymentMethod[\"Cash\"] = \"CASH\";\n})(AdditionalPaymentMethod || (AdditionalPaymentMethod = {}));\n/**\n * @since 0.0.1\n */\nexport var DelayAction;\n(function (DelayAction) {\n /**\n * Automatically complete the payment when the delay expires.\n *\n * @since 0.0.1\n */\n DelayAction[\"Complete\"] = \"COMPLETE\";\n /**\n * Automatically cancel the payment when the delay expires.\n *\n * @since 0.0.1\n */\n DelayAction[\"Cancel\"] = \"CANCEL\";\n})(DelayAction || (DelayAction = {}));\n/**\n * @since 0.0.1\n */\nexport var ReaderModel;\n(function (ReaderModel) {\n /**\n * Square Reader for contactless and chip.\n *\n * @since 0.0.1\n */\n ReaderModel[\"ContactlessAndChip\"] = \"CONTACTLESS_AND_CHIP\";\n /**\n * Square Reader for magstripe.\n *\n * @since 0.0.1\n */\n ReaderModel[\"Magstripe\"] = \"MAGSTRIPE\";\n /**\n * Square Stand.\n *\n * @since 0.0.1\n */\n ReaderModel[\"Stand\"] = \"STAND\";\n /**\n * Unknown reader model.\n *\n * @since 0.0.1\n */\n ReaderModel[\"Unknown\"] = \"UNKNOWN\";\n})(ReaderModel || (ReaderModel = {}));\n/**\n * @since 0.0.1\n */\nexport var ReaderStatus;\n(function (ReaderStatus) {\n /**\n * Reader is paired, connected, and ready to accept payments.\n *\n * @since 0.0.1\n */\n ReaderStatus[\"Ready\"] = \"READY\";\n /**\n * Reader is connecting to Square servers.\n *\n * @since 0.0.1\n */\n ReaderStatus[\"ConnectingToSquare\"] = \"CONNECTING_TO_SQUARE\";\n /**\n * Reader is connecting to the mobile device.\n *\n * @since 0.0.1\n */\n ReaderStatus[\"ConnectingToDevice\"] = \"CONNECTING_TO_DEVICE\";\n /**\n * Reader has a hardware or connection error in an unrecoverable state.\n *\n * @since 0.0.1\n */\n ReaderStatus[\"Faulty\"] = \"FAULTY\";\n /**\n * Reader is connected but unable to process payments.\n *\n * @since 0.0.1\n */\n ReaderStatus[\"ReaderUnavailable\"] = \"READER_UNAVAILABLE\";\n})(ReaderStatus || (ReaderStatus = {}));\n/**\n * @since 0.0.1\n */\nexport var ReaderChange;\n(function (ReaderChange) {\n /**\n * Reader battery started charging.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n ReaderChange[\"BatteryDidBeginCharging\"] = \"BATTERY_DID_BEGIN_CHARGING\";\n /**\n * Reader battery stopped charging.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n ReaderChange[\"BatteryDidEndCharging\"] = \"BATTERY_DID_END_CHARGING\";\n /**\n * Reader battery level changed.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n ReaderChange[\"BatteryLevelDidChange\"] = \"BATTERY_LEVEL_DID_CHANGE\";\n /**\n * Reader battery charging status changed.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n ReaderChange[\"BatteryCharging\"] = \"BATTERY_CHARGING\";\n /**\n * Reader was added.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n ReaderChange[\"Added\"] = \"ADDED\";\n /**\n * Reader was removed.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n ReaderChange[\"Removed\"] = \"REMOVED\";\n /**\n * Reader status changed.\n *\n * @since 0.0.1\n */\n ReaderChange[\"StatusDidChange\"] = \"STATUS_DID_CHANGE\";\n})(ReaderChange || (ReaderChange = {}));\n/**\n * @since 0.0.1\n */\nexport var UnavailableReason;\n(function (UnavailableReason) {\n /**\n * Bluetooth connection issue.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"BluetoothError\"] = \"BLUETOOTH_ERROR\";\n /**\n * Bluetooth failure.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"BluetoothFailure\"] = \"BLUETOOTH_FAILURE\";\n /**\n * Bluetooth is disabled.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"BluetoothDisabled\"] = \"BLUETOOTH_DISABLED\";\n /**\n * Reader firmware is updating.\n *\n * Only available on iOS.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"FirmwareUpdate\"] = \"FIRMWARE_UPDATE\";\n /**\n * Blocking firmware update.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"BlockingUpdate\"] = \"BLOCKING_UPDATE\";\n /**\n * Reader is unavailable offline.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"ReaderUnavailableOffline\"] = \"READER_UNAVAILABLE_OFFLINE\";\n /**\n * Device is in developer mode.\n *\n * Only available on Android.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"DeviceDeveloperMode\"] = \"DEVICE_DEVELOPER_MODE\";\n /**\n * Unknown reason.\n *\n * @since 0.0.1\n */\n UnavailableReason[\"Unknown\"] = \"UNKNOWN\";\n})(UnavailableReason || (UnavailableReason = {}));\n/**\n * @since 0.0.1\n */\nexport var PaymentType;\n(function (PaymentType) {\n /**\n * Payment processed online.\n *\n * @since 0.0.1\n */\n PaymentType[\"Online\"] = \"ONLINE\";\n /**\n * Payment processed offline.\n *\n * @since 0.0.1\n */\n PaymentType[\"Offline\"] = \"OFFLINE\";\n})(PaymentType || (PaymentType = {}));\n/**\n * @since 0.0.1\n */\nexport var PaymentStatus;\n(function (PaymentStatus) {\n /**\n * Payment was completed successfully.\n *\n * @since 0.0.1\n */\n PaymentStatus[\"Completed\"] = \"COMPLETED\";\n /**\n * Payment was approved but not yet completed.\n *\n * @since 0.0.1\n */\n PaymentStatus[\"Approved\"] = \"APPROVED\";\n /**\n * Payment was canceled.\n *\n * @since 0.0.1\n */\n PaymentStatus[\"Canceled\"] = \"CANCELED\";\n /**\n * Payment failed.\n *\n * @since 0.0.1\n */\n PaymentStatus[\"Failed\"] = \"FAILED\";\n /**\n * Payment is pending.\n *\n * @since 0.0.1\n */\n PaymentStatus[\"Pending\"] = \"PENDING\";\n})(PaymentStatus || (PaymentStatus = {}));\n/**\n * @since 0.0.1\n */\nexport var CardBrand;\n(function (CardBrand) {\n /**\n * Visa card.\n *\n * @since 0.0.1\n */\n CardBrand[\"Visa\"] = \"VISA\";\n /**\n * Mastercard.\n *\n * @since 0.0.1\n */\n CardBrand[\"Mastercard\"] = \"MASTERCARD\";\n /**\n * American Express card.\n *\n * @since 0.0.1\n */\n CardBrand[\"AmericanExpress\"] = \"AMERICAN_EXPRESS\";\n /**\n * Discover card.\n *\n * @since 0.0.1\n */\n CardBrand[\"Discover\"] = \"DISCOVER\";\n /**\n * Discover Diners card.\n *\n * @since 0.0.1\n */\n CardBrand[\"DiscoverDiners\"] = \"DISCOVER_DINERS\";\n /**\n * JCB card.\n *\n * @since 0.0.1\n */\n CardBrand[\"Jcb\"] = \"JCB\";\n /**\n * UnionPay card.\n *\n * @since 0.0.1\n */\n CardBrand[\"UnionPay\"] = \"UNION_PAY\";\n /**\n * Interac card.\n *\n * @since 0.0.1\n */\n CardBrand[\"Interac\"] = \"INTERAC\";\n /**\n * Eftpos card.\n *\n * @since 0.0.1\n */\n CardBrand[\"Eftpos\"] = \"EFTPOS\";\n /**\n * Other or unknown card brand.\n *\n * @since 0.0.1\n */\n CardBrand[\"Other\"] = \"OTHER\";\n})(CardBrand || (CardBrand = {}));\n/**\n * @since 0.0.1\n */\nexport var ErrorCode;\n(function (ErrorCode) {\n /**\n * The location ID is missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"LocationIdMissing\"] = \"LOCATION_ID_MISSING\";\n /**\n * The access token is missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"AccessTokenMissing\"] = \"ACCESS_TOKEN_MISSING\";\n /**\n * The serial number is missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"SerialNumberMissing\"] = \"SERIAL_NUMBER_MISSING\";\n /**\n * The payment parameters are missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PaymentParametersMissing\"] = \"PAYMENT_PARAMETERS_MISSING\";\n /**\n * The prompt parameters are missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PromptParametersMissing\"] = \"PROMPT_PARAMETERS_MISSING\";\n /**\n * The amount money is missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"AmountMoneyMissing\"] = \"AMOUNT_MONEY_MISSING\";\n /**\n * The payment attempt ID is missing.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PaymentAttemptIdMissing\"] = \"PAYMENT_ATTEMPT_ID_MISSING\";\n /**\n * The SDK is not initialized.\n *\n * @since 0.0.1\n */\n ErrorCode[\"NotInitialized\"] = \"NOT_INITIALIZED\";\n /**\n * The SDK is not authorized.\n *\n * @since 0.0.1\n */\n ErrorCode[\"NotAuthorized\"] = \"NOT_AUTHORIZED\";\n /**\n * A pairing process is already in progress.\n *\n * @since 0.0.1\n */\n ErrorCode[\"PairingAlreadyInProgress\"] = \"PAIRING_ALREADY_IN_PROGRESS\";\n /**\n * No payment is in progress.\n *\n * @since 0.0.1\n */\n ErrorCode[\"NoPaymentInProgress\"] = \"NO_PAYMENT_IN_PROGRESS\";\n /**\n * Reader not found.\n *\n * @since 0.0.1\n */\n ErrorCode[\"ReaderNotFound\"] = \"READER_NOT_FOUND\";\n})(ErrorCode || (ErrorCode = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst SquareMobilePayments = registerPlugin('SquareMobilePayments', {\n web: () => import('./web').then(m => new m.SquareMobilePaymentsWeb()),\n});\nexport * from './definitions';\nexport { SquareMobilePayments };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class SquareMobilePaymentsWeb extends WebPlugin {\n async initialize(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async authorize(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async isAuthorized() {\n throw this.unimplemented('Not implemented on web.');\n }\n async deauthorize() {\n throw this.unimplemented('Not implemented on web.');\n }\n async showSettings() {\n throw this.unimplemented('Not implemented on web.');\n }\n async showMockReader() {\n throw this.unimplemented('Not implemented on web.');\n }\n async hideMockReader() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getSettings() {\n throw this.unimplemented('Not implemented on web.');\n }\n async startPairing() {\n throw this.unimplemented('Not implemented on web.');\n }\n async stopPairing() {\n throw this.unimplemented('Not implemented on web.');\n }\n async isPairingInProgress() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getReaders() {\n throw this.unimplemented('Not implemented on web.');\n }\n async forgetReader(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async retryConnection(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async startPayment(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async cancelPayment() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getAvailableCardInputMethods() {\n throw this.unimplemented('Not implemented on web.');\n }\n async checkPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n async requestPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["Environment","CardInputMethod","ProcessingMode","PromptMode","AdditionalPaymentMethod","DelayAction","ReaderModel","ReaderStatus","ReaderChange","UnavailableReason","PaymentType","PaymentStatus","CardBrand","ErrorCode","registerPlugin","WebPlugin"],"mappings":";;;IAAA;IACA;IACA;AACWA;IACX,CAAC,UAAU,WAAW,EAAE;IACxB;IACA;IACA;IACA;IACA;IACA,IAAI,WAAW,CAAC,YAAY,CAAC,GAAG,YAAY;IAC5C;IACA;IACA;IACA;IACA;IACA,IAAI,WAAW,CAAC,SAAS,CAAC,GAAG,SAAS;IACtC,CAAC,EAAEA,mBAAW,KAAKA,mBAAW,GAAG,EAAE,CAAC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;IACA;AACWC;IACX,CAAC,UAAU,YAAY,EAAE;IACzB;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,YAAY,CAAC,yBAAyB,CAAC,GAAG,4BAA4B;IAC1E;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,YAAY,CAAC,uBAAuB,CAAC,GAAG,0BAA0B;IACtE;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,YAAY,CAAC,uBAAuB,CAAC,GAAG,0BAA0B;IACtE;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,YAAY,CAAC,iBAAiB,CAAC,GAAG,kBAAkB;IACxD;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,YAAY,CAAC,OAAO,CAAC,GAAG,OAAO;IACnC;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,YAAY,CAAC,SAAS,CAAC,GAAG,SAAS;IACvC;IACA;IACA;IACA;IACA;IACA,IAAI,YAAY,CAAC,iBAAiB,CAAC,GAAG,mBAAmB;IACzD,CAAC,EAAEA,oBAAY,KAAKA,oBAAY,GAAG,EAAE,CAAC,CAAC;IACvC;IACA;IACA;AACWC;IACX,CAAC,UAAU,iBAAiB,EAAE;IAC9B;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,iBAAiB,CAAC,gBAAgB,CAAC,GAAG,iBAAiB;IAC3D;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,iBAAiB,CAAC,kBAAkB,CAAC,GAAG,mBAAmB;IAC/D;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,iBAAiB,CAAC,mBAAmB,CAAC,GAAG,oBAAoB;IACjE;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,iBAAiB,CAAC,gBAAgB,CAAC,GAAG,iBAAiB;IAC3D;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,iBAAiB,CAAC,gBAAgB,CAAC,GAAG,iBAAiB;IAC3D;IACA;IACA;IACA;IACA;IACA;IACA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;IAC3D,IAAI;IACJ,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ;;;;;;;;;;;;;;;"}
@@ -1,6 +1,9 @@
1
1
  import Foundation
2
2
  import Capacitor
3
3
  import SquareMobilePaymentsSDK
4
+ #if canImport(MockReaderUI)
5
+ import MockReaderUI
6
+ #endif
4
7
  import CoreLocation
5
8
  import CoreBluetooth
6
9
 
@@ -8,6 +11,9 @@ import CoreBluetooth
8
11
  private weak var plugin: SquareMobilePaymentsPlugin?
9
12
  private var pairingHandle: SquareMobilePaymentsSDK.PairingHandle?
10
13
  private var paymentHandle: SquareMobilePaymentsSDK.PaymentHandle?
14
+ #if canImport(MockReaderUI)
15
+ private var mockReaderUI: MockReaderUI?
16
+ #endif
11
17
  private var squareApplicationId: String?
12
18
  private var locationId: String?
13
19
  private var locationManager: CLLocationManager?
@@ -98,8 +104,11 @@ import CoreBluetooth
98
104
  return
99
105
  }
100
106
 
101
- MobilePaymentsSDK.shared.settingsManager.presentSettings(with: viewController) { error in
102
- completion(error)
107
+ // Present settings - MUST be called on main thread for UI presentation
108
+ DispatchQueue.main.async {
109
+ MobilePaymentsSDK.shared.settingsManager.presentSettings(with: viewController) { error in
110
+ completion(error)
111
+ }
103
112
  }
104
113
  }
105
114
 
@@ -263,15 +272,16 @@ import CoreBluetooth
263
272
  additionalMethods: additionalMethods
264
273
  )
265
274
 
266
- // Start payment
267
- paymentHandle = MobilePaymentsSDK.shared.paymentManager.startPayment(
268
- paymentParams,
269
- promptParameters: squarePromptParams,
270
- from: viewController,
271
- delegate: self
272
- )
273
-
274
- completion(nil)
275
+ // Start payment - MUST be called on main thread for UI presentation
276
+ DispatchQueue.main.async {
277
+ self.paymentHandle = MobilePaymentsSDK.shared.paymentManager.startPayment(
278
+ paymentParams,
279
+ promptParameters: squarePromptParams,
280
+ from: viewController,
281
+ delegate: self
282
+ )
283
+ completion(nil)
284
+ }
275
285
  }
276
286
 
277
287
  @objc public func cancelPayment(completion: @escaping (_ error: Error?) -> Void) throws {
@@ -303,6 +313,51 @@ import CoreBluetooth
303
313
  completion(result, nil)
304
314
  }
305
315
 
316
+ @objc public func showMockReader(completion: @escaping (_ error: Error?) -> Void) throws {
317
+ #if canImport(MockReaderUI)
318
+ guard locationId != nil else {
319
+ throw CustomError.notInitialized
320
+ }
321
+ guard MobilePaymentsSDK.shared.authorizationManager.state == .authorized else {
322
+ throw CustomError.notAuthorized
323
+ }
324
+
325
+ // Initialize Mock Reader UI if not already created
326
+ if mockReaderUI == nil {
327
+ do {
328
+ mockReaderUI = try MockReaderUI(for: MobilePaymentsSDK.shared)
329
+ } catch {
330
+ completion(error)
331
+ return
332
+ }
333
+ }
334
+
335
+ // Present the mock reader UI on main thread
336
+ DispatchQueue.main.async {
337
+ do {
338
+ try self.mockReaderUI?.present()
339
+ completion(nil)
340
+ } catch {
341
+ completion(error)
342
+ }
343
+ }
344
+ #else
345
+ completion(NSError(domain: "SquareMobilePayments", code: -1, userInfo: [NSLocalizedDescriptionKey: "MockReaderUI is only available when using Swift Package Manager. Please use Swift Package Manager instead of CocoaPods to access this feature."]))
346
+ #endif
347
+ }
348
+
349
+ @objc public func hideMockReader(completion: @escaping (_ error: Error?) -> Void) throws {
350
+ #if canImport(MockReaderUI)
351
+ // Dismiss the mock reader UI on main thread
352
+ DispatchQueue.main.async {
353
+ self.mockReaderUI?.dismiss()
354
+ completion(nil)
355
+ }
356
+ #else
357
+ completion(NSError(domain: "SquareMobilePayments", code: -1, userInfo: [NSLocalizedDescriptionKey: "MockReaderUI is only available when using Swift Package Manager. Please use Swift Package Manager instead of CocoaPods to access this feature."]))
358
+ #endif
359
+ }
360
+
306
361
  // MARK: - Helper Methods
307
362
 
308
363
  private func convertSdkReaderToReaderInfo(_ sdkReader: SquareMobilePaymentsSDK.ReaderInfo) -> ReaderInfo {
@@ -17,6 +17,8 @@ public class SquareMobilePaymentsPlugin: CAPPlugin, CAPBridgedPlugin {
17
17
  CAPPluginMethod(name: "isAuthorized", returnType: CAPPluginReturnPromise),
18
18
  CAPPluginMethod(name: "deauthorize", returnType: CAPPluginReturnPromise),
19
19
  CAPPluginMethod(name: "showSettings", returnType: CAPPluginReturnPromise),
20
+ CAPPluginMethod(name: "showMockReader", returnType: CAPPluginReturnPromise),
21
+ CAPPluginMethod(name: "hideMockReader", returnType: CAPPluginReturnPromise),
20
22
  CAPPluginMethod(name: "getSettings", returnType: CAPPluginReturnPromise),
21
23
  CAPPluginMethod(name: "startPairing", returnType: CAPPluginReturnPromise),
22
24
  CAPPluginMethod(name: "stopPairing", returnType: CAPPluginReturnPromise),
@@ -114,6 +116,34 @@ public class SquareMobilePaymentsPlugin: CAPPlugin, CAPBridgedPlugin {
114
116
  }
115
117
  }
116
118
 
119
+ @objc func showMockReader(_ call: CAPPluginCall) {
120
+ do {
121
+ try implementation?.showMockReader(completion: { error in
122
+ if let error = error {
123
+ self.rejectCall(call, error)
124
+ } else {
125
+ self.resolveCall(call)
126
+ }
127
+ })
128
+ } catch {
129
+ rejectCall(call, error)
130
+ }
131
+ }
132
+
133
+ @objc func hideMockReader(_ call: CAPPluginCall) {
134
+ do {
135
+ try implementation?.hideMockReader(completion: { error in
136
+ if let error = error {
137
+ self.rejectCall(call, error)
138
+ } else {
139
+ self.resolveCall(call)
140
+ }
141
+ })
142
+ } catch {
143
+ rejectCall(call, error)
144
+ }
145
+ }
146
+
117
147
  @objc func getSettings(_ call: CAPPluginCall) {
118
148
  do {
119
149
  try implementation?.getSettings(completion: { result, error in
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capawesome/capacitor-square-mobile-payments",
3
- "version": "0.0.1",
3
+ "version": "0.1.0-dev.8f3159be.1767704525",
4
4
  "description": "Unofficial Capacitor plugin for Square Mobile Payments SDK.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",