react-native-hyperpay-sdk 0.9.0 → 0.10.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.
Binary file
package/ios/HyperPay.m CHANGED
@@ -9,7 +9,7 @@ OPPPaymentProvider *provider;
9
9
  NSString *shopperResultURL = @"";
10
10
  NSString *merchantIdentifier = @"";
11
11
  NSString *countryCode = @"";
12
-
12
+ NSString *mode=@"Test";
13
13
 
14
14
  RCT_EXPORT_MODULE(HyperPay)
15
15
 
@@ -20,13 +20,12 @@ RCT_EXPORT_MODULE(HyperPay)
20
20
 
21
21
  self = [super init];
22
22
  if (self) {
23
- #ifdef DEBUG
23
+ // #ifdef DEBUG
24
+ if ([mode isEqual:@"Test"])
24
25
  provider = [OPPPaymentProvider paymentProviderWithMode:OPPProviderModeTest];
25
- #else
26
+ else
26
27
  provider = [OPPPaymentProvider paymentProviderWithMode:OPPProviderModeLive];
27
- #endif
28
28
  }
29
-
30
29
  return self;
31
30
  }
32
31
 
@@ -45,6 +44,8 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(setConfig: (NSDictionary*)options) {
45
44
  shopperResultURL=[options valueForKey:@"merchantIdentifier"];
46
45
  if ([options valueForKey:@"countryCode"])
47
46
  countryCode=[options valueForKey:@"countryCode"];
47
+ if ([options valueForKey:@"mode"])
48
+ mode=[options valueForKey:@"mode"];
48
49
  return options;
49
50
  }
50
51
 
@@ -20,6 +20,9 @@ export type ConfigType = {
20
20
  * required for apple pay
21
21
  */
22
22
  merchantIdentifier?: string
23
+
24
+ mode:"Test"|"Live"
25
+
23
26
  }
24
27
 
25
28
  export type CreateTransactionParams = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-hyperpay-sdk",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "hyperpay",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",