@tap-payments/connect 2.12.18-development → 2.12.19-development

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
@@ -48,6 +48,8 @@ const ConnectComponent = () => {
48
48
  mature={false}
49
49
  // optional (show/hide board screen after creating an account)
50
50
  board={true}
51
+ // optional (API region: '' global, 'sa', 'sa-dr' or 'sahu'. See Regions)
52
+ region={''}
51
53
  // optional ( Decide the board maturity )
52
54
  boardMaturity={false}
53
55
  // optional ( Decide to show connect as a `popup` or `page` to our connect domain. Default value is `popup` )
@@ -85,7 +87,7 @@ const ConnectComponent = () => {
85
87
  content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,shrink-to-fit=no"
86
88
  />
87
89
  <title>Auth-JsConnect</title>
88
- <script src="https://cdn.tap.company/tap-sdks/connect/build-2.12.18-development/main.js"></script>
90
+ <script src="https://cdn.tap.company/tap-sdks/connect/build-2.12.19-development/main.js"></script>
89
91
  </head>
90
92
  <body>
91
93
  <div id="root"></div>
@@ -156,6 +158,7 @@ const ConnectComponent = () => {
156
158
  | loaderColor `optional` | `string` | Used to change loader color and it can be used only for board kit |
157
159
  | notification `optional` | `object: {email: boolean, mobile?: boolean}` | Express flow decide to send notification to email or mobile after finish create account |
158
160
  | boardMaturity `optional` | `boolean` | Decide the board maturity |
161
+ | region `optional` | `string` | Selects the production API (middleware) region. Values: _(empty)_ global, `sa` Saudi, `sa-dr` Saudi disaster recovery, `sahu` Saudi Huawei cloud. Case-insensitive, exact match; any other value falls back to global. Ignored for `pk_test_*` keys. See [Regions](#regions) |
159
162
  | settingData `optional` | `boolean` | This is to get settings information. It is used board kit and other kits open from board |
160
163
  | postURL `optional` | `string` | The POST Method URL used to push te data from our server to the merchant server and |
161
164
  | | | it's required only if `mature` is `false` |
@@ -170,6 +173,30 @@ const ConnectComponent = () => {
170
173
  | onBoardCompleted `optional` | `function` | Callback function to called when you complete all flows |
171
174
  | onSettingFetched `optional` | `function` | Callback function to called after fetch settings information. It is used board kit and other kits open from board |
172
175
 
176
+ ## Regions
177
+
178
+ The library picks the backend (middleware) URL from the `publicKey` and the optional `region` prop. The wrapper passes `region` through to auth-jsconnect without changing it.
179
+
180
+ - A `pk_test_*` key always uses the **development** URL. `region` is ignored.
181
+ - A `pk_live_*` key uses the production URL that matches `region`. If `region` is empty or not in the table, it falls back to the **global production** URL.
182
+
183
+ | `region` value | Meaning | Base URL |
184
+ | -------------- | ----------------------- | ----------------------------------------------- |
185
+ | _(empty)_ | Global production | `https://connect-mw.tap.company/middleware` |
186
+ | `sa` | Saudi production | `https://connect-mw.tap.com.sa/middleware` |
187
+ | `sa-dr` | Saudi disaster recovery | `https://connect-mw-tmp.tap.com.sa/middleware` |
188
+ | `sahu` | Saudi Huawei cloud | `https://connect-mw-temp.tap.com.sa/middleware` |
189
+
190
+ `region` is matched as a whole value and is case-insensitive (`SA` and `sa` are the same). Matching is exact, so a value such as `sa-xyz` falls back to global production.
191
+
192
+ ```js
193
+ <TapConnect
194
+ publicKey={'pk_live_xxxxxx'}
195
+ region='sahu' // Saudi Huawei cloud
196
+ ...
197
+ />
198
+ ```
199
+
173
200
  ## Branch Information
174
201
 
175
202
  This repository maintains multiple branches for different environments and stages:
@@ -1,4 +1,4 @@
1
- export declare const CDN_LIBRARY_BASE_URL = "https://cdn.tap.company/tap-sdks/auth-jsconnect/build-2.12.18-development";
1
+ export declare const CDN_LIBRARY_BASE_URL = "https://cdn.tap.company/tap-sdks/auth-jsconnect/build-2.12.19-development";
2
2
  export declare const Maturity: {
3
3
  readonly FULL: "full";
4
4
  readonly EXPRESS: "express";
@@ -1,4 +1,4 @@
1
- export var CDN_LIBRARY_BASE_URL = 'https://cdn.tap.company/tap-sdks/auth-jsconnect/build-2.12.18-development';
1
+ export var CDN_LIBRARY_BASE_URL = 'https://cdn.tap.company/tap-sdks/auth-jsconnect/build-2.12.19-development';
2
2
  export var Maturity = {
3
3
  FULL: 'full',
4
4
  EXPRESS: 'express'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/connect",
3
- "version": "2.12.18-development",
3
+ "version": "2.12.19-development",
4
4
  "description": "Tap Connect",
5
5
  "main": "build/index.js",
6
6
  "module": "build/index.js",