@xbenjii/react-native-braintree-dropin-ui 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { NativeModules } from 'react-native';
2
-
3
- const { RNBraintreeDropIn } = NativeModules;
4
-
5
- export default RNBraintreeDropIn;
1
+ import { NativeModules } from 'react-native';
2
+
3
+ const { RNBraintreeDropIn } = NativeModules;
4
+
5
+ export default RNBraintreeDropIn;
package/index.js.flow CHANGED
@@ -1,42 +1,42 @@
1
- type ShowOptions = {|
2
- clientToken: string,
3
- threeDSecure?: {|
4
- amount: number,
5
- |},
6
- vaultManager?: boolean,
7
- cardDisabled?: boolean,
8
- googlePay?: boolean,
9
- orderTotal?: string,
10
- currencyCode?: string,
11
- googlePayMerchantId?: string,
12
- payPal?: boolean,
13
- applePay?: boolean,
14
- merchantIdentifier?: string,
15
- countryCode?: string,
16
- merchantName?: string,
17
- darkTheme?: boolean,
18
- fontFamily?: string,
19
- boldFontFamily?: string,
20
- |};
21
-
22
- type CardInfo = {|
23
- number: string,
24
- expirationMonth: string,
25
- expirationYear: string,
26
- cvv: string,
27
- postalCode: string,
28
- |};
29
-
30
- type ShowResult = {|
31
- nonce: string,
32
- description: string,
33
- type: string,
34
- isDefault: boolean,
35
- deviceData: string,
36
- |};
37
-
38
- declare module.exports: {
39
- show: (options: ShowOptions) => Promise<ShowResult>,
40
- fetchMostRecentPaymentMethod: (clientToken: string) => Promise<ShowResult>,
41
- tokenizeCard: (clientToken: string, cardInfo: CardInfo) => Promise<string>,
42
- };
1
+ type ShowOptions = {|
2
+ clientToken: string,
3
+ threeDSecure?: {|
4
+ amount: number,
5
+ |},
6
+ vaultManager?: boolean,
7
+ cardDisabled?: boolean,
8
+ googlePay?: boolean,
9
+ orderTotal?: string,
10
+ currencyCode?: string,
11
+ googlePayMerchantId?: string,
12
+ payPal?: boolean,
13
+ applePay?: boolean,
14
+ merchantIdentifier?: string,
15
+ countryCode?: string,
16
+ merchantName?: string,
17
+ darkTheme?: boolean,
18
+ fontFamily?: string,
19
+ boldFontFamily?: string,
20
+ |};
21
+
22
+ type CardInfo = {|
23
+ number: string,
24
+ expirationMonth: string,
25
+ expirationYear: string,
26
+ cvv: string,
27
+ postalCode: string,
28
+ |};
29
+
30
+ type ShowResult = {|
31
+ nonce: string,
32
+ description: string,
33
+ type: string,
34
+ isDefault: boolean,
35
+ deviceData: string,
36
+ |};
37
+
38
+ declare module.exports: {
39
+ show: (options: ShowOptions) => Promise<ShowResult>,
40
+ fetchMostRecentPaymentMethod: (clientToken: string) => Promise<ShowResult>,
41
+ tokenizeCard: (clientToken: string, cardInfo: CardInfo) => Promise<string>,
42
+ };
@@ -1,40 +1,40 @@
1
- @import UIKit;
2
- @import PassKit;
3
-
4
- #if __has_include("RCTBridgeModule.h")
5
- #import "RCTBridgeModule.h"
6
- #else
7
- #import <React/RCTBridgeModule.h>
8
- #endif
9
-
10
- #import "BraintreeCore.h"
11
- #import "BraintreeDropIn.h"
12
- #import "BTCardNonce.h"
13
- #import "BTDataCollector.h"
14
-
15
- #import "BraintreeApplePay.h"
16
-
17
- @interface RNBraintreeDropIn : NSObject <RCTBridgeModule, PKPaymentAuthorizationViewControllerDelegate>
18
-
19
- @property (nonatomic, strong) UIViewController *_Nonnull reactRoot;
20
-
21
- // Retain your `BTDataCollector` instance for your entire application lifecycle.
22
- @property (nonatomic, strong) BTDataCollector *_Nonnull dataCollector;
23
-
24
- @property (nonatomic, strong) BTAPIClient *_Nonnull braintreeClient;
25
-
26
- @property (nonatomic, strong) PKPaymentRequest *_Nonnull paymentRequest;
27
-
28
- @property (nonatomic, strong) PKPaymentAuthorizationViewController *_Nonnull viewController;
29
-
30
- @property (nonatomic, strong) NSString * _Nonnull deviceDataCollector;
31
-
32
- @property (nonatomic) RCTPromiseResolveBlock _Nonnull resolve;
33
-
34
- @property (nonatomic) RCTPromiseRejectBlock _Nonnull reject;
35
-
36
- @property (nonatomic, assign) BOOL applePayAuthorized;
37
-
38
- + (void)resolvePayment:(BTDropInResult* _Nullable)result deviceData:(NSString * _Nonnull)deviceDataCollector resolver:(RCTPromiseResolveBlock _Nonnull)resolve;
39
-
40
- @end
1
+ @import UIKit;
2
+ @import PassKit;
3
+
4
+ #if __has_include("RCTBridgeModule.h")
5
+ #import "RCTBridgeModule.h"
6
+ #else
7
+ #import <React/RCTBridgeModule.h>
8
+ #endif
9
+
10
+ #import "BraintreeCore.h"
11
+ #import "BraintreeDropIn.h"
12
+ #import "BTCardNonce.h"
13
+ #import "BTDataCollector.h"
14
+
15
+ #import "BraintreeApplePay.h"
16
+
17
+ @interface RNBraintreeDropIn : NSObject <RCTBridgeModule, PKPaymentAuthorizationViewControllerDelegate>
18
+
19
+ @property (nonatomic, strong) UIViewController *_Nonnull reactRoot;
20
+
21
+ // Retain your `BTDataCollector` instance for your entire application lifecycle.
22
+ @property (nonatomic, strong) BTDataCollector *_Nonnull dataCollector;
23
+
24
+ @property (nonatomic, strong) BTAPIClient *_Nonnull braintreeClient;
25
+
26
+ @property (nonatomic, strong) PKPaymentRequest *_Nonnull paymentRequest;
27
+
28
+ @property (nonatomic, strong) PKPaymentAuthorizationViewController *_Nonnull viewController;
29
+
30
+ @property (nonatomic, strong) NSString * _Nonnull deviceDataCollector;
31
+
32
+ @property (nonatomic) RCTPromiseResolveBlock _Nonnull resolve;
33
+
34
+ @property (nonatomic) RCTPromiseRejectBlock _Nonnull reject;
35
+
36
+ @property (nonatomic, assign) BOOL applePayAuthorized;
37
+
38
+ + (void)resolvePayment:(BTDropInResult* _Nullable)result deviceData:(NSString * _Nonnull)deviceDataCollector resolver:(RCTPromiseResolveBlock _Nonnull)resolve;
39
+
40
+ @end