@connexup/react-native-square-mobile-payment-sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/NativeSquareMobilePaymentSDK.podspec +23 -0
- package/README.md +66 -0
- package/android/build.gradle +81 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/DateFormatUtils.java +29 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/ErrorUtilities.kt +56 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/MobilePaymentAuthorization.kt +185 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/MobilePaymentException.kt +8 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/MobilePaymentPayment.kt +542 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/MobilePaymentReader.kt +344 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/MobilePaymentSDK.kt +47 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/MobilePaymentSDKPackage.kt +77 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/MobilePaymentSetting.kt +144 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/AdditionalPaymentMethodConvert.kt +46 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/AuthorizationStateConvert.kt +26 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/CardConvert.kt +53 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/CardDetailsConvert.kt +74 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/CardEntryMethodConvert.kt +31 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/CashPaymentDetailsConvert.kt +18 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/CurrencyCodeConvert.kt +204 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/DelayActionConvert.kt +33 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/DeniedReasonConvert.kt +28 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/DigitalWalletDetailsConvert.kt +18 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/ErrorDetailsConvert.kt +32 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/ExternalPaymentDetailsConvert.kt +25 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/LocationConvert.kt +31 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/MoneyConvert.kt +31 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/OfflineStatusConvert.kt +21 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/PaymentConvert.kt +93 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/PaymentProcessingFeeConvert.kt +39 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/PaymentSettingsConvert.kt +26 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/ProcessingModeConvert.kt +28 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/ReaderBatteryStatusConvert.kt +19 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/ReaderChangeEventConvert.kt +75 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/ReaderConnectionTypeConvert.kt +17 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/ReaderInfoConvert.kt +51 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/ReaderModalConvert.kt +18 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/ReaderStateConvert.kt +51 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/ReaderStatusConvert.kt +51 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/SdkSettingsConvert.kt +30 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/SquareAccountDetailsConvert.kt +20 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/TrackingConsentStateConvert.kt +17 -0
- package/android/src/main/java/com/connexup/square/mobilepayment/convert/WalletBrandConvert.kt +41 -0
- package/ios/Converters/AdditionalPaymentMethod+Extension.swift +17 -0
- package/ios/Converters/AdditionalPaymentMethodType+Extension.swift +44 -0
- package/ios/Converters/AuthorizationState+Extension.swift +22 -0
- package/ios/Converters/BatteryLevel+Extension.swift +27 -0
- package/ios/Converters/Card+Extension.swift +33 -0
- package/ios/Converters/CardBrand+Extension.swift +47 -0
- package/ios/Converters/CardCoBrand+Extension.swift +24 -0
- package/ios/Converters/CardEntryMethod+Extension.swift +30 -0
- package/ios/Converters/CardInputMethods+Extension.swift +35 -0
- package/ios/Converters/CardInsertionStatus+Extension.swift +24 -0
- package/ios/Converters/CardPaymentDetails+Extensions.swift +31 -0
- package/ios/Converters/CardPaymentStatus+Extension.swift +28 -0
- package/ios/Converters/Currency+Extension.swift +50 -0
- package/ios/Converters/Location+Extension.swift +19 -0
- package/ios/Converters/MoneyAmount+Extension.swift +30 -0
- package/ios/Converters/Payment+Extension.swift +44 -0
- package/ios/Converters/PaymentSettings+Extension.swift +19 -0
- package/ios/Converters/PaymentStatus+Extension.swift +53 -0
- package/ios/Converters/ProcessingMode+Extension.swift +37 -0
- package/ios/Converters/ReaderBatteryStatus+Extension.swift +19 -0
- package/ios/Converters/ReaderChange+Extension.swift +41 -0
- package/ios/Converters/ReaderConnectionFailureInfo+Extension.swift +20 -0
- package/ios/Converters/ReaderConnectionFailureReason+Extension.swift +40 -0
- package/ios/Converters/ReaderConnectionFailureRecoverySuggestion+Extension.swift +30 -0
- package/ios/Converters/ReaderConnectionInfo+Extension.swift +18 -0
- package/ios/Converters/ReaderConnectionStatus+Extension.swift +26 -0
- package/ios/Converters/ReaderFirmwareInfo+Extension.swift +19 -0
- package/ios/Converters/ReaderInfo+Extension.swift +30 -0
- package/ios/Converters/ReaderModel+Extension.swift +28 -0
- package/ios/Converters/ReaderState+Extension.swift +30 -0
- package/ios/Converters/ReaderStatus+Extension.swift +60 -0
- package/ios/Converters/ReaderStatusInfo+Extension.swift +22 -0
- package/ios/Converters/SDKSettings+Extension.swift +25 -0
- package/ios/Converters/SourceType+Extension.swift +32 -0
- package/ios/Converters/TrackingConsentState+Extension.swift +25 -0
- package/ios/ErrorUtilities.swift +41 -0
- package/ios/MobilePaymentAuthorization.swift +154 -0
- package/ios/MobilePaymentDateFormatter.swift +15 -0
- package/ios/MobilePaymentPayment.swift +478 -0
- package/ios/MobilePaymentReader.swift +248 -0
- package/ios/MobilePaymentSDK.swift +36 -0
- package/ios/MobilePaymentSetting.swift +86 -0
- package/ios/MockReaderUIManage.swift +52 -0
- package/ios/Models/NativeErrorInfo.swift +22 -0
- package/ios/Models/RCTPaymentMoneyParameter.swift +20 -0
- package/ios/Models/RCTPaymentParameters.swift +50 -0
- package/ios/Models/RCTPromptParameters.swift +20 -0
- package/ios/NotificationKeys.swift +9 -0
- package/ios/NotificationUtils.swift +21 -0
- package/ios/RCTMobilePaymentAuthorization.h +12 -0
- package/ios/RCTMobilePaymentAuthorization.mm +78 -0
- package/ios/RCTMobilePaymentPayment.h +12 -0
- package/ios/RCTMobilePaymentPayment.mm +116 -0
- package/ios/RCTMobilePaymentReader.h +12 -0
- package/ios/RCTMobilePaymentReader.mm +114 -0
- package/ios/RCTMobilePaymentSetting.h +10 -0
- package/ios/RCTMobilePaymentSetting.mm +94 -0
- package/ios/UIColor+Extension.swift +81 -0
- package/lib/module/authorization/NativeMobilePaymentAuthorization.js +60 -0
- package/lib/module/authorization/NativeMobilePaymentAuthorization.js.map +1 -0
- package/lib/module/authorization/index.js +44 -0
- package/lib/module/authorization/index.js.map +1 -0
- package/lib/module/index.js +7 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/payment/NativeMobilePaymentPayment.js +138 -0
- package/lib/module/payment/NativeMobilePaymentPayment.js.map +1 -0
- package/lib/module/payment/index.js +113 -0
- package/lib/module/payment/index.js.map +1 -0
- package/lib/module/reader/NativeMobilePaymentReader.js +151 -0
- package/lib/module/reader/NativeMobilePaymentReader.js.map +1 -0
- package/lib/module/reader/index.js +109 -0
- package/lib/module/reader/index.js.map +1 -0
- package/lib/module/setting/NativeMobilePaymentSetting.js +5 -0
- package/lib/module/setting/NativeMobilePaymentSetting.js.map +1 -0
- package/lib/module/setting/index.js +74 -0
- package/lib/module/setting/index.js.map +1 -0
- package/lib/module/type.js +27 -0
- package/lib/module/type.js.map +1 -0
- package/lib/module/util.js +32 -0
- package/lib/module/util.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/authorization/NativeMobilePaymentAuthorization.d.ts +82 -0
- package/lib/typescript/src/authorization/NativeMobilePaymentAuthorization.d.ts.map +1 -0
- package/lib/typescript/src/authorization/index.d.ts +14 -0
- package/lib/typescript/src/authorization/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +5 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/payment/NativeMobilePaymentPayment.d.ts +725 -0
- package/lib/typescript/src/payment/NativeMobilePaymentPayment.d.ts.map +1 -0
- package/lib/typescript/src/payment/index.d.ts +13 -0
- package/lib/typescript/src/payment/index.d.ts.map +1 -0
- package/lib/typescript/src/reader/NativeMobilePaymentReader.d.ts +318 -0
- package/lib/typescript/src/reader/NativeMobilePaymentReader.d.ts.map +1 -0
- package/lib/typescript/src/reader/index.d.ts +19 -0
- package/lib/typescript/src/reader/index.d.ts.map +1 -0
- package/lib/typescript/src/setting/NativeMobilePaymentSetting.d.ts +49 -0
- package/lib/typescript/src/setting/NativeMobilePaymentSetting.d.ts.map +1 -0
- package/lib/typescript/src/setting/index.d.ts +17 -0
- package/lib/typescript/src/setting/index.d.ts.map +1 -0
- package/lib/typescript/src/type.d.ts +23 -0
- package/lib/typescript/src/type.d.ts.map +1 -0
- package/lib/typescript/src/util.d.ts +3 -0
- package/lib/typescript/src/util.d.ts.map +1 -0
- package/package.json +178 -0
- package/src/authorization/NativeMobilePaymentAuthorization.ts +297 -0
- package/src/authorization/index.ts +60 -0
- package/src/index.ts +4 -0
- package/src/payment/NativeMobilePaymentPayment.ts +1220 -0
- package/src/payment/index.ts +161 -0
- package/src/reader/NativeMobilePaymentReader.ts +463 -0
- package/src/reader/index.ts +140 -0
- package/src/setting/NativeMobilePaymentSetting.ts +254 -0
- package/src/setting/index.ts +91 -0
- package/src/type.ts +35 -0
- package/src/util.ts +31 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
#import "RCTMobilePaymentPayment.h"
|
|
2
|
+
#import "NativeSquareMobilePaymentSDK-Swift.h"
|
|
3
|
+
|
|
4
|
+
@interface RCTMobilePaymentPayment () <RCTMobilePaymentPaymentEventEmitter>
|
|
5
|
+
@end
|
|
6
|
+
|
|
7
|
+
@implementation RCTMobilePaymentPayment {
|
|
8
|
+
MobilePaymentPayment* payment;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
- (id) init {
|
|
12
|
+
if (self = [super init]) {
|
|
13
|
+
payment = [MobilePaymentPayment new];
|
|
14
|
+
payment.emitter = self;
|
|
15
|
+
}
|
|
16
|
+
return self;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
- (void)dealloc {
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
- (void)initialize {
|
|
24
|
+
[payment initialize];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
- (void)invalidate {
|
|
28
|
+
[payment invalidate];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
- (nonnull NSArray<NSDictionary *> *)additionalPaymentMethods {
|
|
32
|
+
return [payment additionalPaymentMethods];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
- (nonnull NSArray<NSString *> *)availableCardInputMethods {
|
|
36
|
+
return [payment availableCardInputMethods];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
- (void)cancelCurrentPayment:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
40
|
+
[payment cancelCurrentPaymentWithResolve:^(BOOL value) {
|
|
41
|
+
resolve(@(value));
|
|
42
|
+
} reject:^(NativeErrorInfo * _Nonnull errorInfo) {
|
|
43
|
+
reject(errorInfo.code, errorInfo.message, errorInfo.error);
|
|
44
|
+
}];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
- (NSDictionary * _Nullable)currentPayment {
|
|
48
|
+
return [payment currentPayment];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
- (nonnull NSNumber *)isCurrentPaymentCancelable {
|
|
52
|
+
return @([payment isCurrentPaymentCancelable]);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
- (void)startPayment:(JS::NativeMobilePaymentPayment::PaymentParameters &)paymentParameters promptParameters:(JS::NativeMobilePaymentPayment::PromptParameters &)promptParameters resolve:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
56
|
+
NSNumber* acceptPartialAuthorization =paymentParameters.acceptPartialAuthorization().has_value()? @(paymentParameters.acceptPartialAuthorization().value()) : nil;
|
|
57
|
+
NSNumber* autocomplete =paymentParameters.autocomplete().has_value()? @(paymentParameters.autocomplete().value()) : nil;
|
|
58
|
+
NSNumber* delayDuration =paymentParameters.delayDuration().has_value()? @(paymentParameters.delayDuration().value()) : nil;
|
|
59
|
+
RCTPaymentMoneyParameter *amountMoney = [[RCTPaymentMoneyParameter alloc] initWithAmount:paymentParameters.amountMoney().amount() currency:paymentParameters.amountMoney().currency()];
|
|
60
|
+
RCTPaymentMoneyParameter *tipMoney = nil;
|
|
61
|
+
RCTPaymentMoneyParameter *appFeeMoney = nil;
|
|
62
|
+
if (paymentParameters.tipMoney().has_value()) {
|
|
63
|
+
tipMoney = [[RCTPaymentMoneyParameter alloc] initWithAmount:paymentParameters.tipMoney().value().amount() currency:paymentParameters.tipMoney().value().currency()];
|
|
64
|
+
}
|
|
65
|
+
if (paymentParameters.appFeeMoney().has_value()) {
|
|
66
|
+
appFeeMoney = [[RCTPaymentMoneyParameter alloc] initWithAmount:paymentParameters.appFeeMoney().value().amount() currency:paymentParameters.appFeeMoney().value().currency()];
|
|
67
|
+
}
|
|
68
|
+
RCTPaymentParameters* _paymentParameters = [[RCTPaymentParameters alloc] initWithAllowCardSurcharge:paymentParameters.allowCardSurcharge() paymentAttemptId:paymentParameters.paymentAttemptId() acceptPartialAuthorization:acceptPartialAuthorization autocomplete:autocomplete delayAction:paymentParameters.delayAction() delayDuration:delayDuration amountMoney:amountMoney tipMoney:tipMoney appFeeMoney:appFeeMoney locationID:paymentParameters.locationID() orderID:paymentParameters.orderID() referenceID:paymentParameters.referenceID() customerID:paymentParameters.customerID() teamMemberID:paymentParameters.teamMemberID() note:paymentParameters.note() statementDescriptionIdentifier:paymentParameters.statementDescriptionIdentifier() processingMode:paymentParameters.processingMode()];
|
|
69
|
+
RCTPromptParameters* _promptParameters = [[RCTPromptParameters alloc] initWithMode:promptParameters.mode() additionalMethods:promptParameters.additionalMethods()];
|
|
70
|
+
[payment startPaymentWithPaymentParameters:_paymentParameters promptParameters:_promptParameters completion:^(NativeErrorInfo * _Nullable errorInfo) {
|
|
71
|
+
if (errorInfo) {
|
|
72
|
+
reject(errorInfo.code, errorInfo.message, errorInfo.error);
|
|
73
|
+
}else{
|
|
74
|
+
resolve(nil);
|
|
75
|
+
}
|
|
76
|
+
}];
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
- (void)triggerPaymentWithAdditionalPaymentMethod:(nonnull NSDictionary *)paymentSource resolve:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
80
|
+
[payment triggerPaymentWithAdditionalPaymentMethod:paymentSource completion:^(NativeErrorInfo * _Nullable errorInfo) {
|
|
81
|
+
if (errorInfo) {
|
|
82
|
+
reject(errorInfo.code, errorInfo.message, errorInfo.error);
|
|
83
|
+
}else{
|
|
84
|
+
resolve(nil);
|
|
85
|
+
}
|
|
86
|
+
}];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
- (void)onAvailableCardInputMethodsChange:(NSArray<NSString *> * _Nonnull)value {
|
|
90
|
+
try {
|
|
91
|
+
[self emitOnAvailableCardInputMethodsChange:value];
|
|
92
|
+
} catch (const std::bad_function_call &e) {
|
|
93
|
+
NSLog(@"[MobilePayment] std::bad_function_call in emitOnAvailableCardInputMethodsChange: %s", e.what());
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
- (void)onPaymentFlowStatusChange:(NSDictionary<NSString *,id> * _Nonnull)value {
|
|
98
|
+
try {
|
|
99
|
+
[self emitOnPaymentFlowStatusChange:value];
|
|
100
|
+
} catch (const std::bad_function_call &e) {
|
|
101
|
+
NSLog(@"[MobilePayment] std::bad_function_call in emitOnPaymentFlowStatusChange: %s", e.what());
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
|
106
|
+
(const facebook::react::ObjCTurboModule::InitParams &)params
|
|
107
|
+
{
|
|
108
|
+
return std::make_shared<facebook::react::NativeMobilePaymentPaymentSpecJSI>(params);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
+ (NSString *)moduleName
|
|
112
|
+
{
|
|
113
|
+
return @"NativeMobilePaymentPayment";
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
#import <NativeSquareMobilePaymentSDKSpec/NativeSquareMobilePaymentSDKSpec.h>
|
|
3
|
+
#import <React/RCTInitializing.h>
|
|
4
|
+
#import <React/RCTInvalidating.h>
|
|
5
|
+
|
|
6
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
7
|
+
|
|
8
|
+
@interface RCTMobilePaymentReader : NativeMobilePaymentReaderSpecBase <NativeMobilePaymentReaderSpec, RCTInitializing, RCTInvalidating>
|
|
9
|
+
|
|
10
|
+
@end
|
|
11
|
+
|
|
12
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
#import "RCTMobilePaymentReader.h"
|
|
2
|
+
#import "NativeSquareMobilePaymentSDK-Swift.h"
|
|
3
|
+
|
|
4
|
+
@interface RCTMobilePaymentReader () <RCTMobilePaymentReaderEventEmitter>
|
|
5
|
+
@end
|
|
6
|
+
|
|
7
|
+
@implementation RCTMobilePaymentReader {
|
|
8
|
+
MobilePaymentReader* reader;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
- (id) init {
|
|
12
|
+
if (self = [super init]) {
|
|
13
|
+
reader = [MobilePaymentReader new];
|
|
14
|
+
reader.emitter = self;
|
|
15
|
+
}
|
|
16
|
+
return self;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
- (void)dealloc {
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
- (void)initialize {
|
|
24
|
+
[reader initialize];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
- (void)invalidate {
|
|
28
|
+
[reader invalidate];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
- (void)bink:(nonnull NSString *)readerId resolve:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
32
|
+
[reader binkWithReaderId:readerId completion:^(NativeErrorInfo * _Nullable errorInfo) {
|
|
33
|
+
if (errorInfo) {
|
|
34
|
+
reject(errorInfo.code, errorInfo.message, errorInfo.error);
|
|
35
|
+
}else {
|
|
36
|
+
resolve(nil);
|
|
37
|
+
}
|
|
38
|
+
}];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
- (void)forget:(nonnull NSString *)readerId resolve:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
42
|
+
[reader forgetWithReaderId:readerId completion:^(NativeErrorInfo * _Nullable errorInfo) {
|
|
43
|
+
if (errorInfo) {
|
|
44
|
+
reject(errorInfo.code, errorInfo.message, errorInfo.error);
|
|
45
|
+
}else {
|
|
46
|
+
resolve(nil);
|
|
47
|
+
}
|
|
48
|
+
}];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
- (nonnull NSNumber *)isPairingInProgress {
|
|
52
|
+
return @([reader isPairingInProgress]);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
- (nonnull NSArray<NSDictionary *> *)readers {
|
|
56
|
+
return [reader readers];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
- (void)retryConnection:(nonnull NSString *)readerId resolve:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
60
|
+
[reader retryConnectionWithReaderId:readerId completion:^(NativeErrorInfo * _Nullable errorInfo) {
|
|
61
|
+
if (errorInfo) {
|
|
62
|
+
reject(errorInfo.code, errorInfo.message, errorInfo.error);
|
|
63
|
+
}else {
|
|
64
|
+
resolve(nil);
|
|
65
|
+
}
|
|
66
|
+
}];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
- (void)startPairing:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
70
|
+
[reader startPairingWithCompletion:^(NativeErrorInfo * _Nullable errorInfo) {
|
|
71
|
+
if (errorInfo) {
|
|
72
|
+
reject(errorInfo.code, errorInfo.message, errorInfo.error);
|
|
73
|
+
}else {
|
|
74
|
+
resolve(nil);
|
|
75
|
+
}
|
|
76
|
+
}];
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
- (void)stopPairing:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
80
|
+
[reader stopPairingWithResolve:^(BOOL value) {
|
|
81
|
+
resolve(@(value));
|
|
82
|
+
} reject:^(NativeErrorInfo * _Nonnull errorInfo) {
|
|
83
|
+
reject(errorInfo.code, errorInfo.message, errorInfo.error);
|
|
84
|
+
}];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
- (void)onReaderChange:(NSDictionary<NSString *,id> * _Nonnull)value {
|
|
88
|
+
try {
|
|
89
|
+
[self emitOnReaderChange:value];
|
|
90
|
+
} catch (const std::bad_function_call &e) {
|
|
91
|
+
NSLog(@"[MobilePayment] std::bad_function_call in emitOnReaderChange: %s", e.what());
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
- (void)onReaderPairingStatusChange:(NSDictionary<NSString *,id> * _Nonnull)value {
|
|
96
|
+
try {
|
|
97
|
+
[self emitOnReaderPairingStatus:value];
|
|
98
|
+
} catch (const std::bad_function_call &e) {
|
|
99
|
+
NSLog(@"[MobilePayment] std::bad_function_call in emitOnReaderPairingStatus: %s", e.what());
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
|
104
|
+
(const facebook::react::ObjCTurboModule::InitParams &)params
|
|
105
|
+
{
|
|
106
|
+
return std::make_shared<facebook::react::NativeMobilePaymentReaderSpecJSI>(params);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
+ (NSString *)moduleName
|
|
110
|
+
{
|
|
111
|
+
return @"NativeMobilePaymentReader";
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
#import <NativeSquareMobilePaymentSDKSpec/NativeSquareMobilePaymentSDKSpec.h>
|
|
3
|
+
|
|
4
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
5
|
+
|
|
6
|
+
@interface RCTMobilePaymentSetting : NativeMobilePaymentSettingSpecBase <NativeMobilePaymentSettingSpec>
|
|
7
|
+
|
|
8
|
+
@end
|
|
9
|
+
|
|
10
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
#import "RCTMobilePaymentSetting.h"
|
|
2
|
+
#import "NativeSquareMobilePaymentSDK-Swift.h"
|
|
3
|
+
|
|
4
|
+
@implementation RCTMobilePaymentSetting{
|
|
5
|
+
MobilePaymentSetting* setting;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
- (id) init {
|
|
9
|
+
if (self = [super init]) {
|
|
10
|
+
setting = [MobilePaymentSetting new];
|
|
11
|
+
}
|
|
12
|
+
return self;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
- (void)dealloc {
|
|
16
|
+
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
- (NSString * _Nullable)applicationId {
|
|
20
|
+
return [setting applicationId];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
- (void)dismissMockReaderUI:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
24
|
+
return [setting dismissMockReaderUIWithCompletion:^(NativeErrorInfo * _Nullable errorInfo) {
|
|
25
|
+
if (errorInfo) {
|
|
26
|
+
reject(errorInfo.code, errorInfo.message, errorInfo.error);
|
|
27
|
+
}else{
|
|
28
|
+
resolve(nil);
|
|
29
|
+
}
|
|
30
|
+
}];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
- (void)initialize:(nonnull NSString *)applicationId resolve:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
34
|
+
return [setting initializeWithApplicationId:applicationId resolve:^(BOOL value) {
|
|
35
|
+
resolve(@(value));
|
|
36
|
+
} reject:^(NativeErrorInfo * _Nonnull errorInfo) {
|
|
37
|
+
reject(errorInfo.code, errorInfo.message, errorInfo.error);
|
|
38
|
+
}];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
- (nonnull NSDictionary *)paymentSettings {
|
|
42
|
+
return [setting paymentSettings];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
- (void)presentMockReaderUI:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
46
|
+
return [setting presentMockReaderUIWithCompletion:^(NativeErrorInfo * _Nullable errorInfo) {
|
|
47
|
+
if (errorInfo) {
|
|
48
|
+
reject(errorInfo.code, errorInfo.message, errorInfo.error);
|
|
49
|
+
}else{
|
|
50
|
+
resolve(nil);
|
|
51
|
+
}
|
|
52
|
+
}];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
- (void)presentSettings:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
56
|
+
return [setting presentSettingsWithCompletion:^(NativeErrorInfo * _Nullable errorInfo) {
|
|
57
|
+
if (errorInfo) {
|
|
58
|
+
reject(errorInfo.code, errorInfo.message, errorInfo.error);
|
|
59
|
+
}else{
|
|
60
|
+
resolve(nil);
|
|
61
|
+
}
|
|
62
|
+
}];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
- (nonnull NSDictionary *)sdkSettings {
|
|
66
|
+
return [setting sdkSettings];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
- (nonnull NSString *)trackingConsentState {
|
|
70
|
+
return [setting trackingConsentState];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
- (void)updateTrackingConsent:(BOOL)granted resolve:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
74
|
+
return [setting updateTrackingConsentWithGranted:granted completion:^(NativeErrorInfo * _Nullable errorInfo) {
|
|
75
|
+
if (errorInfo) {
|
|
76
|
+
reject(errorInfo.code, errorInfo.message, errorInfo.error);
|
|
77
|
+
}else{
|
|
78
|
+
resolve(nil);
|
|
79
|
+
}
|
|
80
|
+
}];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
|
84
|
+
(const facebook::react::ObjCTurboModule::InitParams &)params
|
|
85
|
+
{
|
|
86
|
+
return std::make_shared<facebook::react::NativeMobilePaymentSettingSpecJSI>(params);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
+ (NSString *)moduleName
|
|
90
|
+
{
|
|
91
|
+
return @"NativeMobilePaymentSetting";
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@end
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
//
|
|
2
|
+
// UIColor+Extension.swift
|
|
3
|
+
//
|
|
4
|
+
// Created by chancetio on 2023/9/13.
|
|
5
|
+
//
|
|
6
|
+
|
|
7
|
+
import Foundation
|
|
8
|
+
|
|
9
|
+
extension UIColor {
|
|
10
|
+
func dimmed(_ amount: CGFloat = 0.05) -> UIColor {
|
|
11
|
+
let dimmedColor: () -> UIColor = {
|
|
12
|
+
UIColor(
|
|
13
|
+
hue: self.hsba.hue,
|
|
14
|
+
saturation: self.hsba.saturation,
|
|
15
|
+
brightness: min(1.0, self.hsba.brightness - amount),
|
|
16
|
+
alpha: 1.0
|
|
17
|
+
)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return UIColor { _ -> UIColor in
|
|
21
|
+
dimmedColor()
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
func brightened(_ amount: CGFloat = 0.05) -> UIColor {
|
|
26
|
+
let brightenedColor: () -> UIColor = {
|
|
27
|
+
UIColor(
|
|
28
|
+
hue: self.hsba.hue,
|
|
29
|
+
saturation: self.hsba.saturation,
|
|
30
|
+
brightness: max(0.0, self.hsba.brightness + amount),
|
|
31
|
+
alpha: 1.0
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return UIColor { _ -> UIColor in
|
|
36
|
+
brightenedColor()
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// MARK: Constructors
|
|
41
|
+
|
|
42
|
+
@objc convenience init(fromHex hexString: String) {
|
|
43
|
+
let hex = hexString.trimmingCharacters(in: CharacterSet.alphanumerics.inverted)
|
|
44
|
+
let int = UInt32(hex, radix: 16)
|
|
45
|
+
let r, g, b, a: UInt32
|
|
46
|
+
if let int = int {
|
|
47
|
+
switch hex.count {
|
|
48
|
+
case 3: // RGB (12-bit)
|
|
49
|
+
(r, g, b, a) = ((int >> 8) * 17, (int >> 4 & 0xF) * 17, (int & 0xF) * 17, 255)
|
|
50
|
+
case 6: // RGB (24-bit)
|
|
51
|
+
(r, g, b, a) = (int >> 16, int >> 8 & 0xFF, int & 0xFF, 255)
|
|
52
|
+
case 8: // RGBA (32-bit)
|
|
53
|
+
(r, g, b, a) = (int >> 24, int >> 16 & 0xFF, int >> 8 & 0xFF, int & 0xFF)
|
|
54
|
+
default:
|
|
55
|
+
(r, g, b, a) = (1, 1, 1, 0)
|
|
56
|
+
}
|
|
57
|
+
} else {
|
|
58
|
+
(r, g, b, a) = (1, 1, 1, 0)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
self.init(CGFloat(r), CGFloat(g), CGFloat(b), CGFloat(a))
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
convenience init(_ red: CGFloat, _ green: CGFloat, _ blue: CGFloat, _ alpha: CGFloat = 1.0) {
|
|
65
|
+
self.init(red: red / 255.0, green: green / 255.0, blue: blue / 255.0, alpha: alpha)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// MARK: Values
|
|
69
|
+
|
|
70
|
+
var hsba: (hue: CGFloat, saturation: CGFloat, brightness: CGFloat, alpha: CGFloat) {
|
|
71
|
+
var hsba: (hue: CGFloat, saturation: CGFloat, brightness: CGFloat, alpha: CGFloat) = (0, 0, 0, 0)
|
|
72
|
+
self.getHue(&hsba.hue, saturation: &hsba.saturation, brightness: &hsba.brightness, alpha: &hsba.alpha)
|
|
73
|
+
return hsba
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
var rgba: (red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat) {
|
|
77
|
+
var rgba: (red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat) = (0, 0, 0, 0)
|
|
78
|
+
self.getRed(&rgba.red, green: &rgba.green, blue: &rgba.blue, alpha: &rgba.alpha)
|
|
79
|
+
return rgba
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { TurboModuleRegistry } from 'react-native';
|
|
4
|
+
export const NativeMobilePaymentAuthorization = TurboModuleRegistry.getEnforcing('NativeMobilePaymentAuthorization');
|
|
5
|
+
export const AuthorizationErrorNoNetwork = 'AUTHORIZATION_ERROR_NO_NETWORK';
|
|
6
|
+
/**
|
|
7
|
+
* Device is already authorized with a Square account.
|
|
8
|
+
*/
|
|
9
|
+
export const AuthorizationErrorAlreadyAuthorized = 'AUTHORIZATION_ERROR_ALREADY_AUTHORIZED';
|
|
10
|
+
/**
|
|
11
|
+
* An unexpected error occurred. See the debug code and message for more information.
|
|
12
|
+
*/
|
|
13
|
+
export const AuthorizationErrorAlreadyInProgress = 'AUTHORIZATION_ERROR_ALREADY_IN_PROGRESS';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Authorization code has already been redeemed.
|
|
17
|
+
*/
|
|
18
|
+
export const AuthorizationErrorAuthorizationCodeAlreadyRedeemed = 'AUTHORIZATION_ERROR_AUTHORIZATION_CODE_ALREADY_REDEEMED';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Authorization code has expired.
|
|
22
|
+
*/
|
|
23
|
+
export const AuthorizationErrorExpiredAuthorizationCode = 'AUTHORIZATION_ERROR_EXPIRED_AUTHORIZATION_CODE';
|
|
24
|
+
/**
|
|
25
|
+
* Authorization code is invalid.
|
|
26
|
+
*/
|
|
27
|
+
export const AuthorizationErrorInvalidAuthorizationCode = 'AUTHORIZATION_ERROR_INVALID_AUTHORIZATION_CODE';
|
|
28
|
+
/**
|
|
29
|
+
* Access token is invalid.
|
|
30
|
+
*/
|
|
31
|
+
export const AuthorizationErrorInvalidAccessToken = 'AUTHORIZATION_ERROR_INVALID_ACCESS_TOKEN';
|
|
32
|
+
/**
|
|
33
|
+
* Access code is empty.
|
|
34
|
+
*/
|
|
35
|
+
export const AuthorizationErrorEmptyAccessToken = 'AUTHORIZATION_ERROR_EMPTY_ACCESS_TOKEN';
|
|
36
|
+
/**
|
|
37
|
+
* LocationID is invalid.
|
|
38
|
+
*/
|
|
39
|
+
export const AuthorizationErrorInvalidLocationID = 'AUTHORIZATION_ERROR_INVALID_LOCATION_ID';
|
|
40
|
+
/**
|
|
41
|
+
* Location is not authorized for card processing
|
|
42
|
+
*/
|
|
43
|
+
export const AuthorizationErrorLocationNotActivatedForCardProcessing = 'AUTHORIZATION_ERROR_LOCATION_NOT_ACTIVATED_FOR_CARD_PROCESSING';
|
|
44
|
+
/**
|
|
45
|
+
* LocationID is empty.
|
|
46
|
+
*/
|
|
47
|
+
export const AuthorizationErrorEmptyLocationID = 'AUTHORIZATION_ERROR_EMPTY_LOCATION_ID';
|
|
48
|
+
/**
|
|
49
|
+
* Country is not supported
|
|
50
|
+
*/
|
|
51
|
+
export const AuthorizationErrorUnsupportedCountry = 'AUTHORIZATION_ERROR_UNSUPPORTED_COUNTRY';
|
|
52
|
+
/**
|
|
53
|
+
* There is a discrepancy between the device time and the server time.
|
|
54
|
+
*/
|
|
55
|
+
export const AuthorizationErrorDeviceTimeDoesNotMatchServerTime = 'AUTHORIZATION_ERROR_DEVICE_TIME_DOES_NOT_MATCH_SERVER_TIME';
|
|
56
|
+
/**
|
|
57
|
+
* Unexpected authorization error.
|
|
58
|
+
*/
|
|
59
|
+
export const AuthorizationErrorUnexpected = 'AUTHORIZATION_ERROR_UNEXPECTED';
|
|
60
|
+
//# sourceMappingURL=NativeMobilePaymentAuthorization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","NativeMobilePaymentAuthorization","getEnforcing","AuthorizationErrorNoNetwork","AuthorizationErrorAlreadyAuthorized","AuthorizationErrorAlreadyInProgress","AuthorizationErrorAuthorizationCodeAlreadyRedeemed","AuthorizationErrorExpiredAuthorizationCode","AuthorizationErrorInvalidAuthorizationCode","AuthorizationErrorInvalidAccessToken","AuthorizationErrorEmptyAccessToken","AuthorizationErrorInvalidLocationID","AuthorizationErrorLocationNotActivatedForCardProcessing","AuthorizationErrorEmptyLocationID","AuthorizationErrorUnsupportedCountry","AuthorizationErrorDeviceTimeDoesNotMatchServerTime","AuthorizationErrorUnexpected"],"sourceRoot":"../../../src","sources":["authorization/NativeMobilePaymentAuthorization.ts"],"mappings":";;AAAA,SAGEA,mBAAmB,QACd,cAAc;AAsBrB,OAAO,MAAMC,gCAAgC,GAC3CD,mBAAmB,CAACE,YAAY,CAAO,kCAAkC,CAAC;AA2M5E,OAAO,MAAMC,2BAA2B,GAAG,gCAAgC;AAC3E;AACA;AACA;AACA,OAAO,MAAMC,mCAAmC,GAC9C,wCAAwC;AAC1C;AACA;AACA;AACA,OAAO,MAAMC,mCAAmC,GAC9C,yCAAyC;;AAE3C;AACA;AACA;AACA,OAAO,MAAMC,kDAAkD,GAC7D,yDAAyD;;AAE3D;AACA;AACA;AACA,OAAO,MAAMC,0CAA0C,GACrD,gDAAgD;AAClD;AACA;AACA;AACA,OAAO,MAAMC,0CAA0C,GACrD,gDAAgD;AAClD;AACA;AACA;AACA,OAAO,MAAMC,oCAAoC,GAC/C,0CAA0C;AAC5C;AACA;AACA;AACA,OAAO,MAAMC,kCAAkC,GAC7C,wCAAwC;AAC1C;AACA;AACA;AACA,OAAO,MAAMC,mCAAmC,GAC9C,yCAAyC;AAC3C;AACA;AACA;AACA,OAAO,MAAMC,uDAAuD,GAClE,gEAAgE;AAClE;AACA;AACA;AACA,OAAO,MAAMC,iCAAiC,GAC5C,uCAAuC;AACzC;AACA;AACA;AACA,OAAO,MAAMC,oCAAoC,GAC/C,yCAAyC;AAC3C;AACA;AACA;AACA,OAAO,MAAMC,kDAAkD,GAC7D,4DAA4D;AAC9D;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,gCAAgC","ignoreList":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createMobilePaymentError } from "../util.js";
|
|
4
|
+
import { NativeMobilePaymentAuthorization } from "./NativeMobilePaymentAuthorization.js";
|
|
5
|
+
class MobilePaymentAuthorization {
|
|
6
|
+
constructor(authorizationManage) {
|
|
7
|
+
this.authorizationManage = authorizationManage;
|
|
8
|
+
}
|
|
9
|
+
state() {
|
|
10
|
+
try {
|
|
11
|
+
return this.authorizationManage.state();
|
|
12
|
+
} catch (e) {
|
|
13
|
+
throw createMobilePaymentError(e);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
async authorize(accessToken, locationID) {
|
|
17
|
+
try {
|
|
18
|
+
return await this.authorizationManage.authorize(accessToken, locationID);
|
|
19
|
+
} catch (e) {
|
|
20
|
+
throw createMobilePaymentError(e);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
location() {
|
|
24
|
+
try {
|
|
25
|
+
return this.authorizationManage.location();
|
|
26
|
+
} catch (e) {
|
|
27
|
+
throw createMobilePaymentError(e);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
async deauthorize() {
|
|
31
|
+
try {
|
|
32
|
+
return await this.authorizationManage.deauthorize();
|
|
33
|
+
} catch (e) {
|
|
34
|
+
throw createMobilePaymentError(e);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
onAuthorizationStateChange(listener) {
|
|
38
|
+
return this.authorizationManage.onAuthorizationStateChange(payloads => {
|
|
39
|
+
listener(payloads);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export const mobilePaymentAuthorization = new MobilePaymentAuthorization(NativeMobilePaymentAuthorization);
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createMobilePaymentError","NativeMobilePaymentAuthorization","MobilePaymentAuthorization","constructor","authorizationManage","state","e","authorize","accessToken","locationID","location","deauthorize","onAuthorizationStateChange","listener","payloads","mobilePaymentAuthorization"],"sourceRoot":"../../../src","sources":["authorization/index.ts"],"mappings":";;AAAA,SAASA,wBAAwB,QAAQ,YAAS;AAClD,SACEC,gCAAgC,QAI3B,uCAAoC;AAG3C,MAAMC,0BAA0B,CAAuC;EAGrEC,WAAWA,CAACC,mBAAyB,EAAE;IACrC,IAAI,CAACA,mBAAmB,GAAGA,mBAAmB;EAChD;EAEAC,KAAKA,CAAA,EAAuB;IAC1B,IAAI;MACF,OAAO,IAAI,CAACD,mBAAmB,CAACC,KAAK,CAAC,CAAC;IACzC,CAAC,CAAC,OAAOC,CAAC,EAAE;MACV,MAAMN,wBAAwB,CAACM,CAAC,CAAC;IACnC;EACF;EAEA,MAAMC,SAASA,CAACC,WAAmB,EAAEC,UAAkB,EAAiB;IACtE,IAAI;MACF,OAAO,MAAM,IAAI,CAACL,mBAAmB,CAACG,SAAS,CAACC,WAAW,EAAEC,UAAU,CAAC;IAC1E,CAAC,CAAC,OAAOH,CAAC,EAAE;MACV,MAAMN,wBAAwB,CAACM,CAAC,CAAC;IACnC;EACF;EAEAI,QAAQA,CAAA,EAAoB;IAC1B,IAAI;MACF,OAAO,IAAI,CAACN,mBAAmB,CAACM,QAAQ,CAAC,CAAC;IAC5C,CAAC,CAAC,OAAOJ,CAAC,EAAE;MACV,MAAMN,wBAAwB,CAACM,CAAC,CAAC;IACnC;EACF;EAEA,MAAMK,WAAWA,CAAA,EAAkB;IACjC,IAAI;MACF,OAAO,MAAM,IAAI,CAACP,mBAAmB,CAACO,WAAW,CAAC,CAAC;IACrD,CAAC,CAAC,OAAOL,CAAC,EAAE;MACV,MAAMN,wBAAwB,CAACM,CAAC,CAAC;IACnC;EACF;EAEAM,0BAA0BA,CACxBC,QAA6C,EAC1B;IACnB,OAAO,IAAI,CAACT,mBAAmB,CAACQ,0BAA0B,CAAEE,QAAQ,IAAK;MACvED,QAAQ,CAACC,QAAQ,CAAC;IACpB,CAAC,CAAC;EACJ;AACF;AAEA,OAAO,MAAMC,0BAA0B,GAAG,IAAIb,0BAA0B,CACtED,gCACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export { mobilePaymentAuthorization as MobilePaymentAuthorization } from "./authorization/index.js";
|
|
4
|
+
export { mobilePaymentReader as MobilePaymentReader } from "./reader/index.js";
|
|
5
|
+
export { mobilePaymentPayment as MobilePaymentPayment } from "./payment/index.js";
|
|
6
|
+
export { mobilePaymentSetting as MobilePaymentSetting } from "./setting/index.js";
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["mobilePaymentAuthorization","MobilePaymentAuthorization","mobilePaymentReader","MobilePaymentReader","mobilePaymentPayment","MobilePaymentPayment","mobilePaymentSetting","MobilePaymentSetting"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,0BAA0B,IAAIC,0BAA0B,QAAQ,0BAAiB;AAC1F,SAASC,mBAAmB,IAAIC,mBAAmB,QAAQ,mBAAU;AACrE,SAASC,oBAAoB,IAAIC,oBAAoB,QAAQ,oBAAW;AACxE,SAASC,oBAAoB,IAAIC,oBAAoB,QAAQ,oBAAW","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|