react-native-hyperpay-sdk 1.0.5 → 1.0.6

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
@@ -82,6 +82,7 @@ HyperPay.init({
82
82
  mode: 'TestMode', // 'TestMode' | 'LiveMode'
83
83
  companyName: 'Your Company', // displayed in Apple Pay sheet (iOS only)
84
84
  supportedNetworks: ['visa', 'masterCard'], // Apple Pay supported networks (iOS only)
85
+ currencyCode: 'SAR', // ISO 4217 currency code, Apple Pay only (iOS only)
85
86
  });
86
87
  ```
87
88
 
@@ -95,6 +96,7 @@ HyperPay.init({
95
96
  | `mode` | `'TestMode' \| 'LiveMode'` | No | Payment environment — defaults to `'TestMode'` |
96
97
  | `companyName` | `string` | No | Merchant name displayed in the Apple Pay sheet as "Pay `<companyName>`" (iOS only) |
97
98
  | `supportedNetworks` | `SupportedNetworks[]` | No | Card networks accepted by Apple Pay (e.g. `'visa'`, `'masterCard'`, `'mada'`) (iOS only) |
99
+ | `currencyCode` | `string` | No | ISO 4217 currency code (e.g. `'SAR'`, `'USD'`) used for Apple Pay (iOS only) |
98
100
 
99
101
  ---
100
102
 
@@ -139,6 +141,7 @@ const result = await HyperPay.applePay({
139
141
  checkoutID: '<checkout_id_from_your_server>',
140
142
  companyName: 'Your Company', // optional — overrides init value
141
143
  amount: '100.00', // optional — displayed in the Apple Pay sheet
144
+ currencyCode: 'SAR', // optional — overrides init value
142
145
  });
143
146
 
144
147
  // result shape:
@@ -27,16 +27,27 @@ export interface Config {
27
27
 
28
28
  /**
29
29
  * set up supported payment networks for apple pay
30
- * @Platform IOS Only
30
+ * @Platform IOS Only
31
31
  */
32
32
  supportedNetworks?: Array<SupportedNetworks>
33
33
 
34
+ /**
35
+ * ISO 4217 currency code (e.g. "SAR", "USD"), Apple Pay only
36
+ * @Platform IOS Only
37
+ */
38
+ currencyCode?: string;
39
+
34
40
  }
35
41
 
36
42
  export type ApplyPayParams = {
37
43
  checkoutID:string;
38
44
  companyName?:string;
39
45
  amount?:string;
46
+ /**
47
+ * ISO 4217 currency code (e.g. "SAR", "USD") — overrides init value
48
+ * @Platform IOS Only
49
+ */
50
+ currencyCode?:string;
40
51
  }
41
52
 
42
53
  export type CreateTransactionParams = {
@@ -63,7 +74,8 @@ export default class HyperPay {
63
74
  * @param {CountryCodes} countryCode
64
75
  * @param {string} merchantIdentifier
65
76
  * @param {string} mode
66
- * @param {SupportedNetworks[]} supportedNetworks
77
+ * @param {SupportedNetworks[]} supportedNetworks
78
+ * @param {string} currencyCode
67
79
  * @returns Config
68
80
  */
69
81
 
@@ -72,7 +84,8 @@ export default class HyperPay {
72
84
  /**
73
85
  * @param {string} checkoutID
74
86
  * @param {string} companyName
75
- * @param {number} amount
87
+ * @param {number} amount
88
+ * @param {string} currencyCode
76
89
  * @param {(isProgress: boolean) => void} onProgress
77
90
  * @returns ```Promise<{ redirectURL?: string,
78
91
  resourcePath?: string}>```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-hyperpay-sdk",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "hyperpay",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",