@nuskin/ns-shop 7.5.0 → 7.5.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.
package/package.json
CHANGED
|
@@ -13,9 +13,14 @@ let eid = '';
|
|
|
13
13
|
let id = '';
|
|
14
14
|
|
|
15
15
|
const ZZIP_URLS = {
|
|
16
|
-
dev: 'https://
|
|
17
|
-
test: 'https://
|
|
18
|
-
prod: 'https://
|
|
16
|
+
dev: 'https://apis.dev.nuskin.com/zzip/v2/:country/:code',
|
|
17
|
+
test: 'https://apis.test.nuskin.com/zzip/v2/:country/:code',
|
|
18
|
+
prod: 'https://apis.nuskin.com/zzip/v2/:country/:code'
|
|
19
|
+
};
|
|
20
|
+
const STREET_ADDRESS_VALIDATOR_URLS = {
|
|
21
|
+
dev: 'https://apis.dev.nuskin.com/street-address/v1/',
|
|
22
|
+
test: 'https://apis.test.nuskin.com/street-address/v1/',
|
|
23
|
+
prod: 'https://apis.nuskin.com/street-address/v1/'
|
|
19
24
|
};
|
|
20
25
|
|
|
21
26
|
const zzipCache = {}
|
|
@@ -230,8 +235,8 @@ function getHeaders(eid) {
|
|
|
230
235
|
*/
|
|
231
236
|
async function useAddressValidationService(address) {
|
|
232
237
|
const country = RunConfigService.getRunConfig().country;
|
|
233
|
-
const
|
|
234
|
-
const url =
|
|
238
|
+
const env = RunConfigService.getEnvironmentCode();
|
|
239
|
+
const url = STREET_ADDRESS_VALIDATOR_URLS[env] + country;
|
|
235
240
|
let response = await fetch(url, {
|
|
236
241
|
method: 'POST',
|
|
237
242
|
headers: getHeaders(),
|