@primer-io/react-native 2.14.4 → 2.15.1

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.
@@ -137,5 +137,5 @@ dependencies {
137
137
  api 'com.facebook.react:react-native:+'
138
138
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
139
139
  implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3"
140
- implementation 'io.primer:android:2.14.1'
140
+ implementation 'io.primer:android:2.15.1'
141
141
  }
@@ -31,9 +31,12 @@ extension PrimerSettings {
31
31
  var applePayOptions: PrimerApplePayOptions?
32
32
  if let rnApplePayOptions = ((settingsJson["paymentMethodOptions"] as? [String: Any])?["applePayOptions"] as? [String: Any]),
33
33
  let rnApplePayMerchantIdentifier = rnApplePayOptions["merchantIdentifier"] as? String,
34
- let rnApplePayMerchantName = rnApplePayOptions["merchantName"] as? String,
35
- let rnApplePayIsCaptureBillingAddressEnabled = rnApplePayOptions["isCaptureBillingAddressEnabled"] as? Bool {
36
- applePayOptions = PrimerApplePayOptions(merchantIdentifier: rnApplePayMerchantIdentifier, merchantName: rnApplePayMerchantName, isCaptureBillingAddressEnabled: rnApplePayIsCaptureBillingAddressEnabled)
34
+ let rnApplePayMerchantName = rnApplePayOptions["merchantName"] as? String {
35
+ if let rnApplePayIsCaptureBillingAddressEnabled = rnApplePayOptions["isCaptureBillingAddressEnabled"] as? Bool {
36
+ applePayOptions = PrimerApplePayOptions(merchantIdentifier: rnApplePayMerchantIdentifier, merchantName: rnApplePayMerchantName, isCaptureBillingAddressEnabled: rnApplePayIsCaptureBillingAddressEnabled)
37
+ } else {
38
+ applePayOptions = PrimerApplePayOptions(merchantIdentifier: rnApplePayMerchantIdentifier, merchantName: rnApplePayMerchantName)
39
+ }
37
40
  }
38
41
 
39
42
  var klarnaOptions: PrimerKlarnaOptions?
@@ -73,7 +73,7 @@ class RNTPrimerHeadlessUniversalCheckout: RCTEventEmitter {
73
73
  override init() {
74
74
  super.init()
75
75
  PrimerHeadlessUniversalCheckout.current.delegate = self
76
- PrimerSDK.Primer.shared.integrationOptions = PrimerIntegrationOptions(reactNativeVersion: "2.14.4")
76
+ PrimerSDK.Primer.shared.integrationOptions = PrimerIntegrationOptions(reactNativeVersion: "2.15.1")
77
77
  }
78
78
 
79
79
  override func supportedEvents() -> [String]! {
@@ -74,7 +74,7 @@ class RNTPrimer: RCTEventEmitter {
74
74
  override init() {
75
75
  super.init()
76
76
  PrimerSDK.Primer.shared.delegate = self
77
- PrimerSDK.Primer.shared.integrationOptions = PrimerIntegrationOptions(reactNativeVersion: "2.14.4")
77
+ PrimerSDK.Primer.shared.integrationOptions = PrimerIntegrationOptions(reactNativeVersion: "2.15.1")
78
78
  }
79
79
 
80
80
  override func supportedEvents() -> [String]! {
@@ -55,7 +55,7 @@ interface IPrimerApayaOptions {
55
55
  interface IPrimerApplePayOptions {
56
56
  merchantIdentifier: string;
57
57
  merchantName: string;
58
- isCaptureBillingAddressEnabled: boolean;
58
+ isCaptureBillingAddressEnabled?: boolean;
59
59
  }
60
60
  interface IPrimerCardPaymentOptions {
61
61
  is3DSOnVaultingEnabled: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer-io/react-native",
3
- "version": "2.14.4",
3
+ "version": "2.15.1",
4
4
  "description": "Primer SDK for RN",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -17,5 +17,5 @@ Pod::Spec.new do |s|
17
17
  s.source_files = "ios/**/*.{h,m,mm,swift}"
18
18
 
19
19
  s.dependency "React-Core"
20
- s.dependency "PrimerSDK", "2.14.3"
20
+ s.dependency "PrimerSDK", "2.15.1"
21
21
  end
@@ -79,7 +79,7 @@ interface IPrimerApayaOptions {
79
79
  interface IPrimerApplePayOptions {
80
80
  merchantIdentifier: string;
81
81
  merchantName: string;
82
- isCaptureBillingAddressEnabled: boolean;
82
+ isCaptureBillingAddressEnabled?: boolean;
83
83
  }
84
84
 
85
85
  interface IPrimerCardPaymentOptions {