@jimrising/easymerchantsdk-react-native 1.2.2 → 1.2.4
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/README.md
CHANGED
|
@@ -11,7 +11,7 @@ extension Bundle {
|
|
|
11
11
|
static let easyPayBundle: Bundle = {
|
|
12
12
|
let frameworkBundle = Bundle(for: EasyPayViewController.self)
|
|
13
13
|
|
|
14
|
-
guard let bundlePath = frameworkBundle.path(forResource: "
|
|
14
|
+
guard let bundlePath = frameworkBundle.path(forResource: "easymerchantsdk", ofType: "bundle"),
|
|
15
15
|
let resourceBundle = Bundle(path: bundlePath) else {
|
|
16
16
|
fatalError("EasyPay bundle not found")
|
|
17
17
|
}
|
|
@@ -1,32 +1,39 @@
|
|
|
1
1
|
#import "EasyMerchantSdk.h"
|
|
2
2
|
#import <React/RCTLog.h>
|
|
3
3
|
#import <React/RCTBridgeModule.h>
|
|
4
|
-
#import <easymerchantsdk
|
|
4
|
+
#import <easymerchantsdk-Swift.h>
|
|
5
5
|
|
|
6
6
|
@implementation EasyMerchantSdk
|
|
7
7
|
|
|
8
8
|
RCT_EXPORT_MODULE()
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
rejecter:(RCTPromiseRejectBlock)reject
|
|
10
|
+
RCT_EXPORT_METHOD(
|
|
11
|
+
billing:(NSString *)amount
|
|
12
|
+
billingInfo:(NSString *)billingInfo
|
|
13
|
+
paymentMethods:(NSArray *)paymentMethods
|
|
14
|
+
themeConfiguration:(NSDictionary *)themeConfiguration
|
|
15
|
+
tokenOnly:(BOOL)tokenOnly
|
|
16
|
+
saveCard:(BOOL)saveCard
|
|
17
|
+
saveAccount:(BOOL)saveAccount
|
|
18
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
19
|
+
rejecter:(RCTPromiseRejectBlock)reject
|
|
21
20
|
)
|
|
22
21
|
{
|
|
23
22
|
EasyMerchantSdkPlugin *sdkPlugin = [[EasyMerchantSdkPlugin alloc] init];
|
|
24
23
|
|
|
25
|
-
[sdkPlugin billing:amount
|
|
24
|
+
[sdkPlugin billing:amount
|
|
25
|
+
billinginfo:billingInfo
|
|
26
|
+
paymentMethods:paymentMethods
|
|
27
|
+
themeConfiguration:themeConfiguration
|
|
28
|
+
tokenOnly:tokenOnly
|
|
29
|
+
saveCard:saveCard
|
|
30
|
+
saveAccount:saveAccount
|
|
31
|
+
resolver:resolve
|
|
32
|
+
rejecter:reject];
|
|
26
33
|
}
|
|
27
34
|
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
RCT_EXPORT_METHOD(setViewController:(RCTPromiseResolveBlock)resolve
|
|
36
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
30
37
|
{
|
|
31
38
|
UIViewController *rootViewController = [UIApplication sharedApplication].delegate.window.rootViewController;
|
|
32
39
|
EasyMerchantSdkPlugin *sdkPlugin = [[EasyMerchantSdkPlugin alloc] init];
|