@tagadapay/plugin-sdk 3.1.25 → 4.0.2
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/dist/external-tracker.js +160 -6
- package/dist/external-tracker.min.js +2 -2
- package/dist/external-tracker.min.js.map +4 -4
- package/dist/react/config/payment.d.ts +2 -2
- package/dist/react/config/payment.js +5 -5
- package/dist/react/hooks/usePayment.d.ts +7 -0
- package/dist/react/hooks/usePayment.js +1 -0
- package/dist/tagada-react-sdk-minimal.min.js +2 -2
- package/dist/tagada-react-sdk-minimal.min.js.map +4 -4
- package/dist/tagada-react-sdk.js +2220 -1428
- package/dist/tagada-react-sdk.min.js +2 -2
- package/dist/tagada-react-sdk.min.js.map +4 -4
- package/dist/tagada-sdk.js +3784 -128
- package/dist/tagada-sdk.min.js +2 -2
- package/dist/tagada-sdk.min.js.map +4 -4
- package/dist/v2/core/config/environment.d.ts +3 -3
- package/dist/v2/core/config/environment.js +7 -7
- package/dist/v2/core/funnelClient.d.ts +42 -0
- package/dist/v2/core/funnelClient.js +30 -0
- package/dist/v2/core/pixelTracker.d.ts +51 -0
- package/dist/v2/core/pixelTracker.js +425 -0
- package/dist/v2/core/resources/checkout.d.ts +45 -1
- package/dist/v2/core/resources/checkout.js +13 -3
- package/dist/v2/core/resources/funnel.d.ts +1 -1
- package/dist/v2/core/resources/geo.d.ts +50 -0
- package/dist/v2/core/resources/geo.js +35 -0
- package/dist/v2/core/resources/offers.d.ts +1 -1
- package/dist/v2/core/resources/offers.js +3 -1
- package/dist/v2/core/resources/payments.d.ts +19 -1
- package/dist/v2/core/resources/payments.js +8 -0
- package/dist/v2/core/resources/promotionEvents.d.ts +5 -0
- package/dist/v2/core/resources/promotionEvents.js +2 -0
- package/dist/v2/core/resources/promotions.d.ts +6 -1
- package/dist/v2/core/resources/promotions.js +6 -1
- package/dist/v2/core/resources/shippingRates.d.ts +18 -0
- package/dist/v2/core/resources/shippingRates.js +18 -0
- package/dist/v2/core/utils/clickIdResolver.d.ts +79 -0
- package/dist/v2/core/utils/clickIdResolver.js +169 -0
- package/dist/v2/core/utils/index.d.ts +2 -0
- package/dist/v2/core/utils/index.js +4 -0
- package/dist/v2/core/utils/metaEventId.d.ts +14 -0
- package/dist/v2/core/utils/metaEventId.js +16 -0
- package/dist/v2/index.d.ts +7 -0
- package/dist/v2/index.js +10 -0
- package/dist/v2/react/components/ApplePayButton.js +50 -0
- package/dist/v2/react/components/FunnelScriptInjector.js +158 -10
- package/dist/v2/react/components/GooglePayButton.js +39 -1
- package/dist/v2/react/components/StripeExpressButton.d.ts +8 -0
- package/dist/v2/react/components/StripeExpressButton.js +76 -3
- package/dist/v2/react/hooks/payment-actions/useNgeniusThreedsAction.d.ts +15 -0
- package/dist/v2/react/hooks/payment-actions/useNgeniusThreedsAction.js +166 -0
- package/dist/v2/react/hooks/payment-actions/usePaymentActionHandler.js +12 -0
- package/dist/v2/react/hooks/payment-processing/usePaymentProcessors.js +1 -0
- package/dist/v2/react/hooks/useCheckoutQuery.js +41 -29
- package/dist/v2/react/hooks/useDiscountsQuery.js +4 -0
- package/dist/v2/react/hooks/useFunnel.d.ts +7 -0
- package/dist/v2/react/hooks/useFunnel.js +2 -1
- package/dist/v2/react/hooks/useISOData.js +25 -7
- package/dist/v2/react/hooks/usePaymentPolling.d.ts +1 -1
- package/dist/v2/react/hooks/usePixelTracking.d.ts +10 -5
- package/dist/v2/react/hooks/usePixelTracking.js +32 -374
- package/dist/v2/react/hooks/usePreviewOffer.d.ts +3 -1
- package/dist/v2/react/hooks/usePreviewOffer.js +8 -2
- package/dist/v2/react/hooks/usePromotionsQuery.js +9 -3
- package/dist/v2/react/hooks/useShippingRatesQuery.js +36 -21
- package/dist/v2/react/hooks/useStepConfig.d.ts +9 -0
- package/dist/v2/react/hooks/useStepConfig.js +5 -1
- package/dist/v2/react/index.d.ts +4 -0
- package/dist/v2/react/index.js +8 -0
- package/dist/v2/react/providers/ExpressPaymentMethodsProvider.js +12 -4
- package/dist/v2/react/providers/TagadaProvider.js +13 -0
- package/dist/v2/standalone/apple-pay-service.d.ts +12 -0
- package/dist/v2/standalone/apple-pay-service.js +12 -0
- package/dist/v2/standalone/external-tracker.d.ts +1 -1
- package/dist/v2/standalone/google-pay-service.d.ts +9 -0
- package/dist/v2/standalone/google-pay-service.js +9 -0
- package/dist/v2/standalone/index.d.ts +11 -1
- package/dist/v2/standalone/index.js +30 -0
- package/dist/v2/standalone/payment-service.d.ts +72 -6
- package/dist/v2/standalone/payment-service.js +285 -65
- package/package.json +2 -1
package/dist/tagada-sdk.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TagadaPay SDK
|
|
2
|
+
* TagadaPay SDK v4.0.2
|
|
3
3
|
* CDN Bundle - Full standalone SDK (Debug Build)
|
|
4
4
|
* Usage: window.tgd.createTagadaClient(), window.tgd.formatMoney(), etc.
|
|
5
5
|
* @license MIT
|
|
@@ -182,10 +182,10 @@ var TagadaSDKBundle = (() => {
|
|
|
182
182
|
}
|
|
183
183
|
return "local";
|
|
184
184
|
}
|
|
185
|
-
if (hostname
|
|
185
|
+
if (hostname.includes("tagada.io") || hostname.includes("tagadapay.com") || hostname.includes("yourproductiondomain.com")) {
|
|
186
186
|
return "production";
|
|
187
187
|
}
|
|
188
|
-
if (hostname
|
|
188
|
+
if (hostname.includes("tagada.dev") || hostname.includes("tagadapay.dev") || hostname.includes("vercel.app") || hostname.includes("netlify.app") || hostname.includes("surge.sh") || hostname.includes("github.io") || hostname.includes("herokuapp.com") || hostname.includes("railway.app") || href.includes("?env=dev") || href.includes("?dev=true") || href.includes("#dev")) {
|
|
189
189
|
return "development";
|
|
190
190
|
}
|
|
191
191
|
console.warn("[SDK] Unknown domain: ".concat(hostname, ", defaulting to production"));
|
|
@@ -207,7 +207,7 @@ var TagadaSDKBundle = (() => {
|
|
|
207
207
|
"use strict";
|
|
208
208
|
ENVIRONMENT_CONFIGS = {
|
|
209
209
|
production: {
|
|
210
|
-
baseUrl: "https://
|
|
210
|
+
baseUrl: "https://api.tagada.io",
|
|
211
211
|
endpoints: {
|
|
212
212
|
checkout: {
|
|
213
213
|
sessionInit: "/api/v1/checkout/session/init",
|
|
@@ -225,7 +225,7 @@ var TagadaSDKBundle = (() => {
|
|
|
225
225
|
}
|
|
226
226
|
},
|
|
227
227
|
development: {
|
|
228
|
-
baseUrl: "https://
|
|
228
|
+
baseUrl: "https://api.tagada.dev",
|
|
229
229
|
endpoints: {
|
|
230
230
|
checkout: {
|
|
231
231
|
sessionInit: "/api/v1/checkout/session/init",
|
|
@@ -1019,8 +1019,11 @@ var TagadaSDKBundle = (() => {
|
|
|
1019
1019
|
FunnelClient: () => FunnelClient,
|
|
1020
1020
|
TrackingProvider: () => TrackingProvider,
|
|
1021
1021
|
findMethod: () => findMethod,
|
|
1022
|
+
getAssignedCheckoutOfferDefault: () => getAssignedCheckoutOfferDefault,
|
|
1023
|
+
getAssignedCheckoutOfferIds: () => getAssignedCheckoutOfferIds,
|
|
1022
1024
|
getAssignedOrderBumpOfferIds: () => getAssignedOrderBumpOfferIds,
|
|
1023
1025
|
getAssignedPaymentFlowId: () => getAssignedPaymentFlowId,
|
|
1026
|
+
getAssignedPaymentInitiator: () => getAssignedPaymentInitiator,
|
|
1024
1027
|
getAssignedPixels: () => getAssignedPixels,
|
|
1025
1028
|
getAssignedResources: () => getAssignedResources,
|
|
1026
1029
|
getAssignedScripts: () => getAssignedScripts,
|
|
@@ -1165,7 +1168,8 @@ var TagadaSDKBundle = (() => {
|
|
|
1165
1168
|
scripts: local.scripts,
|
|
1166
1169
|
pixels: local.pixels,
|
|
1167
1170
|
orderBumps: local.orderBumps,
|
|
1168
|
-
upsellOffers: local.upsellOffers
|
|
1171
|
+
upsellOffers: local.upsellOffers,
|
|
1172
|
+
checkoutOffers: local.checkoutOffers
|
|
1169
1173
|
};
|
|
1170
1174
|
}
|
|
1171
1175
|
function getAssignedStepConfig() {
|
|
@@ -1211,6 +1215,10 @@ var TagadaSDKBundle = (() => {
|
|
|
1211
1215
|
}
|
|
1212
1216
|
return void 0;
|
|
1213
1217
|
}
|
|
1218
|
+
function getAssignedPaymentInitiator() {
|
|
1219
|
+
const stepConfig = getAssignedStepConfig();
|
|
1220
|
+
return stepConfig == null ? void 0 : stepConfig.paymentInitiator;
|
|
1221
|
+
}
|
|
1214
1222
|
function getAssignedResources() {
|
|
1215
1223
|
const stepConfig = getAssignedStepConfig();
|
|
1216
1224
|
const legacy = stepConfig == null ? void 0 : stepConfig.staticResources;
|
|
@@ -1265,6 +1273,17 @@ var TagadaSDKBundle = (() => {
|
|
|
1265
1273
|
if (stepConfig.upsellOffers.mode !== "custom") return void 0;
|
|
1266
1274
|
return stepConfig.upsellOffers.enabledUpsellIds;
|
|
1267
1275
|
}
|
|
1276
|
+
function getAssignedCheckoutOfferIds() {
|
|
1277
|
+
const stepConfig = getAssignedStepConfig();
|
|
1278
|
+
if (!(stepConfig == null ? void 0 : stepConfig.checkoutOffers)) return void 0;
|
|
1279
|
+
if (stepConfig.checkoutOffers.mode !== "custom") return void 0;
|
|
1280
|
+
return stepConfig.checkoutOffers.enabledOfferIds;
|
|
1281
|
+
}
|
|
1282
|
+
function getAssignedCheckoutOfferDefault() {
|
|
1283
|
+
var _a;
|
|
1284
|
+
const stepConfig = getAssignedStepConfig();
|
|
1285
|
+
return (_a = stepConfig == null ? void 0 : stepConfig.checkoutOffers) == null ? void 0 : _a.defaultOfferId;
|
|
1286
|
+
}
|
|
1268
1287
|
var lazyInjectPreviewIndicator, TrackingProvider, localFunnelConfigCache, localFunnelConfigLoading, FunnelClient;
|
|
1269
1288
|
var init_funnelClient = __esm({
|
|
1270
1289
|
"src/v2/core/funnelClient.ts"() {
|
|
@@ -7569,7 +7588,7 @@ var TagadaSDKBundle = (() => {
|
|
|
7569
7588
|
debug: false,
|
|
7570
7589
|
appInfo: {}
|
|
7571
7590
|
};
|
|
7572
|
-
var
|
|
7591
|
+
var BasisTheory2 = class {
|
|
7573
7592
|
constructor() {
|
|
7574
7593
|
_defineProperty(this, "_initStatus", "not-started");
|
|
7575
7594
|
}
|
|
@@ -7780,7 +7799,7 @@ var TagadaSDKBundle = (() => {
|
|
|
7780
7799
|
this._elements = elements;
|
|
7781
7800
|
}
|
|
7782
7801
|
};
|
|
7783
|
-
exports.BasisTheory =
|
|
7802
|
+
exports.BasisTheory = BasisTheory2;
|
|
7784
7803
|
}
|
|
7785
7804
|
});
|
|
7786
7805
|
|
|
@@ -8394,13 +8413,17 @@ var TagadaSDKBundle = (() => {
|
|
|
8394
8413
|
var index_exports = {};
|
|
8395
8414
|
__export(index_exports, {
|
|
8396
8415
|
ApiClient: () => ApiClient,
|
|
8416
|
+
CLICK_ID_COOKIES: () => CLICK_ID_COOKIES,
|
|
8417
|
+
CLICK_ID_URL_PARAMS: () => CLICK_ID_URL_PARAMS,
|
|
8397
8418
|
CheckoutResource: () => CheckoutResource,
|
|
8398
8419
|
CheckoutUtils: () => CheckoutUtils,
|
|
8399
8420
|
CurrencyUtils: () => CurrencyUtils,
|
|
8400
8421
|
ExpressPaymentMethodsResource: () => ExpressPaymentMethodsResource,
|
|
8401
8422
|
FunnelActionType: () => FunnelActionType,
|
|
8423
|
+
GeoResource: () => GeoResource,
|
|
8402
8424
|
GoogleAutocompleteCore: () => GoogleAutocompleteCore,
|
|
8403
8425
|
ISODataCore: () => ISODataCore,
|
|
8426
|
+
OffersResource: () => OffersResource,
|
|
8404
8427
|
OrderBumpUtils: () => OrderBumpUtils,
|
|
8405
8428
|
OrderUtils: () => OrderUtils,
|
|
8406
8429
|
OrdersResource: () => OrdersResource,
|
|
@@ -8432,8 +8455,9 @@ var TagadaSDKBundle = (() => {
|
|
|
8432
8455
|
funnelQueryKeys: () => funnelQueryKeys,
|
|
8433
8456
|
getAssignedPaymentFlowId: () => getAssignedPaymentFlowId,
|
|
8434
8457
|
getAssignedStepConfig: () => getAssignedStepConfig,
|
|
8435
|
-
getBasisTheoryApiKey: () =>
|
|
8458
|
+
getBasisTheoryApiKey: () => getBasisTheoryApiKey3,
|
|
8436
8459
|
getBasisTheoryTenantId: () => getBasisTheoryTenantId2,
|
|
8460
|
+
getCurrencyInfo: () => getCurrencyInfo,
|
|
8437
8461
|
getFunnelSessionCookie: () => getFunnelSessionCookie,
|
|
8438
8462
|
getFunnelVariantId: () => getFunnelVariantId,
|
|
8439
8463
|
getInternalPath: () => getInternalPath,
|
|
@@ -8441,13 +8465,22 @@ var TagadaSDKBundle = (() => {
|
|
|
8441
8465
|
getPluginConfig: () => getPluginConfig,
|
|
8442
8466
|
hasFunnelSessionCookie: () => hasFunnelSessionCookie,
|
|
8443
8467
|
injectStepConfigScripts: () => injectStepConfigScripts,
|
|
8468
|
+
isApplePayAvailable: () => isApplePayAvailable,
|
|
8469
|
+
isGooglePayAvailable: () => isGooglePayAvailable,
|
|
8444
8470
|
isPathRemapped: () => isPathRemapped,
|
|
8445
8471
|
loadLocalConfig: () => loadLocalConfig,
|
|
8446
8472
|
loadPluginConfig: () => loadPluginConfig,
|
|
8473
|
+
makeMetaEventId: () => makeMetaEventId,
|
|
8447
8474
|
matchRoute: () => matchRoute,
|
|
8475
|
+
minorUnitsToMajorUnits: () => minorUnitsToMajorUnits,
|
|
8476
|
+
moneyStringOrNumberToMinorUnits: () => moneyStringOrNumberToMinorUnits,
|
|
8448
8477
|
onConfigUpdate: () => onConfigUpdate,
|
|
8478
|
+
publishTrackingGlobal: () => publishTrackingGlobal,
|
|
8479
|
+
resolveClickId: () => resolveClickId,
|
|
8449
8480
|
sendConfigUpdate: () => sendConfigUpdate,
|
|
8450
|
-
setFunnelSessionCookie: () => setFunnelSessionCookie
|
|
8481
|
+
setFunnelSessionCookie: () => setFunnelSessionCookie,
|
|
8482
|
+
startApplePaySession: () => startApplePaySession,
|
|
8483
|
+
startGooglePaySession: () => startGooglePaySession
|
|
8451
8484
|
});
|
|
8452
8485
|
|
|
8453
8486
|
// src/v2/core/client.ts
|
|
@@ -10305,10 +10338,15 @@ var TagadaSDKBundle = (() => {
|
|
|
10305
10338
|
}
|
|
10306
10339
|
};
|
|
10307
10340
|
|
|
10341
|
+
// src/v2/core/resources/promotionEvents.ts
|
|
10342
|
+
var PROMOTION_APPLIED = "PROMOTION_APPLIED";
|
|
10343
|
+
var PROMOTION_REMOVED = "PROMOTION_REMOVED";
|
|
10344
|
+
|
|
10308
10345
|
// src/v2/core/resources/checkout.ts
|
|
10309
10346
|
var CheckoutResource = class {
|
|
10310
|
-
constructor(apiClient) {
|
|
10347
|
+
constructor(apiClient, bus) {
|
|
10311
10348
|
this.apiClient = apiClient;
|
|
10349
|
+
this.bus = bus;
|
|
10312
10350
|
}
|
|
10313
10351
|
/**
|
|
10314
10352
|
* Initialize a new checkout session (sync mode)
|
|
@@ -10423,15 +10461,25 @@ var TagadaSDKBundle = (() => {
|
|
|
10423
10461
|
* Apply promotion code
|
|
10424
10462
|
*/
|
|
10425
10463
|
async applyPromotionCode(checkoutSessionId, code) {
|
|
10426
|
-
|
|
10464
|
+
var _a;
|
|
10465
|
+
const result = await this.apiClient.post("/api/v1/checkout-sessions/".concat(checkoutSessionId, "/promotions/apply"), {
|
|
10427
10466
|
code
|
|
10428
10467
|
});
|
|
10468
|
+
if (result.success) {
|
|
10469
|
+
void ((_a = this.bus) == null ? void 0 : _a.emit(PROMOTION_APPLIED, { checkoutSessionId }));
|
|
10470
|
+
}
|
|
10471
|
+
return result;
|
|
10429
10472
|
}
|
|
10430
10473
|
/**
|
|
10431
10474
|
* Remove promotion
|
|
10432
10475
|
*/
|
|
10433
10476
|
async removePromotion(checkoutSessionId, promotionId) {
|
|
10434
|
-
|
|
10477
|
+
var _a;
|
|
10478
|
+
const result = await this.apiClient.delete("/api/v1/checkout-sessions/".concat(checkoutSessionId, "/promotions/").concat(promotionId));
|
|
10479
|
+
if (result.success) {
|
|
10480
|
+
void ((_a = this.bus) == null ? void 0 : _a.emit(PROMOTION_REMOVED, { checkoutSessionId }));
|
|
10481
|
+
}
|
|
10482
|
+
return result;
|
|
10435
10483
|
}
|
|
10436
10484
|
/**
|
|
10437
10485
|
* Get applied promotions
|
|
@@ -10545,8 +10593,8 @@ var TagadaSDKBundle = (() => {
|
|
|
10545
10593
|
if (hostname.includes("app-dev.tagadapay.com") || hostname.includes("cdn-dev.tagadapay.com")) {
|
|
10546
10594
|
return false;
|
|
10547
10595
|
}
|
|
10548
|
-
if (hostname.includes("tagadapay.com")) return true;
|
|
10549
|
-
if (hostname.includes("tagadapay.dev")) return false;
|
|
10596
|
+
if (hostname.includes("tagada.io") || hostname.includes("tagadapay.com")) return true;
|
|
10597
|
+
if (hostname.includes("tagada.dev") || hostname.includes("tagadapay.dev")) return false;
|
|
10550
10598
|
if (hostname === "localhost" || hostname.startsWith("127.") || hostname.startsWith("192.168.") || hostname.startsWith("10.") || hostname.includes(".local") || hostname === "" || hostname === "0.0.0.0" || hostname.includes("ngrok") || hostname.includes(".loclx.io") || hostname.includes("vercel.app") || hostname.includes("netlify.app")) {
|
|
10551
10599
|
return false;
|
|
10552
10600
|
}
|
|
@@ -10561,6 +10609,134 @@ var TagadaSDKBundle = (() => {
|
|
|
10561
10609
|
return keys.tenantId;
|
|
10562
10610
|
}
|
|
10563
10611
|
|
|
10612
|
+
// src/v2/core/utils/clickIdResolver.ts
|
|
10613
|
+
var CLICK_ID_URL_PARAMS = Object.freeze([
|
|
10614
|
+
// Postback ad-trackers (most specific first)
|
|
10615
|
+
"cf_click_id",
|
|
10616
|
+
// ClickFlare canonical
|
|
10617
|
+
"cid",
|
|
10618
|
+
// Voluum canonical (also: ClickFlare receiving-side)
|
|
10619
|
+
"rtkclickid",
|
|
10620
|
+
// RedTrack canonical
|
|
10621
|
+
"cmc_tid",
|
|
10622
|
+
// ClickMagick canonical (replaces legacy #S2#)
|
|
10623
|
+
"cmc_id",
|
|
10624
|
+
// ClickMagick legacy
|
|
10625
|
+
"cmcid",
|
|
10626
|
+
// ClickMagick alt
|
|
10627
|
+
"clickid",
|
|
10628
|
+
// Generic affiliate-network token (Binom, RedTrack, Voluum, …)
|
|
10629
|
+
"click_id",
|
|
10630
|
+
// Generic snake_case (ClickFlare, ClickMagick, …)
|
|
10631
|
+
// Ad-platform native click ids
|
|
10632
|
+
"gclid",
|
|
10633
|
+
// Google Ads
|
|
10634
|
+
"gbraid",
|
|
10635
|
+
// Google Ads (iOS app)
|
|
10636
|
+
"wbraid",
|
|
10637
|
+
// Google Ads (web→app)
|
|
10638
|
+
"fbclid",
|
|
10639
|
+
// Meta
|
|
10640
|
+
"msclkid",
|
|
10641
|
+
// Microsoft Ads
|
|
10642
|
+
"ttclid",
|
|
10643
|
+
// TikTok
|
|
10644
|
+
"twclid",
|
|
10645
|
+
// X / Twitter
|
|
10646
|
+
"li_fat_id",
|
|
10647
|
+
// LinkedIn
|
|
10648
|
+
"epik",
|
|
10649
|
+
// Pinterest
|
|
10650
|
+
"dclid",
|
|
10651
|
+
// Display & Video 360
|
|
10652
|
+
"yclid",
|
|
10653
|
+
// Yandex
|
|
10654
|
+
"irclickid"
|
|
10655
|
+
// Impact
|
|
10656
|
+
]);
|
|
10657
|
+
var CLICK_ID_COOKIES = Object.freeze([
|
|
10658
|
+
// ClickFlare
|
|
10659
|
+
"cf_click_id",
|
|
10660
|
+
"cfclid",
|
|
10661
|
+
// RedTrack — `rtkclickid-store` is the canonical first-party cookie
|
|
10662
|
+
// set by RedTrack's Universal Tracking Script.
|
|
10663
|
+
"rtkclickid-store",
|
|
10664
|
+
"_rtkclickid",
|
|
10665
|
+
"rtkclickid",
|
|
10666
|
+
// Voluum
|
|
10667
|
+
"_voluum",
|
|
10668
|
+
"_voluumclickid",
|
|
10669
|
+
// Binom
|
|
10670
|
+
"_binom",
|
|
10671
|
+
"_binomclickid",
|
|
10672
|
+
// ClickMagick
|
|
10673
|
+
"_mck",
|
|
10674
|
+
"cmcid",
|
|
10675
|
+
// Other
|
|
10676
|
+
"skro-click-id",
|
|
10677
|
+
// Skro
|
|
10678
|
+
"click_id"
|
|
10679
|
+
// generic catch-all (last)
|
|
10680
|
+
]);
|
|
10681
|
+
function readCookie(name) {
|
|
10682
|
+
if (typeof document === "undefined" || !document.cookie) return null;
|
|
10683
|
+
const escaped = name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
10684
|
+
const m = document.cookie.match(new RegExp("(?:^|; )" + escaped + "=([^;]*)"));
|
|
10685
|
+
if (!m) return null;
|
|
10686
|
+
try {
|
|
10687
|
+
return decodeURIComponent(m[1]);
|
|
10688
|
+
} catch (e) {
|
|
10689
|
+
return m[1];
|
|
10690
|
+
}
|
|
10691
|
+
}
|
|
10692
|
+
function readUrlParam(search, name) {
|
|
10693
|
+
if (!search) return null;
|
|
10694
|
+
try {
|
|
10695
|
+
return new URLSearchParams(search).get(name);
|
|
10696
|
+
} catch (e) {
|
|
10697
|
+
return null;
|
|
10698
|
+
}
|
|
10699
|
+
}
|
|
10700
|
+
function resolveClickId() {
|
|
10701
|
+
var _a, _b;
|
|
10702
|
+
const all = {};
|
|
10703
|
+
let clickId = null;
|
|
10704
|
+
let source = null;
|
|
10705
|
+
let key = null;
|
|
10706
|
+
const search = typeof window !== "undefined" ? (_b = (_a = window.location) == null ? void 0 : _a.search) != null ? _b : "" : "";
|
|
10707
|
+
for (const name of CLICK_ID_URL_PARAMS) {
|
|
10708
|
+
const v = readUrlParam(search, name);
|
|
10709
|
+
if (v) {
|
|
10710
|
+
all["url:".concat(name)] = v;
|
|
10711
|
+
if (clickId === null) {
|
|
10712
|
+
clickId = v;
|
|
10713
|
+
source = "url";
|
|
10714
|
+
key = name;
|
|
10715
|
+
}
|
|
10716
|
+
}
|
|
10717
|
+
}
|
|
10718
|
+
for (const name of CLICK_ID_COOKIES) {
|
|
10719
|
+
const v = readCookie(name);
|
|
10720
|
+
if (v) {
|
|
10721
|
+
all["cookie:".concat(name)] = v;
|
|
10722
|
+
if (clickId === null) {
|
|
10723
|
+
clickId = v;
|
|
10724
|
+
source = "cookie";
|
|
10725
|
+
key = name;
|
|
10726
|
+
}
|
|
10727
|
+
}
|
|
10728
|
+
}
|
|
10729
|
+
return { clickId, source, key, all };
|
|
10730
|
+
}
|
|
10731
|
+
function publishTrackingGlobal() {
|
|
10732
|
+
var _a;
|
|
10733
|
+
if (typeof window === "undefined") return null;
|
|
10734
|
+
const resolved = resolveClickId();
|
|
10735
|
+
const tracking = __spreadProps(__spreadValues({}, resolved), { resolvedAt: Date.now() });
|
|
10736
|
+
window.TagadaPay = __spreadProps(__spreadValues({}, (_a = window.TagadaPay) != null ? _a : {}), { tracking });
|
|
10737
|
+
return tracking;
|
|
10738
|
+
}
|
|
10739
|
+
|
|
10564
10740
|
// src/v2/core/resources/shippingRates.ts
|
|
10565
10741
|
var ShippingRatesResource = class {
|
|
10566
10742
|
constructor(apiClient) {
|
|
@@ -10593,6 +10769,26 @@ var TagadaSDKBundle = (() => {
|
|
|
10593
10769
|
"/api/v1/checkout-sessions/".concat(sessionId, "/shipping-rates/preview?").concat(queryParams.toString())
|
|
10594
10770
|
);
|
|
10595
10771
|
}
|
|
10772
|
+
/**
|
|
10773
|
+
* Preview shipping rates for a country AND persist the auto-selected rate on the session.
|
|
10774
|
+
*
|
|
10775
|
+
* Difference with `previewShippingRates` (which is read-only):
|
|
10776
|
+
* - the server picks the highlighted (or cheapest) rate for `countryCode`
|
|
10777
|
+
* - it writes `checkoutSession.shippingRateId` to the DB
|
|
10778
|
+
* - the next `getCheckout()` will return a summary that includes shipping cost
|
|
10779
|
+
*
|
|
10780
|
+
* Use this from the studio when geolocation (or any client-side hint) determines a country
|
|
10781
|
+
* BEFORE the user submits the full address. Otherwise the wallet sheet (Apple Pay, etc.) will
|
|
10782
|
+
* be opened with a stale total that doesn't include shipping fees.
|
|
10783
|
+
*/
|
|
10784
|
+
async selectPreviewShippingRate(sessionId, params) {
|
|
10785
|
+
return this.apiClient.post(
|
|
10786
|
+
"/api/v1/checkout-sessions/".concat(sessionId, "/shipping-rates/select-preview"),
|
|
10787
|
+
__spreadValues({
|
|
10788
|
+
countryCode: params.countryCode
|
|
10789
|
+
}, params.stateCode ? { stateCode: params.stateCode } : {})
|
|
10790
|
+
);
|
|
10791
|
+
}
|
|
10596
10792
|
};
|
|
10597
10793
|
|
|
10598
10794
|
// src/v2/core/resources/payments.ts
|
|
@@ -10741,10 +10937,10 @@ var TagadaSDKBundle = (() => {
|
|
|
10741
10937
|
console.log("[PaymentsResource] Full options object:", JSON.stringify(options, null, 2));
|
|
10742
10938
|
console.log("[PaymentsResource] processorId:", options.processorId, "paymentMethod:", options.paymentMethod);
|
|
10743
10939
|
try {
|
|
10744
|
-
const requestBody = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
|
|
10940
|
+
const requestBody = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
|
|
10745
10941
|
checkoutSessionId,
|
|
10746
10942
|
paymentInstrumentId
|
|
10747
|
-
}, threedsSessionId && { threedsSessionId }), options.initiatedBy && { initiatedBy: options.initiatedBy }), options.source && { source: options.source }), options.paymentFlowId && { paymentFlowId: options.paymentFlowId }), options.processorId && { processorId: options.processorId }), options.paymentMethod && { paymentMethod: options.paymentMethod }), options.isExpress && { isExpress: options.isExpress });
|
|
10943
|
+
}, threedsSessionId && { threedsSessionId }), options.initiatedBy && { initiatedBy: options.initiatedBy }), options.source && { source: options.source }), options.paymentFlowId && { paymentFlowId: options.paymentFlowId }), options.processorId && { processorId: options.processorId }), options.paymentMethod && { paymentMethod: options.paymentMethod }), options.isExpress && { isExpress: options.isExpress }), options.shippingRateId && { shippingRateId: options.shippingRateId });
|
|
10748
10944
|
console.log("[PaymentsResource] Request body being sent:", JSON.stringify(requestBody, null, 2));
|
|
10749
10945
|
const response = await this.apiClient.post("/api/public/v1/checkout/pay-v2", requestBody);
|
|
10750
10946
|
console.log("[PaymentsResource] processPaymentDirect SUCCESS:", response);
|
|
@@ -10801,6 +10997,13 @@ var TagadaSDKBundle = (() => {
|
|
|
10801
10997
|
async updateThreedsStatus(data) {
|
|
10802
10998
|
return this.apiClient.post("/api/v1/threeds/status", data);
|
|
10803
10999
|
}
|
|
11000
|
+
/**
|
|
11001
|
+
* Complete N-Genius payment after WebSDK 3DS flow finishes.
|
|
11002
|
+
* Verifies state from N-Genius server-side and updates the payment record.
|
|
11003
|
+
*/
|
|
11004
|
+
async ngeniusThreedsComplete(data) {
|
|
11005
|
+
return this.apiClient.post("/api/v1/payments/ngenius/threeds-complete", data);
|
|
11006
|
+
}
|
|
10804
11007
|
};
|
|
10805
11008
|
|
|
10806
11009
|
// src/v2/core/resources/orders.ts
|
|
@@ -10855,6 +11058,281 @@ var TagadaSDKBundle = (() => {
|
|
|
10855
11058
|
}
|
|
10856
11059
|
};
|
|
10857
11060
|
|
|
11061
|
+
// src/v2/core/resources/offers.ts
|
|
11062
|
+
init_previewMode();
|
|
11063
|
+
var OffersResource = class {
|
|
11064
|
+
constructor(apiClient) {
|
|
11065
|
+
this.apiClient = apiClient;
|
|
11066
|
+
}
|
|
11067
|
+
/**
|
|
11068
|
+
* Get a single offer by ID
|
|
11069
|
+
*/
|
|
11070
|
+
async getOfferById(offerId) {
|
|
11071
|
+
const response = await this.apiClient.get("/api/v1/offers/".concat(offerId));
|
|
11072
|
+
return response;
|
|
11073
|
+
}
|
|
11074
|
+
/**
|
|
11075
|
+
* Get offers for a store
|
|
11076
|
+
* @param storeId - Store ID
|
|
11077
|
+
* @param offerIds - Optional array of offer IDs to filter by
|
|
11078
|
+
*/
|
|
11079
|
+
async getOffers(storeId, offerIds) {
|
|
11080
|
+
let url = "/api/v1/stores/".concat(storeId, "/offers");
|
|
11081
|
+
if (offerIds && offerIds.length > 0) {
|
|
11082
|
+
const idsParam = offerIds.map((id) => "ids=".concat(encodeURIComponent(id))).join("&");
|
|
11083
|
+
url += "?".concat(idsParam);
|
|
11084
|
+
}
|
|
11085
|
+
const response = await this.apiClient.get(url);
|
|
11086
|
+
return response.offers || [];
|
|
11087
|
+
}
|
|
11088
|
+
/**
|
|
11089
|
+
* Get offers by IDs (now uses backend filtering for better performance)
|
|
11090
|
+
*/
|
|
11091
|
+
async getOffersByIds(storeId, offerIds) {
|
|
11092
|
+
return await this.getOffers(storeId, offerIds);
|
|
11093
|
+
}
|
|
11094
|
+
/**
|
|
11095
|
+
* Preview an offer with calculated summary (no checkout session creation)
|
|
11096
|
+
* @param offerId - Offer ID
|
|
11097
|
+
* @param currency - Currency code
|
|
11098
|
+
* @param lineItems - Optional line items with variant/quantity selections
|
|
11099
|
+
* - Use lineItemId for precise updates (same product, different variants)
|
|
11100
|
+
* - Use productId for simple updates (all items with this product)
|
|
11101
|
+
*/
|
|
11102
|
+
async previewOffer(offerId, currency = "", lineItems) {
|
|
11103
|
+
console.log("\u{1F4E1} [OffersResource] Calling preview API:", {
|
|
11104
|
+
offerId,
|
|
11105
|
+
currency,
|
|
11106
|
+
lineItems,
|
|
11107
|
+
endpoint: "/api/v1/offers/".concat(offerId, "/preview")
|
|
11108
|
+
});
|
|
11109
|
+
const response = await this.apiClient.post("/api/v1/offers/".concat(offerId, "/preview"), {
|
|
11110
|
+
offerId,
|
|
11111
|
+
currency,
|
|
11112
|
+
lineItems
|
|
11113
|
+
});
|
|
11114
|
+
console.log("\u{1F4E5} [OffersResource] Preview API response:", response);
|
|
11115
|
+
return response;
|
|
11116
|
+
}
|
|
11117
|
+
/**
|
|
11118
|
+
* Preview and pay for an offer with variant selections
|
|
11119
|
+
* Combines preview + checkout session creation in one call
|
|
11120
|
+
* @param offerId - Offer ID
|
|
11121
|
+
* @param currency - Currency code
|
|
11122
|
+
* @param lineItems - Line items with variant/quantity selections
|
|
11123
|
+
* @param returnUrl - Optional return URL for checkout
|
|
11124
|
+
* @param mainOrderId - Optional main order ID (for upsells)
|
|
11125
|
+
*/
|
|
11126
|
+
async payPreviewedOffer(offerId, currency = "", lineItems, returnUrl, mainOrderId, initiatedBy) {
|
|
11127
|
+
console.log("\u{1F4B3} [OffersResource] Calling pay-preview API:", {
|
|
11128
|
+
offerId,
|
|
11129
|
+
currency,
|
|
11130
|
+
lineItems,
|
|
11131
|
+
returnUrl,
|
|
11132
|
+
mainOrderId,
|
|
11133
|
+
initiatedBy,
|
|
11134
|
+
endpoint: "/api/v1/offers/".concat(offerId, "/pay-preview")
|
|
11135
|
+
});
|
|
11136
|
+
const response = await this.apiClient.post("/api/v1/offers/".concat(offerId, "/pay-preview"), __spreadValues({
|
|
11137
|
+
offerId,
|
|
11138
|
+
currency,
|
|
11139
|
+
lineItems,
|
|
11140
|
+
returnUrl: returnUrl || (typeof window !== "undefined" ? window.location.href : ""),
|
|
11141
|
+
mainOrderId
|
|
11142
|
+
}, initiatedBy ? { initiatedBy } : {}));
|
|
11143
|
+
console.log("\u{1F4E5} [OffersResource] Pay-preview API response:", response);
|
|
11144
|
+
return response;
|
|
11145
|
+
}
|
|
11146
|
+
/**
|
|
11147
|
+
* Create checkout session from previewed offer WITHOUT paying
|
|
11148
|
+
* Used for landing pages to prepare checkout before actual payment
|
|
11149
|
+
* @param offerId - Offer ID
|
|
11150
|
+
* @param currency - Currency code
|
|
11151
|
+
* @param lineItems - Line items with variant/quantity selections
|
|
11152
|
+
* @param returnUrl - Optional return URL for checkout
|
|
11153
|
+
* @param mainOrderId - Optional main order ID
|
|
11154
|
+
*/
|
|
11155
|
+
async toCheckout(offerId, currency = "", lineItems, returnUrl, mainOrderId) {
|
|
11156
|
+
console.log("\u{1F6D2} [OffersResource] Calling to-checkout API:", {
|
|
11157
|
+
offerId,
|
|
11158
|
+
currency,
|
|
11159
|
+
lineItems,
|
|
11160
|
+
returnUrl,
|
|
11161
|
+
mainOrderId,
|
|
11162
|
+
endpoint: "/api/v1/offers/".concat(offerId, "/to-checkout")
|
|
11163
|
+
});
|
|
11164
|
+
const response = await this.apiClient.post("/api/v1/offers/".concat(offerId, "/to-checkout"), {
|
|
11165
|
+
offerId,
|
|
11166
|
+
currency,
|
|
11167
|
+
lineItems,
|
|
11168
|
+
returnUrl: returnUrl || (typeof window !== "undefined" ? window.location.href : ""),
|
|
11169
|
+
mainOrderId
|
|
11170
|
+
});
|
|
11171
|
+
console.log("\u{1F4E5} [OffersResource] To-checkout API response:", response);
|
|
11172
|
+
return response;
|
|
11173
|
+
}
|
|
11174
|
+
/**
|
|
11175
|
+
* Initialize checkout session for an offer
|
|
11176
|
+
* @param offerId - Offer ID (required)
|
|
11177
|
+
* @param orderId - Order ID (optional - used for post-purchase upsells)
|
|
11178
|
+
* @param customerId - Customer ID (optional)
|
|
11179
|
+
*/
|
|
11180
|
+
async initCheckoutSession(offerId, orderId, customerId) {
|
|
11181
|
+
const draft = isDraftMode();
|
|
11182
|
+
const payload = {
|
|
11183
|
+
offerId,
|
|
11184
|
+
returnUrl: typeof window !== "undefined" ? window.location.href : "",
|
|
11185
|
+
customerId: customerId || "",
|
|
11186
|
+
draft
|
|
11187
|
+
// 🎯 Pass draft mode
|
|
11188
|
+
};
|
|
11189
|
+
if (orderId) {
|
|
11190
|
+
payload.orderId = orderId;
|
|
11191
|
+
}
|
|
11192
|
+
const response = await this.apiClient.post("/api/v1/checkout/offer/init", payload);
|
|
11193
|
+
return { checkoutSessionId: response.checkoutSessionId };
|
|
11194
|
+
}
|
|
11195
|
+
/**
|
|
11196
|
+
* Create checkout session for an offer
|
|
11197
|
+
*/
|
|
11198
|
+
async createCheckoutSession(offerId, returnUrl) {
|
|
11199
|
+
const response = await this.apiClient.post("/api/v1/offers/".concat(offerId, "/checkout"), {
|
|
11200
|
+
returnUrl: returnUrl || (typeof window !== "undefined" ? window.location.origin : "")
|
|
11201
|
+
});
|
|
11202
|
+
return { checkoutUrl: response.checkoutUrl };
|
|
11203
|
+
}
|
|
11204
|
+
/**
|
|
11205
|
+
* Pay with checkout session
|
|
11206
|
+
*/
|
|
11207
|
+
async payWithCheckoutSession(checkoutSessionId, orderId) {
|
|
11208
|
+
const draft = isDraftMode();
|
|
11209
|
+
await this.apiClient.post("/api/v1/checkout-sessions/".concat(checkoutSessionId, "/pay"), {
|
|
11210
|
+
checkoutSessionId,
|
|
11211
|
+
draft,
|
|
11212
|
+
// 🎯 Use dynamic draft mode instead of hardcoded false
|
|
11213
|
+
returnUrl: typeof window !== "undefined" ? window.location.href : "",
|
|
11214
|
+
metadata: {
|
|
11215
|
+
comingFromPostPurchase: true,
|
|
11216
|
+
postOrder: orderId,
|
|
11217
|
+
upsell: true,
|
|
11218
|
+
source: "offer"
|
|
11219
|
+
}
|
|
11220
|
+
});
|
|
11221
|
+
}
|
|
11222
|
+
/**
|
|
11223
|
+
* Pay for an offer directly
|
|
11224
|
+
*/
|
|
11225
|
+
async payOffer(offerId, orderId) {
|
|
11226
|
+
const draft = isDraftMode();
|
|
11227
|
+
return this.apiClient.post("/api/v1/offers/".concat(offerId, "/pay"), {
|
|
11228
|
+
offerId,
|
|
11229
|
+
draft,
|
|
11230
|
+
// 🎯 Use dynamic draft mode instead of hardcoded false
|
|
11231
|
+
returnUrl: typeof window !== "undefined" ? window.location.href : "",
|
|
11232
|
+
metadata: orderId ? {
|
|
11233
|
+
comingFromPostPurchase: true,
|
|
11234
|
+
postOrder: orderId,
|
|
11235
|
+
upsell: true,
|
|
11236
|
+
source: "offer"
|
|
11237
|
+
} : {
|
|
11238
|
+
upsell: true,
|
|
11239
|
+
source: "offer"
|
|
11240
|
+
}
|
|
11241
|
+
});
|
|
11242
|
+
}
|
|
11243
|
+
/**
|
|
11244
|
+
* Transform offer to checkout session with dynamic variant selection
|
|
11245
|
+
* Uses lineItems from the offer to create a new checkout session
|
|
11246
|
+
*/
|
|
11247
|
+
async transformToCheckoutSession(offerId, lineItems, mainOrderId, returnUrl) {
|
|
11248
|
+
const response = await this.apiClient.post("/api/v1/offers/".concat(offerId, "/transform-to-checkout"), {
|
|
11249
|
+
offerId,
|
|
11250
|
+
lineItems,
|
|
11251
|
+
mainOrderId,
|
|
11252
|
+
returnUrl: returnUrl || (typeof window !== "undefined" ? window.location.origin : "")
|
|
11253
|
+
});
|
|
11254
|
+
return {
|
|
11255
|
+
checkoutUrl: response.checkoutUrl,
|
|
11256
|
+
checkoutSessionId: response.checkoutSessionId,
|
|
11257
|
+
customerId: response.customerId
|
|
11258
|
+
};
|
|
11259
|
+
}
|
|
11260
|
+
/**
|
|
11261
|
+
* Transform offer to checkout session (async mode) ⚡
|
|
11262
|
+
* Response time: ~50ms (20-50x faster!)
|
|
11263
|
+
*
|
|
11264
|
+
* Returns checkoutToken immediately, background job completes processing.
|
|
11265
|
+
* Use getCheckout() to fetch full session data - it auto-waits for completion.
|
|
11266
|
+
*
|
|
11267
|
+
* @example
|
|
11268
|
+
* // Fast transform
|
|
11269
|
+
* const { checkoutToken } = await offers.toCheckoutAsync(offerId, currency, lineItems, returnUrl, mainOrderId);
|
|
11270
|
+
*
|
|
11271
|
+
* // Redirect user immediately
|
|
11272
|
+
* window.location.href = `/checkout/${checkoutToken}/op`;
|
|
11273
|
+
*
|
|
11274
|
+
* // By the time page loads, background processing is usually complete
|
|
11275
|
+
*/
|
|
11276
|
+
async toCheckoutAsync(offerId, currency = "", lineItems, returnUrl, mainOrderId) {
|
|
11277
|
+
console.log("\u{1F6D2} [OffersResource] Calling to-checkout-async API:", {
|
|
11278
|
+
offerId,
|
|
11279
|
+
currency,
|
|
11280
|
+
lineItems,
|
|
11281
|
+
returnUrl,
|
|
11282
|
+
mainOrderId,
|
|
11283
|
+
endpoint: "/api/v1/offers/".concat(offerId, "/to-checkout-async")
|
|
11284
|
+
});
|
|
11285
|
+
const response = await this.apiClient.post("/api/v1/offers/".concat(offerId, "/to-checkout-async"), {
|
|
11286
|
+
offerId,
|
|
11287
|
+
lineItems: (lineItems == null ? void 0 : lineItems.map((item) => ({
|
|
11288
|
+
variantId: item.variantId,
|
|
11289
|
+
quantity: item.quantity
|
|
11290
|
+
}))) || [],
|
|
11291
|
+
returnUrl: returnUrl || (typeof window !== "undefined" ? window.location.href : ""),
|
|
11292
|
+
mainOrderId: mainOrderId || ""
|
|
11293
|
+
});
|
|
11294
|
+
console.log("\u{1F4E5} [OffersResource] To-checkout-async API response:", response);
|
|
11295
|
+
return response;
|
|
11296
|
+
}
|
|
11297
|
+
/**
|
|
11298
|
+
* @deprecated Use transformToCheckoutSession instead
|
|
11299
|
+
* Transform offer to checkout session with dynamic variant selection
|
|
11300
|
+
*/
|
|
11301
|
+
async transformToCheckout(offerId, returnUrl) {
|
|
11302
|
+
const response = await this.apiClient.post("/api/v1/offers/".concat(offerId, "/transform-to-checkout"), {
|
|
11303
|
+
returnUrl: returnUrl || (typeof window !== "undefined" ? window.location.origin : "")
|
|
11304
|
+
});
|
|
11305
|
+
return { checkoutUrl: response.checkoutUrl };
|
|
11306
|
+
}
|
|
11307
|
+
/**
|
|
11308
|
+
* Initialize checkout session for an offer with variants (similar to postPurchases)
|
|
11309
|
+
*/
|
|
11310
|
+
async initCheckoutSessionWithVariants(offerId, lineItems, returnUrl) {
|
|
11311
|
+
const response = await this.apiClient.post("/api/v1/offers/".concat(offerId, "/transform-to-checkout"), {
|
|
11312
|
+
offerId,
|
|
11313
|
+
lineItems,
|
|
11314
|
+
returnUrl: returnUrl || (typeof window !== "undefined" ? window.location.href : "")
|
|
11315
|
+
});
|
|
11316
|
+
return { checkoutSessionId: response.checkoutSessionId };
|
|
11317
|
+
}
|
|
11318
|
+
/**
|
|
11319
|
+
* Get order summary for a checkout session
|
|
11320
|
+
*/
|
|
11321
|
+
async getOrderSummary(sessionId, includeVariantOptions = false) {
|
|
11322
|
+
return this.apiClient.post("/api/v1/checkout-sessions/".concat(sessionId, "/order-summary"), {
|
|
11323
|
+
includeVariantOptions
|
|
11324
|
+
});
|
|
11325
|
+
}
|
|
11326
|
+
/**
|
|
11327
|
+
* Update line items for a checkout session
|
|
11328
|
+
*/
|
|
11329
|
+
async updateLineItems(sessionId, lineItems) {
|
|
11330
|
+
return this.apiClient.post("/api/v1/checkout-sessions/".concat(sessionId, "/line-items"), {
|
|
11331
|
+
lineItems
|
|
11332
|
+
});
|
|
11333
|
+
}
|
|
11334
|
+
};
|
|
11335
|
+
|
|
10858
11336
|
// src/v2/core/resources/expressPaymentMethods.ts
|
|
10859
11337
|
var ExpressPaymentMethodsResource = class {
|
|
10860
11338
|
constructor(apiClient) {
|
|
@@ -10896,6 +11374,38 @@ var TagadaSDKBundle = (() => {
|
|
|
10896
11374
|
}
|
|
10897
11375
|
};
|
|
10898
11376
|
|
|
11377
|
+
// src/v2/core/resources/geo.ts
|
|
11378
|
+
var GeoResource = class {
|
|
11379
|
+
constructor(apiClient) {
|
|
11380
|
+
this.apiClient = apiClient;
|
|
11381
|
+
}
|
|
11382
|
+
/**
|
|
11383
|
+
* Get geolocation data from the visitor's IP address
|
|
11384
|
+
*/
|
|
11385
|
+
async getGeoLocation() {
|
|
11386
|
+
return this.apiClient.get("/api/v1/geo");
|
|
11387
|
+
}
|
|
11388
|
+
/**
|
|
11389
|
+
* Get geolocation data for a specific IP address
|
|
11390
|
+
*/
|
|
11391
|
+
async getGeoLocationByIp(ip) {
|
|
11392
|
+
return this.apiClient.get("/api/v1/geo?ip=".concat(encodeURIComponent(ip)));
|
|
11393
|
+
}
|
|
11394
|
+
/**
|
|
11395
|
+
* Convenience: get just the country code from IP geolocation
|
|
11396
|
+
* Returns ISO 3166-1 alpha-2 code (e.g. 'US', 'FR') or null
|
|
11397
|
+
*/
|
|
11398
|
+
async detectCountry() {
|
|
11399
|
+
try {
|
|
11400
|
+
const data = await this.getGeoLocation();
|
|
11401
|
+
const code = data == null ? void 0 : data.country_code;
|
|
11402
|
+
return code && typeof code === "string" && code.length === 2 ? code : null;
|
|
11403
|
+
} catch (e) {
|
|
11404
|
+
return null;
|
|
11405
|
+
}
|
|
11406
|
+
}
|
|
11407
|
+
};
|
|
11408
|
+
|
|
10899
11409
|
// src/v2/core/resources/threeds.ts
|
|
10900
11410
|
var ThreedsResource = class {
|
|
10901
11411
|
constructor(apiClient) {
|
|
@@ -11297,26 +11807,6 @@ var TagadaSDKBundle = (() => {
|
|
|
11297
11807
|
};
|
|
11298
11808
|
|
|
11299
11809
|
// src/v2/core/utils/currency.ts
|
|
11300
|
-
function formatMoney(amountMinorUnits, currencyCode = "USD", locale = "en-US") {
|
|
11301
|
-
const decimalPlaces = CurrencyUtils.getDecimalPlaces(currencyCode);
|
|
11302
|
-
let value;
|
|
11303
|
-
if (decimalPlaces === 0) {
|
|
11304
|
-
value = amountMinorUnits / 100;
|
|
11305
|
-
} else {
|
|
11306
|
-
value = amountMinorUnits / Math.pow(10, decimalPlaces);
|
|
11307
|
-
}
|
|
11308
|
-
try {
|
|
11309
|
-
return new Intl.NumberFormat(locale, {
|
|
11310
|
-
style: "currency",
|
|
11311
|
-
currency: currencyCode,
|
|
11312
|
-
minimumFractionDigits: decimalPlaces,
|
|
11313
|
-
maximumFractionDigits: decimalPlaces
|
|
11314
|
-
}).format(value);
|
|
11315
|
-
} catch (e) {
|
|
11316
|
-
const symbol = CurrencyUtils.getCurrencySymbol(currencyCode);
|
|
11317
|
-
return "".concat(symbol).concat(value.toFixed(decimalPlaces));
|
|
11318
|
-
}
|
|
11319
|
-
}
|
|
11320
11810
|
var CurrencyUtils = class _CurrencyUtils {
|
|
11321
11811
|
/**
|
|
11322
11812
|
* Get currency from context or fallback to default
|
|
@@ -11826,6 +12316,11 @@ var TagadaSDKBundle = (() => {
|
|
|
11826
12316
|
};
|
|
11827
12317
|
}
|
|
11828
12318
|
|
|
12319
|
+
// src/v2/core/utils/metaEventId.ts
|
|
12320
|
+
function makeMetaEventId(eventName, entityId) {
|
|
12321
|
+
return "".concat(eventName, "_").concat(entityId);
|
|
12322
|
+
}
|
|
12323
|
+
|
|
11829
12324
|
// src/v2/core/pathRemapping.ts
|
|
11830
12325
|
var import_path_to_regexp = __toESM(require_dist());
|
|
11831
12326
|
var internalPathCache = void 0;
|
|
@@ -12212,8 +12707,8 @@ var TagadaSDKBundle = (() => {
|
|
|
12212
12707
|
this.btInitPromise = (async () => {
|
|
12213
12708
|
try {
|
|
12214
12709
|
const apiKey = getBasisTheoryApiKey();
|
|
12215
|
-
const { BasisTheory } = await Promise.resolve().then(() => __toESM(require_basis_theory_js()));
|
|
12216
|
-
const bt = await new
|
|
12710
|
+
const { BasisTheory: BasisTheory2 } = await Promise.resolve().then(() => __toESM(require_basis_theory_js()));
|
|
12711
|
+
const bt = await new BasisTheory2().init(apiKey, { elements: false });
|
|
12217
12712
|
this.basisTheory = bt;
|
|
12218
12713
|
console.log("[PaymentService] BasisTheory initialized");
|
|
12219
12714
|
return this.basisTheory;
|
|
@@ -12322,7 +12817,7 @@ var TagadaSDKBundle = (() => {
|
|
|
12322
12817
|
* Shared by processCardPayment, processApplePayPayment, etc.
|
|
12323
12818
|
*/
|
|
12324
12819
|
async processAndHandle(checkoutSessionId, paymentInstrumentId, threedsSessionId, extra) {
|
|
12325
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
12820
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
12326
12821
|
const paymentFlowId = getAssignedPaymentFlowId();
|
|
12327
12822
|
const response = await this.paymentsResource.processPaymentDirect(
|
|
12328
12823
|
checkoutSessionId,
|
|
@@ -12333,7 +12828,8 @@ var TagadaSDKBundle = (() => {
|
|
|
12333
12828
|
source: (extra == null ? void 0 : extra.source) || "checkout",
|
|
12334
12829
|
paymentFlowId,
|
|
12335
12830
|
processorId: extra == null ? void 0 : extra.processorId,
|
|
12336
|
-
paymentMethod: extra == null ? void 0 : extra.paymentMethod
|
|
12831
|
+
paymentMethod: extra == null ? void 0 : extra.paymentMethod,
|
|
12832
|
+
shippingRateId: extra == null ? void 0 : extra.shippingRateId
|
|
12337
12833
|
}
|
|
12338
12834
|
);
|
|
12339
12835
|
console.log("[PaymentService] Payment response:", {
|
|
@@ -12343,13 +12839,26 @@ var TagadaSDKBundle = (() => {
|
|
|
12343
12839
|
});
|
|
12344
12840
|
(_f = (_e = this.callbacks).onCurrentPaymentId) == null ? void 0 : _f.call(_e, ((_d = response.payment) == null ? void 0 : _d.id) || null);
|
|
12345
12841
|
if (response.payment.requireAction !== "none") {
|
|
12346
|
-
|
|
12347
|
-
|
|
12842
|
+
if (response.payment.requireAction === "error" || response.payment.status === "declined" || response.payment.status === "failed") {
|
|
12843
|
+
const msg = ((_g = response.payment.requireActionData) == null ? void 0 : _g.message) || ((_h = response.payment.error) == null ? void 0 : _h.message) || "Payment declined";
|
|
12844
|
+
(_j = (_i = this.callbacks).onError) == null ? void 0 : _j.call(_i, msg);
|
|
12845
|
+
(_l = (_k = this.callbacks).onProcessing) == null ? void 0 : _l.call(_k, false);
|
|
12846
|
+
return { success: false, error: msg, payment: response.payment, order: response.order };
|
|
12847
|
+
}
|
|
12848
|
+
const outcome = await this.handlePaymentAction(response.payment);
|
|
12849
|
+
const settled = this.settleActionOutcome(outcome, response.payment, response.order);
|
|
12850
|
+
if (settled) return settled;
|
|
12348
12851
|
}
|
|
12349
12852
|
if (response.payment.status === "succeeded") {
|
|
12350
|
-
(
|
|
12853
|
+
(_n = (_m = this.callbacks).onProcessing) == null ? void 0 : _n.call(_m, false);
|
|
12351
12854
|
return { success: true, payment: response.payment, order: response.order };
|
|
12352
12855
|
}
|
|
12856
|
+
if (response.payment.status === "declined" || response.payment.status === "failed") {
|
|
12857
|
+
const msg = ((_o = response.payment.error) == null ? void 0 : _o.message) || "Payment declined";
|
|
12858
|
+
(_q = (_p = this.callbacks).onError) == null ? void 0 : _q.call(_p, msg);
|
|
12859
|
+
(_s = (_r = this.callbacks).onProcessing) == null ? void 0 : _s.call(_r, false);
|
|
12860
|
+
return { success: false, error: msg, payment: response.payment, order: response.order };
|
|
12861
|
+
}
|
|
12353
12862
|
return new Promise((resolve) => {
|
|
12354
12863
|
this.startPolling(response.payment.id, {
|
|
12355
12864
|
onSuccess: (payment) => {
|
|
@@ -12363,14 +12872,39 @@ var TagadaSDKBundle = (() => {
|
|
|
12363
12872
|
(_d2 = (_c2 = this.callbacks).onProcessing) == null ? void 0 : _d2.call(_c2, false);
|
|
12364
12873
|
resolve({ success: false, error });
|
|
12365
12874
|
},
|
|
12366
|
-
onRequireAction: (payment) => {
|
|
12367
|
-
|
|
12875
|
+
onRequireAction: async (payment) => {
|
|
12876
|
+
var _a2, _b2;
|
|
12877
|
+
const outcome = await this.handlePaymentAction(payment);
|
|
12878
|
+
const settled = this.settleActionOutcome(outcome, payment, response.order);
|
|
12879
|
+
if (settled) {
|
|
12880
|
+
(_b2 = (_a2 = this.callbacks).onProcessing) == null ? void 0 : _b2.call(_a2, false);
|
|
12881
|
+
resolve(settled);
|
|
12882
|
+
}
|
|
12368
12883
|
}
|
|
12369
12884
|
});
|
|
12370
12885
|
});
|
|
12371
12886
|
}
|
|
12887
|
+
/**
|
|
12888
|
+
* Translate an ActionOutcome into a PaymentResult, or null when the outcome
|
|
12889
|
+
* is 'pending' (caller should keep polling instead of resolving).
|
|
12890
|
+
*/
|
|
12891
|
+
settleActionOutcome(outcome, payment, order) {
|
|
12892
|
+
var _a;
|
|
12893
|
+
switch (outcome.kind) {
|
|
12894
|
+
case "redirected":
|
|
12895
|
+
return { success: true, payment, order, redirecting: true };
|
|
12896
|
+
case "completed":
|
|
12897
|
+
return { success: true, payment: outcome.payment, order };
|
|
12898
|
+
case "failed":
|
|
12899
|
+
return { success: false, error: outcome.error, payment: (_a = outcome.payment) != null ? _a : payment, order };
|
|
12900
|
+
case "pending":
|
|
12901
|
+
return null;
|
|
12902
|
+
}
|
|
12903
|
+
}
|
|
12372
12904
|
/**
|
|
12373
12905
|
* After radar / completePaymentAfterAction, handle the resumed payment.
|
|
12906
|
+
* Fires callbacks for side effects AND returns an outcome so the caller
|
|
12907
|
+
* (handlePaymentAction) can propagate failure into PaymentResult.
|
|
12374
12908
|
*/
|
|
12375
12909
|
async handleResumedPayment(resumedPayment) {
|
|
12376
12910
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
@@ -12379,16 +12913,15 @@ var TagadaSDKBundle = (() => {
|
|
|
12379
12913
|
(_d = (_c = this.callbacks).onError) == null ? void 0 : _d.call(_c, errorMsg);
|
|
12380
12914
|
(_f = (_e = this.callbacks).onProcessing) == null ? void 0 : _f.call(_e, false);
|
|
12381
12915
|
(_h = (_g = this.callbacks).onFailure) == null ? void 0 : _h.call(_g, errorMsg);
|
|
12382
|
-
return;
|
|
12916
|
+
return { kind: "failed", error: errorMsg, payment: resumedPayment };
|
|
12383
12917
|
}
|
|
12384
12918
|
if (resumedPayment.status === "succeeded") {
|
|
12385
12919
|
(_j = (_i = this.callbacks).onProcessing) == null ? void 0 : _j.call(_i, false);
|
|
12386
12920
|
(_l = (_k = this.callbacks).onSuccess) == null ? void 0 : _l.call(_k, resumedPayment);
|
|
12387
|
-
return;
|
|
12921
|
+
return { kind: "completed", payment: resumedPayment };
|
|
12388
12922
|
}
|
|
12389
12923
|
if (resumedPayment.requireAction !== "none" && resumedPayment.requireActionData) {
|
|
12390
|
-
|
|
12391
|
-
return;
|
|
12924
|
+
return this.handlePaymentAction(resumedPayment);
|
|
12392
12925
|
}
|
|
12393
12926
|
this.startPolling(resumedPayment.id, {
|
|
12394
12927
|
onSuccess: (p) => {
|
|
@@ -12405,16 +12938,17 @@ var TagadaSDKBundle = (() => {
|
|
|
12405
12938
|
void this.handlePaymentAction(p);
|
|
12406
12939
|
}
|
|
12407
12940
|
});
|
|
12941
|
+
return { kind: "pending" };
|
|
12408
12942
|
}
|
|
12409
12943
|
// ==========================================================================
|
|
12410
12944
|
// PAYMENT ACTION HANDLER (mirrors usePaymentActionHandler)
|
|
12411
12945
|
// ==========================================================================
|
|
12412
12946
|
async handlePaymentAction(payment) {
|
|
12413
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
12414
|
-
if (payment.requireAction === "none") return;
|
|
12415
|
-
if ((_a = payment.requireActionData) == null ? void 0 : _a.processed) return;
|
|
12947
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
12948
|
+
if (payment.requireAction === "none") return { kind: "pending" };
|
|
12949
|
+
if ((_a = payment.requireActionData) == null ? void 0 : _a.processed) return { kind: "pending" };
|
|
12416
12950
|
const actionData = payment.requireActionData;
|
|
12417
|
-
if (!actionData) return;
|
|
12951
|
+
if (!actionData) return { kind: "pending" };
|
|
12418
12952
|
try {
|
|
12419
12953
|
await this.paymentsResource.markPaymentActionProcessed(payment.id);
|
|
12420
12954
|
} catch (e) {
|
|
@@ -12426,47 +12960,57 @@ var TagadaSDKBundle = (() => {
|
|
|
12426
12960
|
const redirectUrl = ((_c = (_b = actionData.metadata) == null ? void 0 : _b.redirect) == null ? void 0 : _c.redirectUrl) || actionData.redirectUrl || actionData.url;
|
|
12427
12961
|
if (redirectUrl) {
|
|
12428
12962
|
console.log("[PaymentService] Redirecting:", redirectUrl);
|
|
12963
|
+
if (this.callbacks.onBeforeRedirect) {
|
|
12964
|
+
await this.callbacks.onBeforeRedirect(payment, redirectUrl);
|
|
12965
|
+
}
|
|
12429
12966
|
window.location.href = redirectUrl;
|
|
12430
|
-
|
|
12967
|
+
return { kind: "redirected" };
|
|
12968
|
+
}
|
|
12969
|
+
if (payment.status === "succeeded") {
|
|
12431
12970
|
(_e = (_d = this.callbacks).onProcessing) == null ? void 0 : _e.call(_d, false);
|
|
12432
12971
|
(_g = (_f = this.callbacks).onSuccess) == null ? void 0 : _g.call(_f, payment);
|
|
12972
|
+
return { kind: "completed", payment };
|
|
12433
12973
|
}
|
|
12434
|
-
|
|
12974
|
+
const noUrlMsg = "Payment redirect URL missing";
|
|
12975
|
+
(_i = (_h = this.callbacks).onError) == null ? void 0 : _i.call(_h, noUrlMsg);
|
|
12976
|
+
(_k = (_j = this.callbacks).onProcessing) == null ? void 0 : _k.call(_j, false);
|
|
12977
|
+
return { kind: "failed", error: noUrlMsg, payment };
|
|
12435
12978
|
}
|
|
12436
12979
|
case "threeds_auth": {
|
|
12437
|
-
const session = (
|
|
12980
|
+
const session = (_l = actionData.metadata) == null ? void 0 : _l.threedsSession;
|
|
12438
12981
|
if (session == null ? void 0 : session.acsChallengeUrl) {
|
|
12439
12982
|
console.log("[PaymentService] 3DS challenge redirect:", session.acsChallengeUrl);
|
|
12440
12983
|
window.location.href = session.acsChallengeUrl;
|
|
12984
|
+
return { kind: "redirected" };
|
|
12441
12985
|
}
|
|
12442
|
-
|
|
12986
|
+
const noUrlMsg = "3DS challenge URL missing";
|
|
12987
|
+
(_n = (_m = this.callbacks).onError) == null ? void 0 : _n.call(_m, noUrlMsg);
|
|
12988
|
+
(_p = (_o = this.callbacks).onProcessing) == null ? void 0 : _p.call(_o, false);
|
|
12989
|
+
return { kind: "failed", error: noUrlMsg, payment };
|
|
12443
12990
|
}
|
|
12444
12991
|
case "error": {
|
|
12445
12992
|
const msg = actionData.message || "Payment action failed";
|
|
12446
|
-
(
|
|
12447
|
-
(
|
|
12448
|
-
|
|
12993
|
+
(_r = (_q = this.callbacks).onError) == null ? void 0 : _r.call(_q, msg);
|
|
12994
|
+
(_t = (_s = this.callbacks).onProcessing) == null ? void 0 : _t.call(_s, false);
|
|
12995
|
+
return { kind: "failed", error: msg, payment };
|
|
12449
12996
|
}
|
|
12450
12997
|
case "kesspay_auth":
|
|
12451
|
-
this.handleKessPayAuth(actionData);
|
|
12452
|
-
break;
|
|
12998
|
+
return this.handleKessPayAuth(actionData);
|
|
12453
12999
|
case "trustflow_auth":
|
|
12454
|
-
this.handleTrustFlowAuth(actionData);
|
|
12455
|
-
break;
|
|
13000
|
+
return this.handleTrustFlowAuth(actionData);
|
|
12456
13001
|
case "finix_radar":
|
|
12457
|
-
|
|
12458
|
-
break;
|
|
13002
|
+
return this.handleFinixRadar(payment, actionData);
|
|
12459
13003
|
case "stripe_radar":
|
|
12460
|
-
|
|
12461
|
-
break;
|
|
13004
|
+
return this.handleStripeRadar(payment, actionData);
|
|
12462
13005
|
case "radar":
|
|
12463
|
-
if (((
|
|
12464
|
-
|
|
13006
|
+
if (((_u = actionData.metadata) == null ? void 0 : _u.provider) === "airwallex") {
|
|
13007
|
+
return this.handleAirwallexRadar(payment, actionData);
|
|
12465
13008
|
}
|
|
12466
|
-
|
|
13009
|
+
return { kind: "pending" };
|
|
12467
13010
|
case "mastercard_auth":
|
|
12468
|
-
|
|
12469
|
-
|
|
13011
|
+
return this.handleMasterCardAuth(payment, actionData);
|
|
13012
|
+
case "ngenius_3ds":
|
|
13013
|
+
return this.handleNgeniusThreeds(payment, actionData);
|
|
12470
13014
|
default: {
|
|
12471
13015
|
console.log("[PaymentService] Unhandled action, starting polling:", actionData.type);
|
|
12472
13016
|
this.startPolling(payment.id, {
|
|
@@ -12484,7 +13028,7 @@ var TagadaSDKBundle = (() => {
|
|
|
12484
13028
|
void this.handlePaymentAction(p);
|
|
12485
13029
|
}
|
|
12486
13030
|
});
|
|
12487
|
-
|
|
13031
|
+
return { kind: "pending" };
|
|
12488
13032
|
}
|
|
12489
13033
|
}
|
|
12490
13034
|
}
|
|
@@ -12495,9 +13039,10 @@ var TagadaSDKBundle = (() => {
|
|
|
12495
13039
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
12496
13040
|
const threeDSData = (_a = actionData == null ? void 0 : actionData.metadata) == null ? void 0 : _a.threeds;
|
|
12497
13041
|
if (!(threeDSData == null ? void 0 : threeDSData.challengeHtml)) {
|
|
12498
|
-
|
|
13042
|
+
const msg = "Missing KessPay 3DS challenge HTML";
|
|
13043
|
+
(_c = (_b = this.callbacks).onError) == null ? void 0 : _c.call(_b, msg);
|
|
12499
13044
|
(_e = (_d = this.callbacks).onProcessing) == null ? void 0 : _e.call(_d, false);
|
|
12500
|
-
return;
|
|
13045
|
+
return { kind: "failed", error: msg };
|
|
12501
13046
|
}
|
|
12502
13047
|
try {
|
|
12503
13048
|
(_g = (_f = this.callbacks).onProcessing) == null ? void 0 : _g.call(_f, false);
|
|
@@ -12523,9 +13068,12 @@ var TagadaSDKBundle = (() => {
|
|
|
12523
13068
|
document.write(threeDSData.challengeHtml);
|
|
12524
13069
|
document.close();
|
|
12525
13070
|
}
|
|
13071
|
+
return { kind: "redirected" };
|
|
12526
13072
|
} catch (error) {
|
|
12527
|
-
|
|
13073
|
+
const msg = error instanceof Error ? error.message : "KessPay 3DS failed";
|
|
13074
|
+
(_i = (_h = this.callbacks).onError) == null ? void 0 : _i.call(_h, msg);
|
|
12528
13075
|
(_k = (_j = this.callbacks).onProcessing) == null ? void 0 : _k.call(_j, false);
|
|
13076
|
+
return { kind: "failed", error: msg };
|
|
12529
13077
|
}
|
|
12530
13078
|
}
|
|
12531
13079
|
// --------------------------------------------------------------------------
|
|
@@ -12535,9 +13083,10 @@ var TagadaSDKBundle = (() => {
|
|
|
12535
13083
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
12536
13084
|
const authData = (_a = actionData == null ? void 0 : actionData.metadata) == null ? void 0 : _a.trustflow;
|
|
12537
13085
|
if (!(authData == null ? void 0 : authData.appId) || !(authData == null ? void 0 : authData.txnId) || !(authData == null ? void 0 : authData.hash)) {
|
|
12538
|
-
|
|
13086
|
+
const msg = "Missing Trust Flow 3DS data";
|
|
13087
|
+
(_c = (_b = this.callbacks).onError) == null ? void 0 : _c.call(_b, msg);
|
|
12539
13088
|
(_e = (_d = this.callbacks).onProcessing) == null ? void 0 : _e.call(_d, false);
|
|
12540
|
-
return;
|
|
13089
|
+
return { kind: "failed", error: msg };
|
|
12541
13090
|
}
|
|
12542
13091
|
try {
|
|
12543
13092
|
(_g = (_f = this.callbacks).onProcessing) == null ? void 0 : _g.call(_f, false);
|
|
@@ -12554,9 +13103,12 @@ var TagadaSDKBundle = (() => {
|
|
|
12554
13103
|
}
|
|
12555
13104
|
document.body.appendChild(form);
|
|
12556
13105
|
form.submit();
|
|
13106
|
+
return { kind: "redirected" };
|
|
12557
13107
|
} catch (error) {
|
|
12558
|
-
|
|
13108
|
+
const msg = error instanceof Error ? error.message : "Trust Flow 3DS failed";
|
|
13109
|
+
(_i = (_h = this.callbacks).onError) == null ? void 0 : _i.call(_h, msg);
|
|
12559
13110
|
(_k = (_j = this.callbacks).onProcessing) == null ? void 0 : _k.call(_j, false);
|
|
13111
|
+
return { kind: "failed", error: msg };
|
|
12560
13112
|
}
|
|
12561
13113
|
}
|
|
12562
13114
|
// --------------------------------------------------------------------------
|
|
@@ -12566,9 +13118,10 @@ var TagadaSDKBundle = (() => {
|
|
|
12566
13118
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
12567
13119
|
const radarConfig = (_a = actionData.metadata) == null ? void 0 : _a.radar;
|
|
12568
13120
|
if (!radarConfig) {
|
|
12569
|
-
|
|
13121
|
+
const msg = "Finix radar config missing";
|
|
13122
|
+
(_c = (_b = this.callbacks).onError) == null ? void 0 : _c.call(_b, msg);
|
|
12570
13123
|
(_e = (_d = this.callbacks).onProcessing) == null ? void 0 : _e.call(_d, false);
|
|
12571
|
-
return;
|
|
13124
|
+
return { kind: "failed", error: msg, payment };
|
|
12572
13125
|
}
|
|
12573
13126
|
try {
|
|
12574
13127
|
await this.loadScript("https://js.finix.com/v/1/finix.js", () => {
|
|
@@ -12599,10 +13152,12 @@ var TagadaSDKBundle = (() => {
|
|
|
12599
13152
|
}
|
|
12600
13153
|
});
|
|
12601
13154
|
const resumed = await this.paymentsResource.completePaymentAfterAction(payment.id);
|
|
12602
|
-
await this.handleResumedPayment(resumed);
|
|
13155
|
+
return await this.handleResumedPayment(resumed);
|
|
12603
13156
|
} catch (error) {
|
|
12604
|
-
|
|
13157
|
+
const msg = error instanceof Error ? error.message : "Finix radar failed";
|
|
13158
|
+
(_g = (_f = this.callbacks).onError) == null ? void 0 : _g.call(_f, msg);
|
|
12605
13159
|
(_i = (_h = this.callbacks).onProcessing) == null ? void 0 : _i.call(_h, false);
|
|
13160
|
+
return { kind: "failed", error: msg, payment };
|
|
12606
13161
|
}
|
|
12607
13162
|
}
|
|
12608
13163
|
// --------------------------------------------------------------------------
|
|
@@ -12612,9 +13167,10 @@ var TagadaSDKBundle = (() => {
|
|
|
12612
13167
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
12613
13168
|
const radarConfig = (_a = actionData.metadata) == null ? void 0 : _a.radar;
|
|
12614
13169
|
if (!(radarConfig == null ? void 0 : radarConfig.publishableKey)) {
|
|
12615
|
-
|
|
13170
|
+
const msg = "Stripe radar config missing";
|
|
13171
|
+
(_c = (_b = this.callbacks).onError) == null ? void 0 : _c.call(_b, msg);
|
|
12616
13172
|
(_e = (_d = this.callbacks).onProcessing) == null ? void 0 : _e.call(_d, false);
|
|
12617
|
-
return;
|
|
13173
|
+
return { kind: "failed", error: msg, payment };
|
|
12618
13174
|
}
|
|
12619
13175
|
try {
|
|
12620
13176
|
await this.loadScript("https://js.stripe.com/v3/", () => typeof window.Stripe === "function");
|
|
@@ -12628,10 +13184,60 @@ var TagadaSDKBundle = (() => {
|
|
|
12628
13184
|
stripeRadarSessionData: result.radarSession
|
|
12629
13185
|
});
|
|
12630
13186
|
const resumed = await this.paymentsResource.completePaymentAfterAction(payment.id);
|
|
12631
|
-
await this.handleResumedPayment(resumed);
|
|
13187
|
+
return await this.handleResumedPayment(resumed);
|
|
13188
|
+
} catch (error) {
|
|
13189
|
+
const msg = error instanceof Error ? error.message : "Stripe radar failed";
|
|
13190
|
+
(_g = (_f = this.callbacks).onError) == null ? void 0 : _g.call(_f, msg);
|
|
13191
|
+
(_i = (_h = this.callbacks).onProcessing) == null ? void 0 : _i.call(_h, false);
|
|
13192
|
+
return { kind: "failed", error: msg, payment };
|
|
13193
|
+
}
|
|
13194
|
+
}
|
|
13195
|
+
// --------------------------------------------------------------------------
|
|
13196
|
+
// N-Genius 3DS (WebSDK)
|
|
13197
|
+
// --------------------------------------------------------------------------
|
|
13198
|
+
async handleNgeniusThreeds(payment, actionData) {
|
|
13199
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
13200
|
+
const sdk = (_a = actionData.metadata) == null ? void 0 : _a.sdk;
|
|
13201
|
+
if (!(sdk == null ? void 0 : sdk.paymentResponse) || !sdk.orderReference || !sdk.paymentReference) {
|
|
13202
|
+
const msg = "N-Genius 3DS: missing SDK metadata";
|
|
13203
|
+
(_c = (_b = this.callbacks).onError) == null ? void 0 : _c.call(_b, msg);
|
|
13204
|
+
(_e = (_d = this.callbacks).onProcessing) == null ? void 0 : _e.call(_d, false);
|
|
13205
|
+
return { kind: "failed", error: msg, payment };
|
|
13206
|
+
}
|
|
13207
|
+
try {
|
|
13208
|
+
const sdkUrl = sdk.isSandboxed ? "https://paypage.sandbox.ngenius-payments.com/hosted-sessions/sdk.js" : "https://paypage.ngenius-payments.com/hosted-sessions/sdk.js";
|
|
13209
|
+
if (!document.getElementById("ngenius-websdk")) {
|
|
13210
|
+
await new Promise((resolve, reject) => {
|
|
13211
|
+
const script = document.createElement("script");
|
|
13212
|
+
script.id = "ngenius-websdk";
|
|
13213
|
+
script.src = sdkUrl;
|
|
13214
|
+
script.onload = () => resolve();
|
|
13215
|
+
script.onerror = () => reject(new Error("Failed to load N-Genius WebSDK"));
|
|
13216
|
+
document.head.appendChild(script);
|
|
13217
|
+
});
|
|
13218
|
+
}
|
|
13219
|
+
const NI = window.NI;
|
|
13220
|
+
if (!(NI == null ? void 0 : NI.handlePaymentResponse)) {
|
|
13221
|
+
throw new Error("N-Genius WebSDK did not expose window.NI.handlePaymentResponse");
|
|
13222
|
+
}
|
|
13223
|
+
console.log("[N-Genius 3DS] Starting WebSDK challenge");
|
|
13224
|
+
const outcome = await NI.handlePaymentResponse(
|
|
13225
|
+
sdk.paymentResponse,
|
|
13226
|
+
{ mountId: "ngenius-3ds-container", style: { width: "100%", height: 500 } }
|
|
13227
|
+
);
|
|
13228
|
+
console.log("[N-Genius 3DS] WebSDK outcome:", outcome.status);
|
|
13229
|
+
const completedPayment = await this.paymentsResource.ngeniusThreedsComplete({
|
|
13230
|
+
paymentId: payment.id,
|
|
13231
|
+
orderReference: sdk.orderReference,
|
|
13232
|
+
paymentReference: sdk.paymentReference
|
|
13233
|
+
});
|
|
13234
|
+
return await this.handleResumedPayment(completedPayment);
|
|
12632
13235
|
} catch (error) {
|
|
12633
|
-
|
|
13236
|
+
const msg = error instanceof Error ? error.message : "N-Genius 3DS failed";
|
|
13237
|
+
console.error("[N-Genius 3DS] Error:", error);
|
|
13238
|
+
(_g = (_f = this.callbacks).onError) == null ? void 0 : _g.call(_f, msg);
|
|
12634
13239
|
(_i = (_h = this.callbacks).onProcessing) == null ? void 0 : _i.call(_h, false);
|
|
13240
|
+
return { kind: "failed", error: msg, payment };
|
|
12635
13241
|
}
|
|
12636
13242
|
}
|
|
12637
13243
|
// --------------------------------------------------------------------------
|
|
@@ -12643,9 +13249,10 @@ var TagadaSDKBundle = (() => {
|
|
|
12643
13249
|
const orderId = (_b = payment.order) == null ? void 0 : _b.id;
|
|
12644
13250
|
const checkoutSessionId = (_c = payment.order) == null ? void 0 : _c.checkoutSessionId;
|
|
12645
13251
|
if (!orderId || !checkoutSessionId) {
|
|
12646
|
-
|
|
13252
|
+
const msg = "Missing order info for Airwallex radar";
|
|
13253
|
+
(_e = (_d = this.callbacks).onError) == null ? void 0 : _e.call(_d, msg);
|
|
12647
13254
|
(_g = (_f = this.callbacks).onProcessing) == null ? void 0 : _g.call(_f, false);
|
|
12648
|
-
return;
|
|
13255
|
+
return { kind: "failed", error: msg, payment };
|
|
12649
13256
|
}
|
|
12650
13257
|
try {
|
|
12651
13258
|
const sessionId = crypto.randomUUID();
|
|
@@ -12673,10 +13280,12 @@ var TagadaSDKBundle = (() => {
|
|
|
12673
13280
|
airwallexRadarSessionId: sessionId
|
|
12674
13281
|
});
|
|
12675
13282
|
const resumed = await this.paymentsResource.completePaymentAfterAction(payment.id);
|
|
12676
|
-
await this.handleResumedPayment(resumed);
|
|
13283
|
+
return await this.handleResumedPayment(resumed);
|
|
12677
13284
|
} catch (error) {
|
|
12678
|
-
|
|
13285
|
+
const msg = error instanceof Error ? error.message : "Airwallex radar failed";
|
|
13286
|
+
(_i = (_h = this.callbacks).onError) == null ? void 0 : _i.call(_h, msg);
|
|
12679
13287
|
(_k = (_j = this.callbacks).onProcessing) == null ? void 0 : _k.call(_j, false);
|
|
13288
|
+
return { kind: "failed", error: msg, payment };
|
|
12680
13289
|
}
|
|
12681
13290
|
}
|
|
12682
13291
|
// --------------------------------------------------------------------------
|
|
@@ -12686,9 +13295,10 @@ var TagadaSDKBundle = (() => {
|
|
|
12686
13295
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
12687
13296
|
const threeDSData = (_a = actionData == null ? void 0 : actionData.metadata) == null ? void 0 : _a.threeds;
|
|
12688
13297
|
if (!(threeDSData == null ? void 0 : threeDSData.sessionId) || !(threeDSData == null ? void 0 : threeDSData.merchantId)) {
|
|
12689
|
-
|
|
13298
|
+
const msg = "Missing MasterCard 3DS data";
|
|
13299
|
+
(_c = (_b = this.callbacks).onError) == null ? void 0 : _c.call(_b, msg);
|
|
12690
13300
|
(_e = (_d = this.callbacks).onProcessing) == null ? void 0 : _e.call(_d, false);
|
|
12691
|
-
return;
|
|
13301
|
+
return { kind: "failed", error: msg, payment };
|
|
12692
13302
|
}
|
|
12693
13303
|
try {
|
|
12694
13304
|
(_g = (_f = this.callbacks).onProcessing) == null ? void 0 : _g.call(_f, false);
|
|
@@ -12739,17 +13349,22 @@ var TagadaSDKBundle = (() => {
|
|
|
12739
13349
|
document.write(challengeHtml);
|
|
12740
13350
|
document.close();
|
|
12741
13351
|
}
|
|
12742
|
-
|
|
12743
|
-
|
|
12744
|
-
|
|
12745
|
-
|
|
12746
|
-
|
|
13352
|
+
return { kind: "redirected" };
|
|
13353
|
+
}
|
|
13354
|
+
if (threeDSData.paymentId) {
|
|
13355
|
+
const resumed = await this.paymentsResource.completePaymentAfterAction(threeDSData.paymentId);
|
|
13356
|
+
const cleanup2 = document.getElementById(containerId);
|
|
13357
|
+
if (cleanup2) cleanup2.remove();
|
|
13358
|
+
return await this.handleResumedPayment(resumed);
|
|
12747
13359
|
}
|
|
12748
13360
|
const cleanup = document.getElementById(containerId);
|
|
12749
13361
|
if (cleanup) cleanup.remove();
|
|
13362
|
+
return { kind: "pending" };
|
|
12750
13363
|
} catch (error) {
|
|
12751
|
-
|
|
13364
|
+
const msg = error instanceof Error ? error.message : "MasterCard 3DS failed";
|
|
13365
|
+
(_l = (_k = this.callbacks).onError) == null ? void 0 : _l.call(_k, msg);
|
|
12752
13366
|
(_n = (_m = this.callbacks).onProcessing) == null ? void 0 : _n.call(_m, false);
|
|
13367
|
+
return { kind: "failed", error: msg, payment };
|
|
12753
13368
|
}
|
|
12754
13369
|
}
|
|
12755
13370
|
// --------------------------------------------------------------------------
|
|
@@ -12959,7 +13574,7 @@ var TagadaSDKBundle = (() => {
|
|
|
12959
13574
|
// ==========================================================================
|
|
12960
13575
|
// PAYMENT PROCESSING (all methods)
|
|
12961
13576
|
// ==========================================================================
|
|
12962
|
-
async processCardPayment(checkoutSessionId, cardData) {
|
|
13577
|
+
async processCardPayment(checkoutSessionId, cardData, options) {
|
|
12963
13578
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
12964
13579
|
(_b = (_a = this.callbacks).onProcessing) == null ? void 0 : _b.call(_a, true);
|
|
12965
13580
|
(_d = (_c = this.callbacks).onError) == null ? void 0 : _d.call(_c, null);
|
|
@@ -12979,7 +13594,7 @@ var TagadaSDKBundle = (() => {
|
|
|
12979
13594
|
} catch (e) {
|
|
12980
13595
|
}
|
|
12981
13596
|
}
|
|
12982
|
-
return await this.processAndHandle(checkoutSessionId, instrument.id, threedsSessionId);
|
|
13597
|
+
return await this.processAndHandle(checkoutSessionId, instrument.id, threedsSessionId, { shippingRateId: options == null ? void 0 : options.shippingRateId });
|
|
12983
13598
|
} catch (error) {
|
|
12984
13599
|
const msg = error instanceof Error ? error.message : String(error);
|
|
12985
13600
|
(_g = (_f = this.callbacks).onError) == null ? void 0 : _g.call(_f, msg);
|
|
@@ -12987,13 +13602,13 @@ var TagadaSDKBundle = (() => {
|
|
|
12987
13602
|
return { success: false, error: msg };
|
|
12988
13603
|
}
|
|
12989
13604
|
}
|
|
12990
|
-
async processApplePayPayment(checkoutSessionId, applePayToken) {
|
|
13605
|
+
async processApplePayPayment(checkoutSessionId, applePayToken, options) {
|
|
12991
13606
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
12992
13607
|
(_b = (_a = this.callbacks).onProcessing) == null ? void 0 : _b.call(_a, true);
|
|
12993
13608
|
(_d = (_c = this.callbacks).onError) == null ? void 0 : _d.call(_c, null);
|
|
12994
13609
|
try {
|
|
12995
13610
|
const instrument = await this.createApplePayPaymentInstrument(applePayToken);
|
|
12996
|
-
return await this.processAndHandle(checkoutSessionId, instrument.id);
|
|
13611
|
+
return await this.processAndHandle(checkoutSessionId, instrument.id, void 0, { shippingRateId: options == null ? void 0 : options.shippingRateId });
|
|
12997
13612
|
} catch (error) {
|
|
12998
13613
|
const msg = error instanceof Error ? error.message : String(error);
|
|
12999
13614
|
(_f = (_e = this.callbacks).onError) == null ? void 0 : _f.call(_e, msg);
|
|
@@ -13001,13 +13616,13 @@ var TagadaSDKBundle = (() => {
|
|
|
13001
13616
|
return { success: false, error: msg };
|
|
13002
13617
|
}
|
|
13003
13618
|
}
|
|
13004
|
-
async processGooglePayPayment(checkoutSessionId, googlePayToken) {
|
|
13619
|
+
async processGooglePayPayment(checkoutSessionId, googlePayToken, options) {
|
|
13005
13620
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
13006
13621
|
(_b = (_a = this.callbacks).onProcessing) == null ? void 0 : _b.call(_a, true);
|
|
13007
13622
|
(_d = (_c = this.callbacks).onError) == null ? void 0 : _d.call(_c, null);
|
|
13008
13623
|
try {
|
|
13009
13624
|
const instrument = await this.createGooglePayPaymentInstrument(googlePayToken);
|
|
13010
|
-
return await this.processAndHandle(checkoutSessionId, instrument.id);
|
|
13625
|
+
return await this.processAndHandle(checkoutSessionId, instrument.id, void 0, { shippingRateId: options == null ? void 0 : options.shippingRateId });
|
|
13011
13626
|
} catch (error) {
|
|
13012
13627
|
const msg = error instanceof Error ? error.message : String(error);
|
|
13013
13628
|
(_f = (_e = this.callbacks).onError) == null ? void 0 : _f.call(_e, msg);
|
|
@@ -13015,12 +13630,12 @@ var TagadaSDKBundle = (() => {
|
|
|
13015
13630
|
return { success: false, error: msg };
|
|
13016
13631
|
}
|
|
13017
13632
|
}
|
|
13018
|
-
async processPaymentWithInstrument(checkoutSessionId, paymentInstrumentId) {
|
|
13633
|
+
async processPaymentWithInstrument(checkoutSessionId, paymentInstrumentId, options) {
|
|
13019
13634
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
13020
13635
|
(_b = (_a = this.callbacks).onProcessing) == null ? void 0 : _b.call(_a, true);
|
|
13021
13636
|
(_d = (_c = this.callbacks).onError) == null ? void 0 : _d.call(_c, null);
|
|
13022
13637
|
try {
|
|
13023
|
-
return await this.processAndHandle(checkoutSessionId, paymentInstrumentId);
|
|
13638
|
+
return await this.processAndHandle(checkoutSessionId, paymentInstrumentId, void 0, { shippingRateId: options == null ? void 0 : options.shippingRateId });
|
|
13024
13639
|
} catch (error) {
|
|
13025
13640
|
const msg = error instanceof Error ? error.message : String(error);
|
|
13026
13641
|
(_f = (_e = this.callbacks).onError) == null ? void 0 : _f.call(_e, msg);
|
|
@@ -13028,7 +13643,7 @@ var TagadaSDKBundle = (() => {
|
|
|
13028
13643
|
return { success: false, error: msg };
|
|
13029
13644
|
}
|
|
13030
13645
|
}
|
|
13031
|
-
async processApmPayment(checkoutSessionId, apmData) {
|
|
13646
|
+
async processApmPayment(checkoutSessionId, apmData, options) {
|
|
13032
13647
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
13033
13648
|
(_b = (_a = this.callbacks).onProcessing) == null ? void 0 : _b.call(_a, true);
|
|
13034
13649
|
(_d = (_c = this.callbacks).onError) == null ? void 0 : _d.call(_c, null);
|
|
@@ -13037,7 +13652,8 @@ var TagadaSDKBundle = (() => {
|
|
|
13037
13652
|
processorId: apmData.processorId,
|
|
13038
13653
|
paymentMethod: apmData.paymentMethod,
|
|
13039
13654
|
initiatedBy: apmData.initiatedBy,
|
|
13040
|
-
source: apmData.source
|
|
13655
|
+
source: apmData.source,
|
|
13656
|
+
shippingRateId: options == null ? void 0 : options.shippingRateId
|
|
13041
13657
|
});
|
|
13042
13658
|
} catch (error) {
|
|
13043
13659
|
const msg = error instanceof Error ? error.message : String(error);
|
|
@@ -13046,24 +13662,3059 @@ var TagadaSDKBundle = (() => {
|
|
|
13046
13662
|
return { success: false, error: msg };
|
|
13047
13663
|
}
|
|
13048
13664
|
}
|
|
13665
|
+
/**
|
|
13666
|
+
* Stripe Express Checkout Element payment.
|
|
13667
|
+
*
|
|
13668
|
+
* Mirrors the inline flow from `react/components/StripeExpressButton.onConfirm`:
|
|
13669
|
+
* 1. processPaymentDirect with isExpress=true → returns clientSecret
|
|
13670
|
+
* 2. stripe.confirmPayment(elements, clientSecret) — must run while wallet sheet is open
|
|
13671
|
+
* 3. Poll until webhook marks payment succeeded
|
|
13672
|
+
*
|
|
13673
|
+
* Used for ECE methods Stripe surfaces in one element: apple_pay, google_pay, link, klarna.
|
|
13674
|
+
* The `stripe` and `elements` refs come from Stripe React hooks at the call site.
|
|
13675
|
+
*/
|
|
13676
|
+
async processStripeExpressPayment(checkoutSessionId, paymentMethod, processorId, stripe, elements, options) {
|
|
13677
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
13678
|
+
(_b = (_a = this.callbacks).onProcessing) == null ? void 0 : _b.call(_a, true);
|
|
13679
|
+
(_d = (_c = this.callbacks).onError) == null ? void 0 : _d.call(_c, null);
|
|
13680
|
+
try {
|
|
13681
|
+
const paymentFlowId = getAssignedPaymentFlowId();
|
|
13682
|
+
const response = await this.paymentsResource.processPaymentDirect(
|
|
13683
|
+
checkoutSessionId,
|
|
13684
|
+
"",
|
|
13685
|
+
void 0,
|
|
13686
|
+
{
|
|
13687
|
+
processorId,
|
|
13688
|
+
paymentMethod,
|
|
13689
|
+
isExpress: true,
|
|
13690
|
+
paymentFlowId,
|
|
13691
|
+
shippingRateId: options == null ? void 0 : options.shippingRateId
|
|
13692
|
+
}
|
|
13693
|
+
);
|
|
13694
|
+
(_g = (_f = this.callbacks).onCurrentPaymentId) == null ? void 0 : _g.call(_f, ((_e = response.payment) == null ? void 0 : _e.id) || null);
|
|
13695
|
+
const clientSecret = (_k = (_j = (_i = (_h = response == null ? void 0 : response.payment) == null ? void 0 : _h.requireActionData) == null ? void 0 : _i.metadata) == null ? void 0 : _j.stripeExpressCheckout) == null ? void 0 : _k.clientSecret;
|
|
13696
|
+
if (!clientSecret) {
|
|
13697
|
+
const msg = "Express checkout configuration missing \u2014 no client secret returned";
|
|
13698
|
+
(_m = (_l = this.callbacks).onError) == null ? void 0 : _m.call(_l, msg);
|
|
13699
|
+
(_o = (_n = this.callbacks).onProcessing) == null ? void 0 : _o.call(_n, false);
|
|
13700
|
+
return { success: false, error: msg, payment: response.payment, order: response.order };
|
|
13701
|
+
}
|
|
13702
|
+
const { error: confirmError } = await stripe.confirmPayment({
|
|
13703
|
+
elements,
|
|
13704
|
+
clientSecret,
|
|
13705
|
+
confirmParams: { return_url: window.location.href },
|
|
13706
|
+
redirect: "if_required"
|
|
13707
|
+
});
|
|
13708
|
+
if (confirmError) {
|
|
13709
|
+
const msg = (_p = confirmError.message) != null ? _p : "Payment confirmation failed";
|
|
13710
|
+
(_r = (_q = this.callbacks).onError) == null ? void 0 : _r.call(_q, msg);
|
|
13711
|
+
(_t = (_s = this.callbacks).onProcessing) == null ? void 0 : _t.call(_s, false);
|
|
13712
|
+
return { success: false, error: msg, payment: response.payment, order: response.order };
|
|
13713
|
+
}
|
|
13714
|
+
const paymentId = response.payment.id;
|
|
13715
|
+
return await new Promise((resolve) => {
|
|
13716
|
+
const tick = async () => {
|
|
13717
|
+
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
13718
|
+
try {
|
|
13719
|
+
const payment = await this.paymentsResource.getPaymentStatus(paymentId);
|
|
13720
|
+
if (payment.status === "succeeded" || payment.status === "pending" && payment.subStatus === "authorized") {
|
|
13721
|
+
(_b2 = (_a2 = this.callbacks).onProcessing) == null ? void 0 : _b2.call(_a2, false);
|
|
13722
|
+
resolve({ success: true, payment, order: response.order });
|
|
13723
|
+
return;
|
|
13724
|
+
}
|
|
13725
|
+
if (payment.status !== "succeeded" && payment.status !== "pending") {
|
|
13726
|
+
const msg = payment.status || "Payment failed";
|
|
13727
|
+
(_d2 = (_c2 = this.callbacks).onError) == null ? void 0 : _d2.call(_c2, msg);
|
|
13728
|
+
(_f2 = (_e2 = this.callbacks).onProcessing) == null ? void 0 : _f2.call(_e2, false);
|
|
13729
|
+
resolve({ success: false, error: msg, payment, order: response.order });
|
|
13730
|
+
return;
|
|
13731
|
+
}
|
|
13732
|
+
setTimeout(tick, 1500);
|
|
13733
|
+
} catch (e) {
|
|
13734
|
+
setTimeout(tick, 1500);
|
|
13735
|
+
}
|
|
13736
|
+
};
|
|
13737
|
+
void tick();
|
|
13738
|
+
});
|
|
13739
|
+
} catch (error) {
|
|
13740
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
13741
|
+
(_v = (_u = this.callbacks).onError) == null ? void 0 : _v.call(_u, msg);
|
|
13742
|
+
(_x = (_w = this.callbacks).onProcessing) == null ? void 0 : _x.call(_w, false);
|
|
13743
|
+
return { success: false, error: msg };
|
|
13744
|
+
}
|
|
13745
|
+
}
|
|
13049
13746
|
};
|
|
13050
13747
|
|
|
13051
|
-
//
|
|
13052
|
-
|
|
13053
|
-
|
|
13054
|
-
|
|
13055
|
-
|
|
13056
|
-
|
|
13057
|
-
|
|
13058
|
-
|
|
13059
|
-
|
|
13060
|
-
|
|
13061
|
-
|
|
13062
|
-
|
|
13063
|
-
|
|
13064
|
-
|
|
13065
|
-
|
|
13066
|
-
|
|
13748
|
+
// ../core-js/dist/core/providers/BasisTheoryProvider.js
|
|
13749
|
+
var import_basis_theory_js = __toESM(require_basis_theory_js());
|
|
13750
|
+
|
|
13751
|
+
// ../core-js/dist/radar/types.js
|
|
13752
|
+
var AirwallexRadarErrorCode;
|
|
13753
|
+
(function(AirwallexRadarErrorCode2) {
|
|
13754
|
+
AirwallexRadarErrorCode2["SCRIPT_LOAD_FAILED"] = "SCRIPT_LOAD_FAILED";
|
|
13755
|
+
AirwallexRadarErrorCode2["SESSION_SAVE_FAILED"] = "SESSION_SAVE_FAILED";
|
|
13756
|
+
AirwallexRadarErrorCode2["RESUME_FAILED"] = "RESUME_FAILED";
|
|
13757
|
+
AirwallexRadarErrorCode2["NO_API_CLIENT"] = "NO_API_CLIENT";
|
|
13758
|
+
AirwallexRadarErrorCode2["SSR_NOT_SUPPORTED"] = "SSR_NOT_SUPPORTED";
|
|
13759
|
+
})(AirwallexRadarErrorCode || (AirwallexRadarErrorCode = {}));
|
|
13760
|
+
|
|
13761
|
+
// ../core-js/dist/payments/types.js
|
|
13762
|
+
var PaymentsClientErrorCode;
|
|
13763
|
+
(function(PaymentsClientErrorCode2) {
|
|
13764
|
+
PaymentsClientErrorCode2["CONTINUE_PAYMENT_FAILED"] = "CONTINUE_PAYMENT_FAILED";
|
|
13765
|
+
PaymentsClientErrorCode2["MISSING_PAYMENT_ID"] = "MISSING_PAYMENT_ID";
|
|
13766
|
+
})(PaymentsClientErrorCode || (PaymentsClientErrorCode = {}));
|
|
13767
|
+
|
|
13768
|
+
// ../core-js/dist/payments/apple-pay-service.js
|
|
13769
|
+
var APPLE_PAY_SDK_URL = "https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js";
|
|
13770
|
+
var APPLE_PAY_SESSION_VERSION = 3;
|
|
13771
|
+
var sdkLoadPromise = null;
|
|
13772
|
+
function loadApplePaySdk() {
|
|
13773
|
+
if (sdkLoadPromise)
|
|
13774
|
+
return sdkLoadPromise;
|
|
13775
|
+
if (typeof window === "undefined") {
|
|
13776
|
+
return Promise.reject(new Error("[ApplePayService] No window \u2014 not in browser"));
|
|
13777
|
+
}
|
|
13778
|
+
if (window.ApplePaySession) {
|
|
13779
|
+
sdkLoadPromise = Promise.resolve();
|
|
13780
|
+
return sdkLoadPromise;
|
|
13781
|
+
}
|
|
13782
|
+
const existing = document.querySelector('script[src="'.concat(APPLE_PAY_SDK_URL, '"]'));
|
|
13783
|
+
if (existing) {
|
|
13784
|
+
sdkLoadPromise = new Promise((resolve) => {
|
|
13785
|
+
if (window.ApplePaySession)
|
|
13786
|
+
return resolve();
|
|
13787
|
+
existing.addEventListener("load", () => resolve());
|
|
13788
|
+
const check = setInterval(() => {
|
|
13789
|
+
if (window.ApplePaySession) {
|
|
13790
|
+
clearInterval(check);
|
|
13791
|
+
resolve();
|
|
13792
|
+
}
|
|
13793
|
+
}, 100);
|
|
13794
|
+
setTimeout(() => {
|
|
13795
|
+
clearInterval(check);
|
|
13796
|
+
resolve();
|
|
13797
|
+
}, 5e3);
|
|
13798
|
+
});
|
|
13799
|
+
return sdkLoadPromise;
|
|
13800
|
+
}
|
|
13801
|
+
sdkLoadPromise = new Promise((resolve, reject) => {
|
|
13802
|
+
const script = document.createElement("script");
|
|
13803
|
+
script.src = APPLE_PAY_SDK_URL;
|
|
13804
|
+
script.crossOrigin = "anonymous";
|
|
13805
|
+
script.async = true;
|
|
13806
|
+
script.onload = () => resolve();
|
|
13807
|
+
script.onerror = () => {
|
|
13808
|
+
sdkLoadPromise = null;
|
|
13809
|
+
reject(new Error("[ApplePayService] Failed to load Apple Pay SDK"));
|
|
13810
|
+
};
|
|
13811
|
+
document.head.appendChild(script);
|
|
13812
|
+
});
|
|
13813
|
+
return sdkLoadPromise;
|
|
13814
|
+
}
|
|
13815
|
+
async function isApplePayAvailable() {
|
|
13816
|
+
try {
|
|
13817
|
+
await loadApplePaySdk();
|
|
13818
|
+
const ApplePaySession = window.ApplePaySession;
|
|
13819
|
+
return !!ApplePaySession && ApplePaySession.canMakePayments();
|
|
13820
|
+
} catch (e) {
|
|
13821
|
+
return false;
|
|
13822
|
+
}
|
|
13823
|
+
}
|
|
13824
|
+
async function validateMerchant(basisTheoryApiKey, displayName, domain) {
|
|
13825
|
+
const response = await fetch("https://api.basistheory.com/apple-pay/session", {
|
|
13826
|
+
method: "POST",
|
|
13827
|
+
headers: {
|
|
13828
|
+
"Content-Type": "application/json",
|
|
13829
|
+
"BT-API-KEY": basisTheoryApiKey
|
|
13830
|
+
},
|
|
13831
|
+
body: JSON.stringify({
|
|
13832
|
+
display_name: displayName,
|
|
13833
|
+
domain
|
|
13834
|
+
})
|
|
13835
|
+
});
|
|
13836
|
+
if (!response.ok) {
|
|
13837
|
+
throw new Error("[ApplePayService] Merchant validation failed: HTTP ".concat(response.status));
|
|
13838
|
+
}
|
|
13839
|
+
return response.json();
|
|
13840
|
+
}
|
|
13841
|
+
async function tokenizeApplePayPayment(basisTheoryApiKey, paymentToken) {
|
|
13842
|
+
const response = await fetch("https://api.basistheory.com/apple-pay", {
|
|
13843
|
+
method: "POST",
|
|
13844
|
+
headers: {
|
|
13845
|
+
"Content-Type": "application/json",
|
|
13846
|
+
"BT-API-KEY": basisTheoryApiKey
|
|
13847
|
+
},
|
|
13848
|
+
body: JSON.stringify({
|
|
13849
|
+
apple_payment_data: paymentToken
|
|
13850
|
+
})
|
|
13851
|
+
});
|
|
13852
|
+
if (!response.ok) {
|
|
13853
|
+
throw new Error("[ApplePayService] Tokenization failed: HTTP ".concat(response.status));
|
|
13854
|
+
}
|
|
13855
|
+
const result = await response.json();
|
|
13856
|
+
return result.apple_pay;
|
|
13857
|
+
}
|
|
13858
|
+
function minorToDecimal(amountMinor, currency) {
|
|
13859
|
+
const zeroDecimal = [
|
|
13860
|
+
"BIF",
|
|
13861
|
+
"CLP",
|
|
13862
|
+
"DJF",
|
|
13863
|
+
"GNF",
|
|
13864
|
+
"JPY",
|
|
13865
|
+
"KMF",
|
|
13866
|
+
"KRW",
|
|
13867
|
+
"MGA",
|
|
13868
|
+
"PYG",
|
|
13869
|
+
"RWF",
|
|
13870
|
+
"UGX",
|
|
13871
|
+
"VND",
|
|
13872
|
+
"VUV",
|
|
13873
|
+
"XAF",
|
|
13874
|
+
"XOF",
|
|
13875
|
+
"XPF"
|
|
13876
|
+
];
|
|
13877
|
+
if (zeroDecimal.includes(currency.toUpperCase())) {
|
|
13878
|
+
return String(amountMinor);
|
|
13879
|
+
}
|
|
13880
|
+
return (amountMinor / 100).toFixed(2);
|
|
13881
|
+
}
|
|
13882
|
+
function startApplePaySession(config, request, callbacks) {
|
|
13883
|
+
var _a, _b;
|
|
13884
|
+
const ApplePaySession = window.ApplePaySession;
|
|
13885
|
+
if (!ApplePaySession) {
|
|
13886
|
+
(_a = callbacks.onError) == null ? void 0 : _a.call(callbacks, "Apple Pay is not available on this device");
|
|
13887
|
+
return;
|
|
13888
|
+
}
|
|
13889
|
+
const countryCode = config.countryCode || "US";
|
|
13890
|
+
const storeName = config.storeName || "Store";
|
|
13891
|
+
const totalStr = minorToDecimal(request.totalAmountMinor, request.currency);
|
|
13892
|
+
const applePayRequest = {
|
|
13893
|
+
countryCode,
|
|
13894
|
+
currencyCode: request.currency,
|
|
13895
|
+
supportedNetworks: ["visa", "masterCard", "amex", "discover"],
|
|
13896
|
+
merchantCapabilities: ["supports3DS"],
|
|
13897
|
+
total: {
|
|
13898
|
+
label: storeName,
|
|
13899
|
+
amount: totalStr,
|
|
13900
|
+
type: "final"
|
|
13901
|
+
},
|
|
13902
|
+
requiredShippingContactFields: ["name", "phone", "email", "postalAddress"],
|
|
13903
|
+
requiredBillingContactFields: ["postalAddress"]
|
|
13904
|
+
};
|
|
13905
|
+
if (request.lineItems) {
|
|
13906
|
+
applePayRequest.lineItems = request.lineItems.map((li) => __spreadProps(__spreadValues({}, li), { type: "final" }));
|
|
13907
|
+
}
|
|
13908
|
+
if (request.shippingMethods) {
|
|
13909
|
+
applePayRequest.shippingMethods = request.shippingMethods;
|
|
13910
|
+
}
|
|
13911
|
+
if (request.supportedCountries && request.supportedCountries.length > 0) {
|
|
13912
|
+
applePayRequest.supportedCountries = request.supportedCountries.map((c) => c.toUpperCase());
|
|
13913
|
+
}
|
|
13914
|
+
try {
|
|
13915
|
+
const session = new ApplePaySession(APPLE_PAY_SESSION_VERSION, applePayRequest);
|
|
13916
|
+
session.onvalidatemerchant = () => {
|
|
13917
|
+
void (async () => {
|
|
13918
|
+
var _a2;
|
|
13919
|
+
try {
|
|
13920
|
+
const merchantSession = await validateMerchant(config.basisTheoryApiKey, storeName, window.location.host);
|
|
13921
|
+
session.completeMerchantValidation(merchantSession);
|
|
13922
|
+
} catch (err) {
|
|
13923
|
+
console.error("[ApplePayService] Merchant validation failed:", err);
|
|
13924
|
+
session.abort();
|
|
13925
|
+
(_a2 = callbacks.onError) == null ? void 0 : _a2.call(callbacks, "Merchant validation failed");
|
|
13926
|
+
}
|
|
13927
|
+
})();
|
|
13928
|
+
};
|
|
13929
|
+
session.onpaymentauthorized = (event) => {
|
|
13930
|
+
void (async () => {
|
|
13931
|
+
var _a2;
|
|
13932
|
+
try {
|
|
13933
|
+
const token = await tokenizeApplePayPayment(config.basisTheoryApiKey, event.payment.token);
|
|
13934
|
+
session.completePayment(ApplePaySession.STATUS_SUCCESS);
|
|
13935
|
+
await callbacks.onSuccess(token, {
|
|
13936
|
+
shipping: event.payment.shippingContact,
|
|
13937
|
+
billing: event.payment.billingContact
|
|
13938
|
+
});
|
|
13939
|
+
} catch (err) {
|
|
13940
|
+
console.error("[ApplePayService] Payment processing failed:", err);
|
|
13941
|
+
session.completePayment(ApplePaySession.STATUS_FAILURE);
|
|
13942
|
+
(_a2 = callbacks.onError) == null ? void 0 : _a2.call(callbacks, "Payment failed");
|
|
13943
|
+
}
|
|
13944
|
+
})();
|
|
13945
|
+
};
|
|
13946
|
+
if (callbacks.onShippingContactSelected) {
|
|
13947
|
+
session.onshippingcontactselected = (event) => {
|
|
13948
|
+
void (async () => {
|
|
13949
|
+
try {
|
|
13950
|
+
const result = await callbacks.onShippingContactSelected(event.shippingContact);
|
|
13951
|
+
if (!result) {
|
|
13952
|
+
session.abort();
|
|
13953
|
+
return;
|
|
13954
|
+
}
|
|
13955
|
+
if (result.errors && result.errors.length > 0) {
|
|
13956
|
+
const ApplePayErrorCtor = window.ApplePayError;
|
|
13957
|
+
const nativeErrors = result.errors.map((e) => ApplePayErrorCtor ? new ApplePayErrorCtor(e.code, e.contactField, e.message) : { code: e.code, contactField: e.contactField, message: e.message });
|
|
13958
|
+
session.completeShippingContactSelection({
|
|
13959
|
+
newTotal: __spreadProps(__spreadValues({}, result.total), { type: "final" }),
|
|
13960
|
+
newLineItems: result.lineItems.map((li) => __spreadProps(__spreadValues({}, li), { type: "final" })),
|
|
13961
|
+
newShippingMethods: result.shippingMethods || [],
|
|
13962
|
+
errors: nativeErrors
|
|
13963
|
+
});
|
|
13964
|
+
return;
|
|
13965
|
+
}
|
|
13966
|
+
session.completeShippingContactSelection(ApplePaySession.STATUS_SUCCESS, result.shippingMethods || [], __spreadProps(__spreadValues({}, result.total), { type: "final" }), result.lineItems.map((li) => __spreadProps(__spreadValues({}, li), { type: "final" })));
|
|
13967
|
+
} catch (e) {
|
|
13968
|
+
session.abort();
|
|
13969
|
+
}
|
|
13970
|
+
})();
|
|
13971
|
+
};
|
|
13972
|
+
}
|
|
13973
|
+
if (callbacks.onShippingMethodSelected) {
|
|
13974
|
+
session.onshippingmethodselected = (event) => {
|
|
13975
|
+
void (async () => {
|
|
13976
|
+
try {
|
|
13977
|
+
const result = await callbacks.onShippingMethodSelected(event.shippingMethod.identifier);
|
|
13978
|
+
if (!result) {
|
|
13979
|
+
session.abort();
|
|
13980
|
+
return;
|
|
13981
|
+
}
|
|
13982
|
+
session.completeShippingMethodSelection(ApplePaySession.STATUS_SUCCESS, __spreadProps(__spreadValues({}, result.total), { type: "final" }), result.lineItems.map((li) => __spreadProps(__spreadValues({}, li), { type: "final" })));
|
|
13983
|
+
} catch (e) {
|
|
13984
|
+
session.abort();
|
|
13985
|
+
}
|
|
13986
|
+
})();
|
|
13987
|
+
};
|
|
13988
|
+
}
|
|
13989
|
+
session.oncancel = () => {
|
|
13990
|
+
var _a2;
|
|
13991
|
+
(_a2 = callbacks.onCancel) == null ? void 0 : _a2.call(callbacks);
|
|
13992
|
+
};
|
|
13993
|
+
session.onerror = (event) => {
|
|
13994
|
+
var _a2;
|
|
13995
|
+
console.error("[ApplePayService] Session error:", event);
|
|
13996
|
+
(_a2 = callbacks.onError) == null ? void 0 : _a2.call(callbacks, "Apple Pay session error");
|
|
13997
|
+
};
|
|
13998
|
+
session.begin();
|
|
13999
|
+
} catch (err) {
|
|
14000
|
+
console.error("[ApplePayService] Failed to start Apple Pay session:", err);
|
|
14001
|
+
(_b = callbacks.onError) == null ? void 0 : _b.call(callbacks, "Failed to start Apple Pay");
|
|
14002
|
+
}
|
|
14003
|
+
}
|
|
14004
|
+
|
|
14005
|
+
// ../core-js/dist/payments/google-pay-service.js
|
|
14006
|
+
var GOOGLE_PAY_SDK_URL = "https://pay.google.com/gp/p/js/pay.js";
|
|
14007
|
+
var sdkLoadPromise2 = null;
|
|
14008
|
+
function loadGooglePaySdk() {
|
|
14009
|
+
var _a, _b, _c;
|
|
14010
|
+
if (sdkLoadPromise2)
|
|
14011
|
+
return sdkLoadPromise2;
|
|
14012
|
+
if (typeof window === "undefined") {
|
|
14013
|
+
return Promise.reject(new Error("[GooglePayService] No window \u2014 not in browser"));
|
|
14014
|
+
}
|
|
14015
|
+
if ((_c = (_b = (_a = window.google) == null ? void 0 : _a.payments) == null ? void 0 : _b.api) == null ? void 0 : _c.PaymentsClient) {
|
|
14016
|
+
sdkLoadPromise2 = Promise.resolve();
|
|
14017
|
+
return sdkLoadPromise2;
|
|
14018
|
+
}
|
|
14019
|
+
const existing = document.querySelector('script[src="'.concat(GOOGLE_PAY_SDK_URL, '"]'));
|
|
14020
|
+
if (existing) {
|
|
14021
|
+
sdkLoadPromise2 = new Promise((resolve) => {
|
|
14022
|
+
var _a2, _b2, _c2;
|
|
14023
|
+
if ((_c2 = (_b2 = (_a2 = window.google) == null ? void 0 : _a2.payments) == null ? void 0 : _b2.api) == null ? void 0 : _c2.PaymentsClient)
|
|
14024
|
+
return resolve();
|
|
14025
|
+
existing.addEventListener("load", () => resolve());
|
|
14026
|
+
const check = setInterval(() => {
|
|
14027
|
+
var _a3, _b3, _c3;
|
|
14028
|
+
if ((_c3 = (_b3 = (_a3 = window.google) == null ? void 0 : _a3.payments) == null ? void 0 : _b3.api) == null ? void 0 : _c3.PaymentsClient) {
|
|
14029
|
+
clearInterval(check);
|
|
14030
|
+
resolve();
|
|
14031
|
+
}
|
|
14032
|
+
}, 100);
|
|
14033
|
+
setTimeout(() => {
|
|
14034
|
+
clearInterval(check);
|
|
14035
|
+
resolve();
|
|
14036
|
+
}, 5e3);
|
|
14037
|
+
});
|
|
14038
|
+
return sdkLoadPromise2;
|
|
14039
|
+
}
|
|
14040
|
+
sdkLoadPromise2 = new Promise((resolve, reject) => {
|
|
14041
|
+
const script = document.createElement("script");
|
|
14042
|
+
script.src = GOOGLE_PAY_SDK_URL;
|
|
14043
|
+
script.async = true;
|
|
14044
|
+
script.onload = () => resolve();
|
|
14045
|
+
script.onerror = () => {
|
|
14046
|
+
sdkLoadPromise2 = null;
|
|
14047
|
+
reject(new Error("[GooglePayService] Failed to load Google Pay SDK"));
|
|
14048
|
+
};
|
|
14049
|
+
document.head.appendChild(script);
|
|
14050
|
+
});
|
|
14051
|
+
return sdkLoadPromise2;
|
|
14052
|
+
}
|
|
14053
|
+
var BASE_CARD_PAYMENT_METHOD = {
|
|
14054
|
+
type: "CARD",
|
|
14055
|
+
parameters: {
|
|
14056
|
+
allowedAuthMethods: ["PAN_ONLY", "CRYPTOGRAM_3DS"],
|
|
14057
|
+
allowedCardNetworks: ["VISA", "MASTERCARD", "AMEX", "DISCOVER", "JCB"]
|
|
14058
|
+
}
|
|
14059
|
+
};
|
|
14060
|
+
async function isGooglePayAvailable(sandboxed = false) {
|
|
14061
|
+
var _a, _b, _c;
|
|
14062
|
+
try {
|
|
14063
|
+
await loadGooglePaySdk();
|
|
14064
|
+
const PaymentsClient2 = (_c = (_b = (_a = window.google) == null ? void 0 : _a.payments) == null ? void 0 : _b.api) == null ? void 0 : _c.PaymentsClient;
|
|
14065
|
+
if (!PaymentsClient2)
|
|
14066
|
+
return false;
|
|
14067
|
+
const client = new PaymentsClient2({
|
|
14068
|
+
environment: sandboxed ? "TEST" : "PRODUCTION"
|
|
14069
|
+
});
|
|
14070
|
+
const result = await client.isReadyToPay({
|
|
14071
|
+
apiVersion: 2,
|
|
14072
|
+
apiVersionMinor: 0,
|
|
14073
|
+
allowedPaymentMethods: [BASE_CARD_PAYMENT_METHOD]
|
|
14074
|
+
});
|
|
14075
|
+
return result.result === true;
|
|
14076
|
+
} catch (e) {
|
|
14077
|
+
return false;
|
|
14078
|
+
}
|
|
14079
|
+
}
|
|
14080
|
+
async function tokenizeGooglePayPayment(basisTheoryApiKey, paymentToken) {
|
|
14081
|
+
let parsedToken;
|
|
14082
|
+
try {
|
|
14083
|
+
parsedToken = typeof paymentToken === "string" ? JSON.parse(paymentToken) : paymentToken;
|
|
14084
|
+
} catch (e) {
|
|
14085
|
+
parsedToken = paymentToken;
|
|
14086
|
+
}
|
|
14087
|
+
const response = await fetch("https://api.basistheory.com/google-pay", {
|
|
14088
|
+
method: "POST",
|
|
14089
|
+
headers: {
|
|
14090
|
+
"Content-Type": "application/json",
|
|
14091
|
+
"BT-API-KEY": basisTheoryApiKey
|
|
14092
|
+
},
|
|
14093
|
+
body: JSON.stringify({
|
|
14094
|
+
google_payment_data: parsedToken
|
|
14095
|
+
})
|
|
14096
|
+
});
|
|
14097
|
+
if (!response.ok) {
|
|
14098
|
+
throw new Error("[GooglePayService] Tokenization failed: HTTP ".concat(response.status));
|
|
14099
|
+
}
|
|
14100
|
+
const result = await response.json();
|
|
14101
|
+
return result.google_pay;
|
|
14102
|
+
}
|
|
14103
|
+
function minorToDecimal2(amountMinor, currency) {
|
|
14104
|
+
const zeroDecimal = [
|
|
14105
|
+
"BIF",
|
|
14106
|
+
"CLP",
|
|
14107
|
+
"DJF",
|
|
14108
|
+
"GNF",
|
|
14109
|
+
"JPY",
|
|
14110
|
+
"KMF",
|
|
14111
|
+
"KRW",
|
|
14112
|
+
"MGA",
|
|
14113
|
+
"PYG",
|
|
14114
|
+
"RWF",
|
|
14115
|
+
"UGX",
|
|
14116
|
+
"VND",
|
|
14117
|
+
"VUV",
|
|
14118
|
+
"XAF",
|
|
14119
|
+
"XOF",
|
|
14120
|
+
"XPF"
|
|
14121
|
+
];
|
|
14122
|
+
if (zeroDecimal.includes(currency.toUpperCase())) {
|
|
14123
|
+
return String(amountMinor);
|
|
14124
|
+
}
|
|
14125
|
+
return (amountMinor / 100).toFixed(2);
|
|
14126
|
+
}
|
|
14127
|
+
function extractAddress(data) {
|
|
14128
|
+
if (!data)
|
|
14129
|
+
return void 0;
|
|
14130
|
+
return {
|
|
14131
|
+
name: data.name,
|
|
14132
|
+
phoneNumber: data.phoneNumber,
|
|
14133
|
+
address1: data.address1,
|
|
14134
|
+
address2: data.address2,
|
|
14135
|
+
address3: data.address3,
|
|
14136
|
+
locality: data.locality,
|
|
14137
|
+
administrativeArea: data.administrativeArea,
|
|
14138
|
+
postalCode: data.postalCode,
|
|
14139
|
+
countryCode: data.countryCode,
|
|
14140
|
+
sortingCode: data.sortingCode
|
|
14141
|
+
};
|
|
14142
|
+
}
|
|
14143
|
+
function startGooglePaySession(config, request, callbacks) {
|
|
14144
|
+
var _a, _b, _c, _d, _e;
|
|
14145
|
+
const PaymentsClient2 = (_c = (_b = (_a = window.google) == null ? void 0 : _a.payments) == null ? void 0 : _b.api) == null ? void 0 : _c.PaymentsClient;
|
|
14146
|
+
if (!PaymentsClient2) {
|
|
14147
|
+
(_d = callbacks.onError) == null ? void 0 : _d.call(callbacks, "Google Pay is not available on this device");
|
|
14148
|
+
return;
|
|
14149
|
+
}
|
|
14150
|
+
const countryCode = config.countryCode || "US";
|
|
14151
|
+
const merchantName = config.merchantName || "Store";
|
|
14152
|
+
const totalStr = minorToDecimal2(request.totalAmountMinor, request.currency);
|
|
14153
|
+
const client = new PaymentsClient2({
|
|
14154
|
+
environment: config.sandboxed ? "TEST" : "PRODUCTION"
|
|
14155
|
+
});
|
|
14156
|
+
const paymentDataRequest = {
|
|
14157
|
+
apiVersion: 2,
|
|
14158
|
+
apiVersionMinor: 0,
|
|
14159
|
+
allowedPaymentMethods: [
|
|
14160
|
+
__spreadProps(__spreadValues({}, BASE_CARD_PAYMENT_METHOD), {
|
|
14161
|
+
tokenizationSpecification: {
|
|
14162
|
+
type: "PAYMENT_GATEWAY",
|
|
14163
|
+
parameters: {
|
|
14164
|
+
gateway: "basistheory",
|
|
14165
|
+
gatewayMerchantId: config.basisTheoryTenantId
|
|
14166
|
+
}
|
|
14167
|
+
}
|
|
14168
|
+
})
|
|
14169
|
+
],
|
|
14170
|
+
merchantInfo: {
|
|
14171
|
+
merchantId: config.sandboxed ? "12345678901234567890" : config.merchantId,
|
|
14172
|
+
merchantName
|
|
14173
|
+
},
|
|
14174
|
+
transactionInfo: {
|
|
14175
|
+
totalPriceStatus: request.totalPriceStatus || "FINAL",
|
|
14176
|
+
totalPrice: totalStr,
|
|
14177
|
+
currencyCode: request.currency,
|
|
14178
|
+
countryCode
|
|
14179
|
+
},
|
|
14180
|
+
emailRequired: true,
|
|
14181
|
+
shippingAddressRequired: true,
|
|
14182
|
+
shippingAddressParameters: {
|
|
14183
|
+
phoneNumberRequired: true
|
|
14184
|
+
}
|
|
14185
|
+
};
|
|
14186
|
+
if (request.displayItems) {
|
|
14187
|
+
paymentDataRequest.transactionInfo.displayItems = request.displayItems;
|
|
14188
|
+
}
|
|
14189
|
+
try {
|
|
14190
|
+
client.loadPaymentData(paymentDataRequest).then(async (paymentData) => {
|
|
14191
|
+
var _a2, _b2, _c2;
|
|
14192
|
+
try {
|
|
14193
|
+
const paymentMethodData = paymentData.paymentMethodData;
|
|
14194
|
+
const tokenString = (_a2 = paymentMethodData == null ? void 0 : paymentMethodData.tokenizationData) == null ? void 0 : _a2.token;
|
|
14195
|
+
if (!tokenString) {
|
|
14196
|
+
throw new Error("No payment token received from Google Pay");
|
|
14197
|
+
}
|
|
14198
|
+
const token = await tokenizeGooglePayPayment(config.basisTheoryApiKey, tokenString);
|
|
14199
|
+
if (paymentMethodData == null ? void 0 : paymentMethodData.info) {
|
|
14200
|
+
token.details = __spreadValues({
|
|
14201
|
+
auth_method: paymentMethodData.info.cardNetwork
|
|
14202
|
+
}, token.details);
|
|
14203
|
+
}
|
|
14204
|
+
const shippingAddress = extractAddress(paymentData.shippingAddress);
|
|
14205
|
+
const billingAddress = extractAddress((_b2 = paymentMethodData == null ? void 0 : paymentMethodData.info) == null ? void 0 : _b2.billingAddress);
|
|
14206
|
+
const email = paymentData.email;
|
|
14207
|
+
await callbacks.onSuccess(token, {
|
|
14208
|
+
shipping: shippingAddress,
|
|
14209
|
+
billing: billingAddress,
|
|
14210
|
+
email
|
|
14211
|
+
});
|
|
14212
|
+
} catch (err) {
|
|
14213
|
+
console.error("[GooglePayService] Payment processing failed:", err);
|
|
14214
|
+
(_c2 = callbacks.onError) == null ? void 0 : _c2.call(callbacks, "Payment failed");
|
|
14215
|
+
}
|
|
14216
|
+
}).catch((err) => {
|
|
14217
|
+
var _a2, _b2;
|
|
14218
|
+
if (err.statusCode === "CANCELED") {
|
|
14219
|
+
(_a2 = callbacks.onCancel) == null ? void 0 : _a2.call(callbacks);
|
|
14220
|
+
} else {
|
|
14221
|
+
console.error("[GooglePayService] Google Pay error:", err);
|
|
14222
|
+
(_b2 = callbacks.onError) == null ? void 0 : _b2.call(callbacks, err.statusMessage || "Google Pay failed");
|
|
14223
|
+
}
|
|
14224
|
+
});
|
|
14225
|
+
} catch (err) {
|
|
14226
|
+
console.error("[GooglePayService] Failed to start Google Pay session:", err);
|
|
14227
|
+
(_e = callbacks.onError) == null ? void 0 : _e.call(callbacks, "Failed to start Google Pay");
|
|
14228
|
+
}
|
|
14229
|
+
}
|
|
14230
|
+
|
|
14231
|
+
// src/data/currencies.json
|
|
14232
|
+
var currencies_default = {
|
|
14233
|
+
AED: {
|
|
14234
|
+
name: "United Arab Emirates Dirham",
|
|
14235
|
+
demonym: "UAE",
|
|
14236
|
+
majorSingle: "Dirham",
|
|
14237
|
+
majorPlural: "Dirhams",
|
|
14238
|
+
ISOnum: 784,
|
|
14239
|
+
symbol: "\u062F.\u0625.",
|
|
14240
|
+
symbolNative: "\u062F.\u0625.",
|
|
14241
|
+
minorSingle: "Fils",
|
|
14242
|
+
minorPlural: "Fils",
|
|
14243
|
+
ISOdigits: 2,
|
|
14244
|
+
decimals: 2,
|
|
14245
|
+
numToBasic: 100
|
|
14246
|
+
},
|
|
14247
|
+
AFN: {
|
|
14248
|
+
name: "Afghan Afghani",
|
|
14249
|
+
demonym: "Afghan",
|
|
14250
|
+
majorSingle: "Afghani",
|
|
14251
|
+
majorPlural: "Afghani",
|
|
14252
|
+
ISOnum: 971,
|
|
14253
|
+
symbol: "Af",
|
|
14254
|
+
symbolNative: "\u060B",
|
|
14255
|
+
minorSingle: "Pul",
|
|
14256
|
+
minorPlural: "Pul",
|
|
14257
|
+
ISOdigits: 2,
|
|
14258
|
+
decimals: 2,
|
|
14259
|
+
numToBasic: 100
|
|
14260
|
+
},
|
|
14261
|
+
ALL: {
|
|
14262
|
+
name: "Albanian Lek",
|
|
14263
|
+
demonym: "Albanian",
|
|
14264
|
+
majorSingle: "Lek",
|
|
14265
|
+
majorPlural: "Lek\xEB",
|
|
14266
|
+
ISOnum: 8,
|
|
14267
|
+
symbol: "L",
|
|
14268
|
+
symbolNative: "L",
|
|
14269
|
+
minorSingle: "Qindarka",
|
|
14270
|
+
minorPlural: "Qindarka",
|
|
14271
|
+
ISOdigits: 2,
|
|
14272
|
+
decimals: 2,
|
|
14273
|
+
numToBasic: 100
|
|
14274
|
+
},
|
|
14275
|
+
AMD: {
|
|
14276
|
+
name: "Armenian Dram",
|
|
14277
|
+
demonym: "Armenian",
|
|
14278
|
+
majorSingle: "Dram",
|
|
14279
|
+
majorPlural: "Dram",
|
|
14280
|
+
ISOnum: 51,
|
|
14281
|
+
symbol: "\u058F",
|
|
14282
|
+
symbolNative: "\u0564\u0580",
|
|
14283
|
+
minorSingle: "Luma",
|
|
14284
|
+
minorPlural: "Luma",
|
|
14285
|
+
ISOdigits: 2,
|
|
14286
|
+
decimals: 2,
|
|
14287
|
+
numToBasic: 100
|
|
14288
|
+
},
|
|
14289
|
+
ANG: {
|
|
14290
|
+
name: "Netherlands Antillean Guilder",
|
|
14291
|
+
demonym: "Netherlands Antillean",
|
|
14292
|
+
majorSingle: "Guilder",
|
|
14293
|
+
majorPlural: "Guilders",
|
|
14294
|
+
ISOnum: 532,
|
|
14295
|
+
symbol: "\u0192",
|
|
14296
|
+
symbolNative: "\u0192",
|
|
14297
|
+
minorSingle: "Cent",
|
|
14298
|
+
minorPlural: "Cents",
|
|
14299
|
+
ISOdigits: 2,
|
|
14300
|
+
decimals: 2,
|
|
14301
|
+
numToBasic: 100
|
|
14302
|
+
},
|
|
14303
|
+
AOA: {
|
|
14304
|
+
name: "Angolan Kwanza",
|
|
14305
|
+
demonym: "Angolan",
|
|
14306
|
+
majorSingle: "Kwanza",
|
|
14307
|
+
majorPlural: "Kwanza",
|
|
14308
|
+
ISOnum: 973,
|
|
14309
|
+
symbol: "Kz",
|
|
14310
|
+
symbolNative: "Kz",
|
|
14311
|
+
minorSingle: "Centimo",
|
|
14312
|
+
minorPlural: "Centimos",
|
|
14313
|
+
ISOdigits: 2,
|
|
14314
|
+
decimals: 2,
|
|
14315
|
+
numToBasic: 100
|
|
14316
|
+
},
|
|
14317
|
+
ARS: {
|
|
14318
|
+
name: "Argentine Peso",
|
|
14319
|
+
demonym: "Argentine",
|
|
14320
|
+
majorSingle: "Peso",
|
|
14321
|
+
majorPlural: "Pesos",
|
|
14322
|
+
ISOnum: 32,
|
|
14323
|
+
symbol: "AR$",
|
|
14324
|
+
symbolNative: "$",
|
|
14325
|
+
minorSingle: "Centavo",
|
|
14326
|
+
minorPlural: "Centavos",
|
|
14327
|
+
ISOdigits: 2,
|
|
14328
|
+
decimals: 2,
|
|
14329
|
+
numToBasic: 100
|
|
14330
|
+
},
|
|
14331
|
+
AUD: {
|
|
14332
|
+
name: "Australian Dollar",
|
|
14333
|
+
demonym: "Australian",
|
|
14334
|
+
majorSingle: "Dollar",
|
|
14335
|
+
majorPlural: "Dollars",
|
|
14336
|
+
ISOnum: 36,
|
|
14337
|
+
symbol: "AU$",
|
|
14338
|
+
symbolNative: "$",
|
|
14339
|
+
minorSingle: "Cent",
|
|
14340
|
+
minorPlural: "Cents",
|
|
14341
|
+
ISOdigits: 2,
|
|
14342
|
+
decimals: 2,
|
|
14343
|
+
numToBasic: 100
|
|
14344
|
+
},
|
|
14345
|
+
AWG: {
|
|
14346
|
+
name: "Aruban Florin",
|
|
14347
|
+
demonym: "Aruban",
|
|
14348
|
+
majorSingle: "Florin",
|
|
14349
|
+
majorPlural: "Florin",
|
|
14350
|
+
ISOnum: 533,
|
|
14351
|
+
symbol: "\u0192",
|
|
14352
|
+
symbolNative: "\u0192",
|
|
14353
|
+
minorSingle: "Cent",
|
|
14354
|
+
minorPlural: "Cents",
|
|
14355
|
+
ISOdigits: 2,
|
|
14356
|
+
decimals: 2,
|
|
14357
|
+
numToBasic: 100
|
|
14358
|
+
},
|
|
14359
|
+
AZN: {
|
|
14360
|
+
name: "Azerbaijani Manat",
|
|
14361
|
+
demonym: "Azerbaijani",
|
|
14362
|
+
majorSingle: "Manat",
|
|
14363
|
+
majorPlural: "Manat",
|
|
14364
|
+
ISOnum: 944,
|
|
14365
|
+
symbol: "\u043C\u0430\u043D",
|
|
14366
|
+
symbolNative: "\u20BC",
|
|
14367
|
+
minorSingle: "Qapik",
|
|
14368
|
+
minorPlural: "Qapik",
|
|
14369
|
+
ISOdigits: 2,
|
|
14370
|
+
decimals: 2,
|
|
14371
|
+
numToBasic: 100
|
|
14372
|
+
},
|
|
14373
|
+
BAM: {
|
|
14374
|
+
name: "Bosnia and Herzegovina Convertible Mark",
|
|
14375
|
+
demonym: "Bosnia-Herzegovina",
|
|
14376
|
+
majorSingle: "Convertible Mark",
|
|
14377
|
+
majorPlural: "Marks",
|
|
14378
|
+
ISOnum: 977,
|
|
14379
|
+
symbol: "KM",
|
|
14380
|
+
symbolNative: "\u041A\u041C",
|
|
14381
|
+
minorSingle: "Fening",
|
|
14382
|
+
minorPlural: "Fening",
|
|
14383
|
+
ISOdigits: 2,
|
|
14384
|
+
decimals: 2,
|
|
14385
|
+
numToBasic: 100
|
|
14386
|
+
},
|
|
14387
|
+
BBD: {
|
|
14388
|
+
name: "Barbadian Dollar",
|
|
14389
|
+
demonym: "Barbadian",
|
|
14390
|
+
majorSingle: "Dollar",
|
|
14391
|
+
majorPlural: "Dollars",
|
|
14392
|
+
ISOnum: 52,
|
|
14393
|
+
symbol: "BBD$",
|
|
14394
|
+
symbolNative: "$",
|
|
14395
|
+
minorSingle: "Cent",
|
|
14396
|
+
minorPlural: "Cents",
|
|
14397
|
+
ISOdigits: 2,
|
|
14398
|
+
decimals: 2,
|
|
14399
|
+
numToBasic: 100
|
|
14400
|
+
},
|
|
14401
|
+
BDT: {
|
|
14402
|
+
name: "Bangladeshi Taka",
|
|
14403
|
+
demonym: "Bangladeshi",
|
|
14404
|
+
majorSingle: "Taka",
|
|
14405
|
+
majorPlural: "Taka",
|
|
14406
|
+
ISOnum: 50,
|
|
14407
|
+
symbol: "\u09F3",
|
|
14408
|
+
symbolNative: "\u09F3",
|
|
14409
|
+
minorSingle: "Poisha",
|
|
14410
|
+
minorPlural: "Poisha",
|
|
14411
|
+
ISOdigits: 2,
|
|
14412
|
+
decimals: 2,
|
|
14413
|
+
numToBasic: 100
|
|
14414
|
+
},
|
|
14415
|
+
BGN: {
|
|
14416
|
+
name: "Bulgarian Lev",
|
|
14417
|
+
demonym: "Bulgarian",
|
|
14418
|
+
majorSingle: "Lev",
|
|
14419
|
+
majorPlural: "Leva",
|
|
14420
|
+
ISOnum: 975,
|
|
14421
|
+
symbol: "\u043B\u0432.",
|
|
14422
|
+
symbolNative: "\u043B\u0432.",
|
|
14423
|
+
minorSingle: "Stotinka",
|
|
14424
|
+
minorPlural: "Stotinki",
|
|
14425
|
+
ISOdigits: 2,
|
|
14426
|
+
decimals: 2,
|
|
14427
|
+
numToBasic: 100
|
|
14428
|
+
},
|
|
14429
|
+
BHD: {
|
|
14430
|
+
name: "Bahraini Dinar",
|
|
14431
|
+
demonym: "Bahraini",
|
|
14432
|
+
majorSingle: "Dinar",
|
|
14433
|
+
majorPlural: "Dinars",
|
|
14434
|
+
ISOnum: 48,
|
|
14435
|
+
symbol: "BD",
|
|
14436
|
+
symbolNative: "\u062F.\u0628.",
|
|
14437
|
+
minorSingle: "Fils",
|
|
14438
|
+
minorPlural: "Fils",
|
|
14439
|
+
ISOdigits: 3,
|
|
14440
|
+
decimals: 3,
|
|
14441
|
+
numToBasic: 1e3
|
|
14442
|
+
},
|
|
14443
|
+
BIF: {
|
|
14444
|
+
name: "Burundian Franc",
|
|
14445
|
+
demonym: "Burundian",
|
|
14446
|
+
majorSingle: "Franc",
|
|
14447
|
+
majorPlural: "Francs",
|
|
14448
|
+
ISOnum: 108,
|
|
14449
|
+
symbol: "FBu",
|
|
14450
|
+
symbolNative: "FBu",
|
|
14451
|
+
minorSingle: "Centime",
|
|
14452
|
+
minorPlural: "Centimes",
|
|
14453
|
+
ISOdigits: 0,
|
|
14454
|
+
decimals: 2,
|
|
14455
|
+
numToBasic: 100
|
|
14456
|
+
},
|
|
14457
|
+
BMD: {
|
|
14458
|
+
name: "Bermudian Dollar",
|
|
14459
|
+
demonym: "Bermudian",
|
|
14460
|
+
majorSingle: "Dollar",
|
|
14461
|
+
majorPlural: "Dollars",
|
|
14462
|
+
ISOnum: 60,
|
|
14463
|
+
symbol: "$",
|
|
14464
|
+
symbolNative: "$",
|
|
14465
|
+
minorSingle: "Cent",
|
|
14466
|
+
minorPlural: "Cents",
|
|
14467
|
+
ISOdigits: 2,
|
|
14468
|
+
decimals: 2,
|
|
14469
|
+
numToBasic: 100
|
|
14470
|
+
},
|
|
14471
|
+
BND: {
|
|
14472
|
+
name: "Brunei Dollar",
|
|
14473
|
+
demonym: "Brunei",
|
|
14474
|
+
majorSingle: "Dollar",
|
|
14475
|
+
majorPlural: "Dollars",
|
|
14476
|
+
ISOnum: 96,
|
|
14477
|
+
symbol: "B$",
|
|
14478
|
+
symbolNative: "$",
|
|
14479
|
+
minorSingle: "Cent",
|
|
14480
|
+
minorPlural: "Cents",
|
|
14481
|
+
ISOdigits: 2,
|
|
14482
|
+
decimals: 2,
|
|
14483
|
+
numToBasic: 100
|
|
14484
|
+
},
|
|
14485
|
+
BOB: {
|
|
14486
|
+
name: "Bolivian Boliviano",
|
|
14487
|
+
demonym: "Bolivian",
|
|
14488
|
+
majorSingle: "Boliviano",
|
|
14489
|
+
majorPlural: "Bolivianos",
|
|
14490
|
+
ISOnum: 68,
|
|
14491
|
+
symbol: "Bs.",
|
|
14492
|
+
symbolNative: "Bs.",
|
|
14493
|
+
minorSingle: "Centavo",
|
|
14494
|
+
minorPlural: "Centavos",
|
|
14495
|
+
ISOdigits: 2,
|
|
14496
|
+
decimals: 2,
|
|
14497
|
+
numToBasic: 100
|
|
14498
|
+
},
|
|
14499
|
+
BRL: {
|
|
14500
|
+
name: "Brazilian Real",
|
|
14501
|
+
demonym: "Brazilian",
|
|
14502
|
+
majorSingle: "Real",
|
|
14503
|
+
majorPlural: "Reais",
|
|
14504
|
+
ISOnum: 986,
|
|
14505
|
+
symbol: "R$",
|
|
14506
|
+
symbolNative: "R$",
|
|
14507
|
+
minorSingle: "Centavo",
|
|
14508
|
+
minorPlural: "Centavos",
|
|
14509
|
+
ISOdigits: 2,
|
|
14510
|
+
decimals: 2,
|
|
14511
|
+
numToBasic: 100
|
|
14512
|
+
},
|
|
14513
|
+
BSD: {
|
|
14514
|
+
name: "Bahamian Dollar",
|
|
14515
|
+
demonym: "Bahamian",
|
|
14516
|
+
majorSingle: "Dollar",
|
|
14517
|
+
majorPlural: "Dollars",
|
|
14518
|
+
ISOnum: 44,
|
|
14519
|
+
symbol: "$",
|
|
14520
|
+
symbolNative: "$",
|
|
14521
|
+
minorSingle: "Cent",
|
|
14522
|
+
minorPlural: "Cents",
|
|
14523
|
+
ISOdigits: 2,
|
|
14524
|
+
decimals: 2,
|
|
14525
|
+
numToBasic: 100
|
|
14526
|
+
},
|
|
14527
|
+
BTN: {
|
|
14528
|
+
name: "Bhutanese Ngultrum",
|
|
14529
|
+
demonym: "Bhutanese",
|
|
14530
|
+
majorSingle: "Ngultrum",
|
|
14531
|
+
majorPlural: "Ngultrums",
|
|
14532
|
+
ISOnum: 64,
|
|
14533
|
+
symbol: "Nu.",
|
|
14534
|
+
symbolNative: "Nu.",
|
|
14535
|
+
minorSingle: "Chetrum",
|
|
14536
|
+
minorPlural: "Chetrums",
|
|
14537
|
+
ISOdigits: 2,
|
|
14538
|
+
decimals: 2,
|
|
14539
|
+
numToBasic: 100
|
|
14540
|
+
},
|
|
14541
|
+
BWP: {
|
|
14542
|
+
name: "Botswana Pula",
|
|
14543
|
+
demonym: "Botswana",
|
|
14544
|
+
majorSingle: "Pula",
|
|
14545
|
+
majorPlural: "Pula",
|
|
14546
|
+
ISOnum: 72,
|
|
14547
|
+
symbol: "P",
|
|
14548
|
+
symbolNative: "P",
|
|
14549
|
+
minorSingle: "Thebe",
|
|
14550
|
+
minorPlural: "Thebe",
|
|
14551
|
+
ISOdigits: 2,
|
|
14552
|
+
decimals: 2,
|
|
14553
|
+
numToBasic: 100
|
|
14554
|
+
},
|
|
14555
|
+
BYN: {
|
|
14556
|
+
name: "Belarusian Ruble",
|
|
14557
|
+
demonym: "Belarusian",
|
|
14558
|
+
majorSingle: "Ruble",
|
|
14559
|
+
majorPlural: "Rubles",
|
|
14560
|
+
ISOnum: 933,
|
|
14561
|
+
symbol: "Br",
|
|
14562
|
+
symbolNative: "\u0440\u0443\u0431.",
|
|
14563
|
+
minorSingle: "Kapiejka",
|
|
14564
|
+
minorPlural: "Kapiejka",
|
|
14565
|
+
ISOdigits: 2,
|
|
14566
|
+
decimals: 2,
|
|
14567
|
+
numToBasic: 100
|
|
14568
|
+
},
|
|
14569
|
+
BZD: {
|
|
14570
|
+
name: "Belize Dollar",
|
|
14571
|
+
demonym: "Belize",
|
|
14572
|
+
majorSingle: "Dollar",
|
|
14573
|
+
majorPlural: "Dollars",
|
|
14574
|
+
ISOnum: 84,
|
|
14575
|
+
symbol: "BZ$",
|
|
14576
|
+
symbolNative: "$",
|
|
14577
|
+
minorSingle: "Cent",
|
|
14578
|
+
minorPlural: "Cents",
|
|
14579
|
+
ISOdigits: 2,
|
|
14580
|
+
decimals: 2,
|
|
14581
|
+
numToBasic: 100
|
|
14582
|
+
},
|
|
14583
|
+
CAD: {
|
|
14584
|
+
name: "Canadian Dollar",
|
|
14585
|
+
demonym: "Canadian",
|
|
14586
|
+
majorSingle: "Dollar",
|
|
14587
|
+
majorPlural: "Dollars",
|
|
14588
|
+
ISOnum: 124,
|
|
14589
|
+
symbol: "CA$",
|
|
14590
|
+
symbolNative: "$",
|
|
14591
|
+
minorSingle: "Cent",
|
|
14592
|
+
minorPlural: "Cents",
|
|
14593
|
+
ISOdigits: 2,
|
|
14594
|
+
decimals: 2,
|
|
14595
|
+
numToBasic: 100
|
|
14596
|
+
},
|
|
14597
|
+
CDF: {
|
|
14598
|
+
name: "Congolese Franc",
|
|
14599
|
+
demonym: "Congolese",
|
|
14600
|
+
majorSingle: "Franc",
|
|
14601
|
+
majorPlural: "Francs",
|
|
14602
|
+
ISOnum: 976,
|
|
14603
|
+
symbol: "FC",
|
|
14604
|
+
symbolNative: "\u20A3",
|
|
14605
|
+
minorSingle: "Centime",
|
|
14606
|
+
minorPlural: "Centimes",
|
|
14607
|
+
ISOdigits: 2,
|
|
14608
|
+
decimals: 2,
|
|
14609
|
+
numToBasic: 100
|
|
14610
|
+
},
|
|
14611
|
+
CHF: {
|
|
14612
|
+
name: "Swiss Franc",
|
|
14613
|
+
demonym: "Swiss",
|
|
14614
|
+
majorSingle: "Franc",
|
|
14615
|
+
majorPlural: "Francs",
|
|
14616
|
+
ISOnum: 756,
|
|
14617
|
+
symbol: "Fr.",
|
|
14618
|
+
symbolNative: "\u20A3",
|
|
14619
|
+
minorSingle: "Centime",
|
|
14620
|
+
minorPlural: "Centimes",
|
|
14621
|
+
ISOdigits: 2,
|
|
14622
|
+
decimals: 2,
|
|
14623
|
+
numToBasic: 100
|
|
14624
|
+
},
|
|
14625
|
+
CKD: {
|
|
14626
|
+
name: "Cook Islands Dollar",
|
|
14627
|
+
demonym: "Cook Islands",
|
|
14628
|
+
majorSingle: "Dollar",
|
|
14629
|
+
majorPlural: "Dollars",
|
|
14630
|
+
ISOnum: null,
|
|
14631
|
+
symbol: "$",
|
|
14632
|
+
symbolNative: "$",
|
|
14633
|
+
minorSingle: "Cent",
|
|
14634
|
+
minorPlural: "Cents",
|
|
14635
|
+
ISOdigits: 2,
|
|
14636
|
+
decimals: 2,
|
|
14637
|
+
numToBasic: 100
|
|
14638
|
+
},
|
|
14639
|
+
CLP: {
|
|
14640
|
+
name: "Chilean Peso",
|
|
14641
|
+
demonym: "Chilean",
|
|
14642
|
+
majorSingle: "Peso",
|
|
14643
|
+
majorPlural: "Pesos",
|
|
14644
|
+
ISOnum: 152,
|
|
14645
|
+
symbol: "CL$",
|
|
14646
|
+
symbolNative: "$",
|
|
14647
|
+
minorSingle: "Centavo",
|
|
14648
|
+
minorPlural: "Centavos",
|
|
14649
|
+
ISOdigits: 0,
|
|
14650
|
+
decimals: 0,
|
|
14651
|
+
numToBasic: 100
|
|
14652
|
+
},
|
|
14653
|
+
CNY: {
|
|
14654
|
+
name: "Chinese Yuan",
|
|
14655
|
+
demonym: "Chinese",
|
|
14656
|
+
majorSingle: "Yuan",
|
|
14657
|
+
majorPlural: "Yuan",
|
|
14658
|
+
ISOnum: 156,
|
|
14659
|
+
symbol: "CN\xA5",
|
|
14660
|
+
symbolNative: "\xA5\u5143",
|
|
14661
|
+
minorSingle: "Fen",
|
|
14662
|
+
minorPlural: "Fen",
|
|
14663
|
+
ISOdigits: 2,
|
|
14664
|
+
decimals: 2,
|
|
14665
|
+
numToBasic: 100
|
|
14666
|
+
},
|
|
14667
|
+
COP: {
|
|
14668
|
+
name: "Colombian Peso",
|
|
14669
|
+
demonym: "Colombian",
|
|
14670
|
+
majorSingle: "Peso",
|
|
14671
|
+
majorPlural: "Pesos",
|
|
14672
|
+
ISOnum: 170,
|
|
14673
|
+
symbol: "CO$",
|
|
14674
|
+
symbolNative: "$",
|
|
14675
|
+
minorSingle: "Centavo",
|
|
14676
|
+
minorPlural: "Centavos",
|
|
14677
|
+
ISOdigits: 2,
|
|
14678
|
+
decimals: 2,
|
|
14679
|
+
numToBasic: 100
|
|
14680
|
+
},
|
|
14681
|
+
CRC: {
|
|
14682
|
+
name: "Costa Rican Colon",
|
|
14683
|
+
demonym: "Costa Rican",
|
|
14684
|
+
majorSingle: "Col\xF3n",
|
|
14685
|
+
majorPlural: "Colones",
|
|
14686
|
+
ISOnum: 188,
|
|
14687
|
+
symbol: "\u20A1",
|
|
14688
|
+
symbolNative: "\u20A1",
|
|
14689
|
+
minorSingle: "Centimo",
|
|
14690
|
+
minorPlural: "Centimos",
|
|
14691
|
+
ISOdigits: 2,
|
|
14692
|
+
decimals: 2,
|
|
14693
|
+
numToBasic: 100
|
|
14694
|
+
},
|
|
14695
|
+
CUC: {
|
|
14696
|
+
name: "Cuban convertible Peso",
|
|
14697
|
+
demonym: "Cuban Convertible",
|
|
14698
|
+
majorSingle: "Peso",
|
|
14699
|
+
majorPlural: "Pesos",
|
|
14700
|
+
ISOnum: 931,
|
|
14701
|
+
symbol: "CUC$",
|
|
14702
|
+
symbolNative: "$",
|
|
14703
|
+
minorSingle: "Centavo",
|
|
14704
|
+
minorPlural: "Centavos",
|
|
14705
|
+
ISOdigits: 2,
|
|
14706
|
+
decimals: 2,
|
|
14707
|
+
numToBasic: 100
|
|
14708
|
+
},
|
|
14709
|
+
CUP: {
|
|
14710
|
+
name: "Cuban Peso",
|
|
14711
|
+
demonym: "Cuban",
|
|
14712
|
+
majorSingle: "Peso",
|
|
14713
|
+
majorPlural: "Pesos",
|
|
14714
|
+
ISOnum: 192,
|
|
14715
|
+
symbol: "$MN",
|
|
14716
|
+
symbolNative: "\u20B1",
|
|
14717
|
+
minorSingle: "Centavo",
|
|
14718
|
+
minorPlural: "Centavos",
|
|
14719
|
+
ISOdigits: 2,
|
|
14720
|
+
decimals: 2,
|
|
14721
|
+
numToBasic: 100
|
|
14722
|
+
},
|
|
14723
|
+
CVE: {
|
|
14724
|
+
name: "Cabo Verdean Escudo",
|
|
14725
|
+
demonym: "Cabo Verdean",
|
|
14726
|
+
majorSingle: "Escudo",
|
|
14727
|
+
majorPlural: "Escudo",
|
|
14728
|
+
ISOnum: 132,
|
|
14729
|
+
symbol: "CV$",
|
|
14730
|
+
symbolNative: "$",
|
|
14731
|
+
minorSingle: "Centavo",
|
|
14732
|
+
minorPlural: "Centavos",
|
|
14733
|
+
ISOdigits: 2,
|
|
14734
|
+
decimals: 2,
|
|
14735
|
+
numToBasic: 100
|
|
14736
|
+
},
|
|
14737
|
+
CZK: {
|
|
14738
|
+
name: "Czech Koruna",
|
|
14739
|
+
demonym: "Czech",
|
|
14740
|
+
majorSingle: "Koruna",
|
|
14741
|
+
majorPlural: "Koruny",
|
|
14742
|
+
ISOnum: 203,
|
|
14743
|
+
symbol: "K\u010D",
|
|
14744
|
+
symbolNative: "K\u010D",
|
|
14745
|
+
minorSingle: "Hal\xE9\u0159",
|
|
14746
|
+
minorPlural: "Hal\xE9\u0159",
|
|
14747
|
+
ISOdigits: 2,
|
|
14748
|
+
decimals: 2,
|
|
14749
|
+
numToBasic: 100
|
|
14750
|
+
},
|
|
14751
|
+
DJF: {
|
|
14752
|
+
name: "Djiboutian Franc",
|
|
14753
|
+
demonym: "Djiboutian",
|
|
14754
|
+
majorSingle: "Franc",
|
|
14755
|
+
majorPlural: "Francs",
|
|
14756
|
+
ISOnum: 262,
|
|
14757
|
+
symbol: "Fdj",
|
|
14758
|
+
symbolNative: "\u0641.\u062C.",
|
|
14759
|
+
minorSingle: "Centime",
|
|
14760
|
+
minorPlural: "Centimes",
|
|
14761
|
+
ISOdigits: 0,
|
|
14762
|
+
decimals: 2,
|
|
14763
|
+
numToBasic: 100
|
|
14764
|
+
},
|
|
14765
|
+
DKK: {
|
|
14766
|
+
name: "Danish Krone",
|
|
14767
|
+
demonym: "Danish",
|
|
14768
|
+
majorSingle: "Krone",
|
|
14769
|
+
majorPlural: "Kroner",
|
|
14770
|
+
ISOnum: 208,
|
|
14771
|
+
symbol: "kr.",
|
|
14772
|
+
symbolNative: "kr.",
|
|
14773
|
+
minorSingle: "\xD8re",
|
|
14774
|
+
minorPlural: "\xD8re",
|
|
14775
|
+
ISOdigits: 2,
|
|
14776
|
+
decimals: 2,
|
|
14777
|
+
numToBasic: 100
|
|
14778
|
+
},
|
|
14779
|
+
DOP: {
|
|
14780
|
+
name: "Dominican Peso",
|
|
14781
|
+
demonym: "Dominican",
|
|
14782
|
+
majorSingle: "Peso",
|
|
14783
|
+
majorPlural: "Pesos",
|
|
14784
|
+
ISOnum: 214,
|
|
14785
|
+
symbol: "RD$",
|
|
14786
|
+
symbolNative: "$",
|
|
14787
|
+
minorSingle: "Centavo",
|
|
14788
|
+
minorPlural: "Centavos",
|
|
14789
|
+
ISOdigits: 2,
|
|
14790
|
+
decimals: 2,
|
|
14791
|
+
numToBasic: 100
|
|
14792
|
+
},
|
|
14793
|
+
DZD: {
|
|
14794
|
+
name: "Algerian Dinar",
|
|
14795
|
+
demonym: "Algerian",
|
|
14796
|
+
majorSingle: "Dinar",
|
|
14797
|
+
majorPlural: "Dinars",
|
|
14798
|
+
ISOnum: 12,
|
|
14799
|
+
symbol: "DA",
|
|
14800
|
+
symbolNative: "\u062F.\u062C.",
|
|
14801
|
+
minorSingle: "Santeem",
|
|
14802
|
+
minorPlural: "Santeems",
|
|
14803
|
+
ISOdigits: 2,
|
|
14804
|
+
decimals: 2,
|
|
14805
|
+
numToBasic: 100
|
|
14806
|
+
},
|
|
14807
|
+
EGP: {
|
|
14808
|
+
name: "Egyptian Pound",
|
|
14809
|
+
demonym: "Egyptian",
|
|
14810
|
+
majorSingle: "Pound",
|
|
14811
|
+
majorPlural: "Pounds",
|
|
14812
|
+
ISOnum: 818,
|
|
14813
|
+
symbol: "E\xA3",
|
|
14814
|
+
symbolNative: "\u062C.\u0645.",
|
|
14815
|
+
minorSingle: "Qirsh",
|
|
14816
|
+
minorPlural: "Qirsh",
|
|
14817
|
+
ISOdigits: 2,
|
|
14818
|
+
decimals: 2,
|
|
14819
|
+
numToBasic: 100
|
|
14820
|
+
},
|
|
14821
|
+
EHP: {
|
|
14822
|
+
name: "Sahrawi Peseta",
|
|
14823
|
+
demonym: "Sahrawi",
|
|
14824
|
+
majorSingle: "Peseta",
|
|
14825
|
+
majorPlural: "Pesetas",
|
|
14826
|
+
ISOnum: null,
|
|
14827
|
+
symbol: "Ptas.",
|
|
14828
|
+
symbolNative: "Ptas.",
|
|
14829
|
+
minorSingle: "C\xE9ntimo",
|
|
14830
|
+
minorPlural: "C\xE9ntimos",
|
|
14831
|
+
ISOdigits: 2,
|
|
14832
|
+
decimals: 2,
|
|
14833
|
+
numToBasic: 100
|
|
14834
|
+
},
|
|
14835
|
+
ERN: {
|
|
14836
|
+
name: "Eritrean Nakfa",
|
|
14837
|
+
demonym: "Eritrean",
|
|
14838
|
+
majorSingle: "Nakfa",
|
|
14839
|
+
majorPlural: "Nakfa",
|
|
14840
|
+
ISOnum: 232,
|
|
14841
|
+
symbol: "Nkf",
|
|
14842
|
+
symbolNative: "\u0646\u0627\u0643\u0641\u0627",
|
|
14843
|
+
minorSingle: "Cent",
|
|
14844
|
+
minorPlural: "Cents",
|
|
14845
|
+
ISOdigits: 2,
|
|
14846
|
+
decimals: 2,
|
|
14847
|
+
numToBasic: 100
|
|
14848
|
+
},
|
|
14849
|
+
ETB: {
|
|
14850
|
+
name: "Ethiopian Birr",
|
|
14851
|
+
demonym: "Ethiopian",
|
|
14852
|
+
majorSingle: "Birr",
|
|
14853
|
+
majorPlural: "Birr",
|
|
14854
|
+
ISOnum: 230,
|
|
14855
|
+
symbol: "Br",
|
|
14856
|
+
symbolNative: "\u1265\u122D",
|
|
14857
|
+
minorSingle: "Santim",
|
|
14858
|
+
minorPlural: "Santim",
|
|
14859
|
+
ISOdigits: 2,
|
|
14860
|
+
decimals: 2,
|
|
14861
|
+
numToBasic: 100
|
|
14862
|
+
},
|
|
14863
|
+
EUR: {
|
|
14864
|
+
name: "Euro",
|
|
14865
|
+
demonym: "",
|
|
14866
|
+
majorSingle: "Euro",
|
|
14867
|
+
majorPlural: "Euros",
|
|
14868
|
+
ISOnum: 978,
|
|
14869
|
+
symbol: "\u20AC",
|
|
14870
|
+
symbolNative: "\u20AC",
|
|
14871
|
+
minorSingle: "Cent",
|
|
14872
|
+
minorPlural: "Cents",
|
|
14873
|
+
ISOdigits: 2,
|
|
14874
|
+
decimals: 2,
|
|
14875
|
+
numToBasic: 100
|
|
14876
|
+
},
|
|
14877
|
+
FJD: {
|
|
14878
|
+
name: "Fijian Dollar",
|
|
14879
|
+
demonym: "Fijian",
|
|
14880
|
+
majorSingle: "Dollar",
|
|
14881
|
+
majorPlural: "Dollars",
|
|
14882
|
+
ISOnum: 242,
|
|
14883
|
+
symbol: "FJ$",
|
|
14884
|
+
symbolNative: "$",
|
|
14885
|
+
minorSingle: "Cent",
|
|
14886
|
+
minorPlural: "Cents",
|
|
14887
|
+
ISOdigits: 2,
|
|
14888
|
+
decimals: 2,
|
|
14889
|
+
numToBasic: 100
|
|
14890
|
+
},
|
|
14891
|
+
FKP: {
|
|
14892
|
+
name: "Falkland Islands Pound",
|
|
14893
|
+
demonym: "Falkland Islands",
|
|
14894
|
+
majorSingle: "Pound",
|
|
14895
|
+
majorPlural: "Pounds",
|
|
14896
|
+
ISOnum: 238,
|
|
14897
|
+
symbol: "FK\xA3",
|
|
14898
|
+
symbolNative: "\xA3",
|
|
14899
|
+
minorSingle: "Penny",
|
|
14900
|
+
minorPlural: "Pence",
|
|
14901
|
+
ISOdigits: 2,
|
|
14902
|
+
decimals: 2,
|
|
14903
|
+
numToBasic: 100
|
|
14904
|
+
},
|
|
14905
|
+
FOK: {
|
|
14906
|
+
name: "Faroese Kr\xF3na",
|
|
14907
|
+
demonym: "Faroese",
|
|
14908
|
+
majorSingle: "Kr\xF3na",
|
|
14909
|
+
majorPlural: "Kr\xF3nas",
|
|
14910
|
+
ISOnum: null,
|
|
14911
|
+
symbol: "kr",
|
|
14912
|
+
symbolNative: "kr",
|
|
14913
|
+
minorSingle: "Oyra",
|
|
14914
|
+
minorPlural: "Oyra",
|
|
14915
|
+
ISOdigits: 2,
|
|
14916
|
+
decimals: 2,
|
|
14917
|
+
numToBasic: 100
|
|
14918
|
+
},
|
|
14919
|
+
GBP: {
|
|
14920
|
+
name: "Pound Sterling",
|
|
14921
|
+
demonym: "Pound Sterling",
|
|
14922
|
+
majorSingle: "Pound",
|
|
14923
|
+
majorPlural: "Pounds",
|
|
14924
|
+
ISOnum: 826,
|
|
14925
|
+
symbol: "\xA3",
|
|
14926
|
+
symbolNative: "\xA3",
|
|
14927
|
+
minorSingle: "Penny",
|
|
14928
|
+
minorPlural: "Pence",
|
|
14929
|
+
ISOdigits: 2,
|
|
14930
|
+
decimals: 2,
|
|
14931
|
+
numToBasic: 100
|
|
14932
|
+
},
|
|
14933
|
+
GEL: {
|
|
14934
|
+
name: "Georgian Lari",
|
|
14935
|
+
demonym: "Georgian",
|
|
14936
|
+
majorSingle: "Lari",
|
|
14937
|
+
majorPlural: "Lari",
|
|
14938
|
+
ISOnum: 981,
|
|
14939
|
+
symbol: "\u20BE",
|
|
14940
|
+
symbolNative: "\u20BE",
|
|
14941
|
+
minorSingle: "Tetri",
|
|
14942
|
+
minorPlural: "Tetri",
|
|
14943
|
+
ISOdigits: 2,
|
|
14944
|
+
decimals: 2,
|
|
14945
|
+
numToBasic: 100
|
|
14946
|
+
},
|
|
14947
|
+
GGP: {
|
|
14948
|
+
name: "Guernsey Pound",
|
|
14949
|
+
demonym: "Guernsey",
|
|
14950
|
+
majorSingle: "Pound",
|
|
14951
|
+
majorPlural: "Pounds",
|
|
14952
|
+
ISOnum: null,
|
|
14953
|
+
symbol: "\xA3",
|
|
14954
|
+
symbolNative: "\xA3",
|
|
14955
|
+
minorSingle: "Penny",
|
|
14956
|
+
minorPlural: "Pence",
|
|
14957
|
+
ISOdigits: 2,
|
|
14958
|
+
decimals: 2,
|
|
14959
|
+
numToBasic: 100
|
|
14960
|
+
},
|
|
14961
|
+
GHS: {
|
|
14962
|
+
name: "Ghanaian Cedi",
|
|
14963
|
+
demonym: "Ghanaian",
|
|
14964
|
+
majorSingle: "Cedi",
|
|
14965
|
+
majorPlural: "Cedis",
|
|
14966
|
+
ISOnum: 936,
|
|
14967
|
+
symbol: "GH\u20B5",
|
|
14968
|
+
symbolNative: "\u20B5",
|
|
14969
|
+
minorSingle: "Pesewa",
|
|
14970
|
+
minorPlural: "Pesewas",
|
|
14971
|
+
ISOdigits: 2,
|
|
14972
|
+
decimals: 2,
|
|
14973
|
+
numToBasic: 100
|
|
14974
|
+
},
|
|
14975
|
+
GIP: {
|
|
14976
|
+
name: "Gibraltar Pound",
|
|
14977
|
+
demonym: "Gibraltar",
|
|
14978
|
+
majorSingle: "Pound",
|
|
14979
|
+
majorPlural: "Pounds",
|
|
14980
|
+
ISOnum: 292,
|
|
14981
|
+
symbol: "\xA3",
|
|
14982
|
+
symbolNative: "\xA3",
|
|
14983
|
+
minorSingle: "Penny",
|
|
14984
|
+
minorPlural: "Pence",
|
|
14985
|
+
ISOdigits: 2,
|
|
14986
|
+
decimals: 2,
|
|
14987
|
+
numToBasic: 100
|
|
14988
|
+
},
|
|
14989
|
+
GMD: {
|
|
14990
|
+
name: "Gambian Dalasi",
|
|
14991
|
+
demonym: "Gambian",
|
|
14992
|
+
majorSingle: "Dalasi",
|
|
14993
|
+
majorPlural: "Dalasis",
|
|
14994
|
+
ISOnum: 270,
|
|
14995
|
+
symbol: "D",
|
|
14996
|
+
symbolNative: "D",
|
|
14997
|
+
minorSingle: "Butut",
|
|
14998
|
+
minorPlural: "Bututs",
|
|
14999
|
+
ISOdigits: 2,
|
|
15000
|
+
decimals: 2,
|
|
15001
|
+
numToBasic: 100
|
|
15002
|
+
},
|
|
15003
|
+
GNF: {
|
|
15004
|
+
name: "Guinean Franc",
|
|
15005
|
+
demonym: "Guinean",
|
|
15006
|
+
majorSingle: "Franc",
|
|
15007
|
+
majorPlural: "Francs",
|
|
15008
|
+
ISOnum: 324,
|
|
15009
|
+
symbol: "FG",
|
|
15010
|
+
symbolNative: "FG",
|
|
15011
|
+
minorSingle: "Centime",
|
|
15012
|
+
minorPlural: "Centimes",
|
|
15013
|
+
ISOdigits: 0,
|
|
15014
|
+
decimals: 2,
|
|
15015
|
+
numToBasic: 100
|
|
15016
|
+
},
|
|
15017
|
+
GTQ: {
|
|
15018
|
+
name: "Guatemalan Quetzal",
|
|
15019
|
+
demonym: "Guatemalan",
|
|
15020
|
+
majorSingle: "Quetzal",
|
|
15021
|
+
majorPlural: "Quetzales",
|
|
15022
|
+
ISOnum: 320,
|
|
15023
|
+
symbol: "Q",
|
|
15024
|
+
symbolNative: "$",
|
|
15025
|
+
minorSingle: "Centavo",
|
|
15026
|
+
minorPlural: "Centavos",
|
|
15027
|
+
ISOdigits: 2,
|
|
15028
|
+
decimals: 2,
|
|
15029
|
+
numToBasic: 100
|
|
15030
|
+
},
|
|
15031
|
+
GYD: {
|
|
15032
|
+
name: "Guyanese Dollar",
|
|
15033
|
+
demonym: "Guyanese",
|
|
15034
|
+
majorSingle: "Dollar",
|
|
15035
|
+
majorPlural: "Dollars",
|
|
15036
|
+
ISOnum: 328,
|
|
15037
|
+
symbol: "G$",
|
|
15038
|
+
symbolNative: "$",
|
|
15039
|
+
minorSingle: "Cent",
|
|
15040
|
+
minorPlural: "Cents",
|
|
15041
|
+
ISOdigits: 2,
|
|
15042
|
+
decimals: 2,
|
|
15043
|
+
numToBasic: 100
|
|
15044
|
+
},
|
|
15045
|
+
HKD: {
|
|
15046
|
+
name: "Hong Kong Dollar",
|
|
15047
|
+
demonym: "Hong Kong",
|
|
15048
|
+
majorSingle: "Dollar",
|
|
15049
|
+
majorPlural: "Dollars",
|
|
15050
|
+
ISOnum: 344,
|
|
15051
|
+
symbol: "HK$",
|
|
15052
|
+
symbolNative: "$",
|
|
15053
|
+
minorSingle: "Cent",
|
|
15054
|
+
minorPlural: "Cents",
|
|
15055
|
+
ISOdigits: 2,
|
|
15056
|
+
decimals: 2,
|
|
15057
|
+
numToBasic: 100
|
|
15058
|
+
},
|
|
15059
|
+
HNL: {
|
|
15060
|
+
name: "Honduran Lempira",
|
|
15061
|
+
demonym: "Honduran",
|
|
15062
|
+
majorSingle: "Lempira",
|
|
15063
|
+
majorPlural: "Lempiras",
|
|
15064
|
+
ISOnum: 340,
|
|
15065
|
+
symbol: "L",
|
|
15066
|
+
symbolNative: "L",
|
|
15067
|
+
minorSingle: "Centavo",
|
|
15068
|
+
minorPlural: "Centavos",
|
|
15069
|
+
ISOdigits: 2,
|
|
15070
|
+
decimals: 2,
|
|
15071
|
+
numToBasic: 100
|
|
15072
|
+
},
|
|
15073
|
+
HRK: {
|
|
15074
|
+
name: "Croatian Kuna",
|
|
15075
|
+
demonym: "Croatian",
|
|
15076
|
+
majorSingle: "Kuna",
|
|
15077
|
+
majorPlural: "Kuna",
|
|
15078
|
+
ISOnum: 191,
|
|
15079
|
+
symbol: "kn",
|
|
15080
|
+
symbolNative: "kn",
|
|
15081
|
+
minorSingle: "Lipa",
|
|
15082
|
+
minorPlural: "Lipa",
|
|
15083
|
+
ISOdigits: 2,
|
|
15084
|
+
decimals: 2,
|
|
15085
|
+
numToBasic: 100
|
|
15086
|
+
},
|
|
15087
|
+
HTG: {
|
|
15088
|
+
name: "Haitian Gourde",
|
|
15089
|
+
demonym: "Haitian",
|
|
15090
|
+
majorSingle: "Gourde",
|
|
15091
|
+
majorPlural: "Gourdes",
|
|
15092
|
+
ISOnum: 332,
|
|
15093
|
+
symbol: "G",
|
|
15094
|
+
symbolNative: "G",
|
|
15095
|
+
minorSingle: "Centime",
|
|
15096
|
+
minorPlural: "Centimes",
|
|
15097
|
+
ISOdigits: 2,
|
|
15098
|
+
decimals: 2,
|
|
15099
|
+
numToBasic: 100
|
|
15100
|
+
},
|
|
15101
|
+
HUF: {
|
|
15102
|
+
name: "Hungarian Forint",
|
|
15103
|
+
demonym: "Hungarian",
|
|
15104
|
+
majorSingle: "Forint",
|
|
15105
|
+
majorPlural: "Forint",
|
|
15106
|
+
ISOnum: 348,
|
|
15107
|
+
symbol: "Ft",
|
|
15108
|
+
symbolNative: "Ft",
|
|
15109
|
+
minorSingle: "fill\xE9r",
|
|
15110
|
+
minorPlural: "fill\xE9r",
|
|
15111
|
+
ISOdigits: 2,
|
|
15112
|
+
decimals: 2,
|
|
15113
|
+
numToBasic: 100
|
|
15114
|
+
},
|
|
15115
|
+
IDR: {
|
|
15116
|
+
name: "Indonesian Rupiah",
|
|
15117
|
+
demonym: "Indonesian",
|
|
15118
|
+
majorSingle: "Rupiah",
|
|
15119
|
+
majorPlural: "Rupiah",
|
|
15120
|
+
ISOnum: 360,
|
|
15121
|
+
symbol: "Rp",
|
|
15122
|
+
symbolNative: "Rp",
|
|
15123
|
+
minorSingle: "Sen",
|
|
15124
|
+
minorPlural: "Sen",
|
|
15125
|
+
ISOdigits: 2,
|
|
15126
|
+
decimals: 2,
|
|
15127
|
+
numToBasic: 100
|
|
15128
|
+
},
|
|
15129
|
+
ILS: {
|
|
15130
|
+
name: "Israeli new Shekel",
|
|
15131
|
+
demonym: "Israeli",
|
|
15132
|
+
majorSingle: "Shekel",
|
|
15133
|
+
majorPlural: "Shekels",
|
|
15134
|
+
ISOnum: 376,
|
|
15135
|
+
symbol: "\u20AA",
|
|
15136
|
+
symbolNative: "\u20AA",
|
|
15137
|
+
minorSingle: "Agora",
|
|
15138
|
+
minorPlural: "Agoras",
|
|
15139
|
+
ISOdigits: 2,
|
|
15140
|
+
decimals: 2,
|
|
15141
|
+
numToBasic: 100
|
|
15142
|
+
},
|
|
15143
|
+
IMP: {
|
|
15144
|
+
name: "Manx Pound",
|
|
15145
|
+
demonym: "Manx",
|
|
15146
|
+
majorSingle: "Pound",
|
|
15147
|
+
majorPlural: "Pounds",
|
|
15148
|
+
ISOnum: null,
|
|
15149
|
+
symbol: "\xA3",
|
|
15150
|
+
symbolNative: "\xA3",
|
|
15151
|
+
minorSingle: "Penny",
|
|
15152
|
+
minorPlural: "Pence",
|
|
15153
|
+
ISOdigits: 2,
|
|
15154
|
+
decimals: 2,
|
|
15155
|
+
numToBasic: 100
|
|
15156
|
+
},
|
|
15157
|
+
INR: {
|
|
15158
|
+
name: "Indian Rupee",
|
|
15159
|
+
demonym: "Indian",
|
|
15160
|
+
majorSingle: "Rupee",
|
|
15161
|
+
majorPlural: "Rupees",
|
|
15162
|
+
ISOnum: 356,
|
|
15163
|
+
symbol: "Rs.",
|
|
15164
|
+
symbolNative: "\u20B9",
|
|
15165
|
+
minorSingle: "Paisa",
|
|
15166
|
+
minorPlural: "Paise",
|
|
15167
|
+
ISOdigits: 2,
|
|
15168
|
+
decimals: 2,
|
|
15169
|
+
numToBasic: 100
|
|
15170
|
+
},
|
|
15171
|
+
IQD: {
|
|
15172
|
+
name: "Iraqi Dinar",
|
|
15173
|
+
demonym: "Iraqi",
|
|
15174
|
+
majorSingle: "Dinar",
|
|
15175
|
+
majorPlural: "Dinars",
|
|
15176
|
+
ISOnum: 368,
|
|
15177
|
+
symbol: "\u062F.\u0639.",
|
|
15178
|
+
symbolNative: "\u062F.\u0639.",
|
|
15179
|
+
minorSingle: "Fils",
|
|
15180
|
+
minorPlural: "Fils",
|
|
15181
|
+
ISOdigits: 3,
|
|
15182
|
+
decimals: 3,
|
|
15183
|
+
numToBasic: 1e3
|
|
15184
|
+
},
|
|
15185
|
+
IRR: {
|
|
15186
|
+
name: "Iranian Rial",
|
|
15187
|
+
demonym: "Iranian",
|
|
15188
|
+
majorSingle: "Rial",
|
|
15189
|
+
majorPlural: "Rials",
|
|
15190
|
+
ISOnum: 364,
|
|
15191
|
+
symbol: "\uFDFC",
|
|
15192
|
+
symbolNative: "\uFDFC",
|
|
15193
|
+
minorSingle: "Dinar",
|
|
15194
|
+
minorPlural: "Dinars",
|
|
15195
|
+
ISOdigits: 2,
|
|
15196
|
+
decimals: 2,
|
|
15197
|
+
numToBasic: 100
|
|
15198
|
+
},
|
|
15199
|
+
ISK: {
|
|
15200
|
+
name: "Icelandic Krona",
|
|
15201
|
+
demonym: "Icelandic",
|
|
15202
|
+
majorSingle: "Krona",
|
|
15203
|
+
majorPlural: "Kr\xF3nur",
|
|
15204
|
+
ISOnum: 352,
|
|
15205
|
+
symbol: "kr",
|
|
15206
|
+
symbolNative: "kr",
|
|
15207
|
+
minorSingle: "Aurar",
|
|
15208
|
+
minorPlural: "Aurar",
|
|
15209
|
+
ISOdigits: 0,
|
|
15210
|
+
decimals: 2,
|
|
15211
|
+
numToBasic: 100
|
|
15212
|
+
},
|
|
15213
|
+
JEP: {
|
|
15214
|
+
name: "Jersey Pound",
|
|
15215
|
+
demonym: "Jersey",
|
|
15216
|
+
majorSingle: "Pound",
|
|
15217
|
+
majorPlural: "Pounds",
|
|
15218
|
+
ISOnum: null,
|
|
15219
|
+
symbol: "\xA3",
|
|
15220
|
+
symbolNative: "\xA3",
|
|
15221
|
+
minorSingle: "Penny",
|
|
15222
|
+
minorPlural: "Pence",
|
|
15223
|
+
ISOdigits: 2,
|
|
15224
|
+
decimals: 2,
|
|
15225
|
+
numToBasic: 100
|
|
15226
|
+
},
|
|
15227
|
+
JMD: {
|
|
15228
|
+
name: "Jamaican Dollar",
|
|
15229
|
+
demonym: "Jamaican",
|
|
15230
|
+
majorSingle: "Dollar",
|
|
15231
|
+
majorPlural: "Dollars",
|
|
15232
|
+
ISOnum: 388,
|
|
15233
|
+
symbol: "J$",
|
|
15234
|
+
symbolNative: "$",
|
|
15235
|
+
minorSingle: "Cent",
|
|
15236
|
+
minorPlural: "Cents",
|
|
15237
|
+
ISOdigits: 2,
|
|
15238
|
+
decimals: 2,
|
|
15239
|
+
numToBasic: 100
|
|
15240
|
+
},
|
|
15241
|
+
JOD: {
|
|
15242
|
+
name: "Jordanian Dinar",
|
|
15243
|
+
demonym: "Jordanian",
|
|
15244
|
+
majorSingle: "Dinar",
|
|
15245
|
+
majorPlural: "Dinars",
|
|
15246
|
+
ISOnum: 400,
|
|
15247
|
+
symbol: "JD",
|
|
15248
|
+
symbolNative: "\u062F.\u0623.",
|
|
15249
|
+
minorSingle: "Fils",
|
|
15250
|
+
minorPlural: "Fils",
|
|
15251
|
+
ISOdigits: 3,
|
|
15252
|
+
decimals: 3,
|
|
15253
|
+
numToBasic: 1e3
|
|
15254
|
+
},
|
|
15255
|
+
JPY: {
|
|
15256
|
+
name: "Japanese Yen",
|
|
15257
|
+
demonym: "Japanese",
|
|
15258
|
+
majorSingle: "Yen",
|
|
15259
|
+
majorPlural: "Yen",
|
|
15260
|
+
ISOnum: 392,
|
|
15261
|
+
symbol: "\xA5",
|
|
15262
|
+
symbolNative: "\xA5",
|
|
15263
|
+
minorSingle: "Sen",
|
|
15264
|
+
minorPlural: "Sen",
|
|
15265
|
+
ISOdigits: 0,
|
|
15266
|
+
decimals: 2,
|
|
15267
|
+
numToBasic: 100
|
|
15268
|
+
},
|
|
15269
|
+
KES: {
|
|
15270
|
+
name: "Kenyan Shilling",
|
|
15271
|
+
demonym: "Kenyan",
|
|
15272
|
+
majorSingle: "Shilling",
|
|
15273
|
+
majorPlural: "Shillings",
|
|
15274
|
+
ISOnum: 404,
|
|
15275
|
+
symbol: "KSh",
|
|
15276
|
+
symbolNative: "KSh",
|
|
15277
|
+
minorSingle: "Cent",
|
|
15278
|
+
minorPlural: "Cents",
|
|
15279
|
+
ISOdigits: 2,
|
|
15280
|
+
decimals: 2,
|
|
15281
|
+
numToBasic: 100
|
|
15282
|
+
},
|
|
15283
|
+
KGS: {
|
|
15284
|
+
name: "Kyrgyzstani Som",
|
|
15285
|
+
demonym: "Kyrgyzstani",
|
|
15286
|
+
majorSingle: "Som",
|
|
15287
|
+
majorPlural: "Som",
|
|
15288
|
+
ISOnum: 417,
|
|
15289
|
+
symbol: "\u0441",
|
|
15290
|
+
symbolNative: "\u0441",
|
|
15291
|
+
minorSingle: "Tyiyn",
|
|
15292
|
+
minorPlural: "Tyiyn",
|
|
15293
|
+
ISOdigits: 2,
|
|
15294
|
+
decimals: 2,
|
|
15295
|
+
numToBasic: 100
|
|
15296
|
+
},
|
|
15297
|
+
KHR: {
|
|
15298
|
+
name: "Cambodian Riel",
|
|
15299
|
+
demonym: "Cambodian",
|
|
15300
|
+
majorSingle: "Riel",
|
|
15301
|
+
majorPlural: "Riels",
|
|
15302
|
+
ISOnum: 116,
|
|
15303
|
+
symbol: "\u17DB",
|
|
15304
|
+
symbolNative: "\u17DB",
|
|
15305
|
+
minorSingle: "Sen",
|
|
15306
|
+
minorPlural: "Sen",
|
|
15307
|
+
ISOdigits: 2,
|
|
15308
|
+
decimals: 2,
|
|
15309
|
+
numToBasic: 100
|
|
15310
|
+
},
|
|
15311
|
+
KID: {
|
|
15312
|
+
name: "Kiribati Dollar",
|
|
15313
|
+
demonym: "Kiribati",
|
|
15314
|
+
majorSingle: "Dollar",
|
|
15315
|
+
majorPlural: "Dollars",
|
|
15316
|
+
ISOnum: null,
|
|
15317
|
+
symbol: "$",
|
|
15318
|
+
symbolNative: "$",
|
|
15319
|
+
minorSingle: "Cent",
|
|
15320
|
+
minorPlural: "Cents",
|
|
15321
|
+
ISOdigits: 2,
|
|
15322
|
+
decimals: 2,
|
|
15323
|
+
numToBasic: 100
|
|
15324
|
+
},
|
|
15325
|
+
KMF: {
|
|
15326
|
+
name: "Comorian Franc",
|
|
15327
|
+
demonym: "Comorian",
|
|
15328
|
+
majorSingle: "Franc",
|
|
15329
|
+
majorPlural: "Francs",
|
|
15330
|
+
ISOnum: 174,
|
|
15331
|
+
symbol: "CF",
|
|
15332
|
+
symbolNative: "CF",
|
|
15333
|
+
minorSingle: "Centime",
|
|
15334
|
+
minorPlural: "Centimes",
|
|
15335
|
+
ISOdigits: 0,
|
|
15336
|
+
decimals: 2,
|
|
15337
|
+
numToBasic: 100
|
|
15338
|
+
},
|
|
15339
|
+
KPW: {
|
|
15340
|
+
name: "North Korean Won",
|
|
15341
|
+
demonym: "North Korean",
|
|
15342
|
+
majorSingle: "Won",
|
|
15343
|
+
majorPlural: "Won",
|
|
15344
|
+
ISOnum: 408,
|
|
15345
|
+
symbol: "\u20A9",
|
|
15346
|
+
symbolNative: "\u20A9",
|
|
15347
|
+
minorSingle: "Chon",
|
|
15348
|
+
minorPlural: "Chon",
|
|
15349
|
+
ISOdigits: 2,
|
|
15350
|
+
decimals: 2,
|
|
15351
|
+
numToBasic: 100
|
|
15352
|
+
},
|
|
15353
|
+
KRW: {
|
|
15354
|
+
name: "South Korean Won",
|
|
15355
|
+
demonym: "South Korean",
|
|
15356
|
+
majorSingle: "Won",
|
|
15357
|
+
majorPlural: "Won",
|
|
15358
|
+
ISOnum: 410,
|
|
15359
|
+
symbol: "\u20A9",
|
|
15360
|
+
symbolNative: "\u20A9",
|
|
15361
|
+
minorSingle: "Jeon",
|
|
15362
|
+
minorPlural: "Jeon",
|
|
15363
|
+
ISOdigits: 0,
|
|
15364
|
+
decimals: 2,
|
|
15365
|
+
numToBasic: 100
|
|
15366
|
+
},
|
|
15367
|
+
KWD: {
|
|
15368
|
+
name: "Kuwaiti Dinar",
|
|
15369
|
+
demonym: "Kuwaiti",
|
|
15370
|
+
majorSingle: "Dinar",
|
|
15371
|
+
majorPlural: "Dinars",
|
|
15372
|
+
ISOnum: 414,
|
|
15373
|
+
symbol: "KD",
|
|
15374
|
+
symbolNative: "\u062F.\u0643.",
|
|
15375
|
+
minorSingle: "Fils",
|
|
15376
|
+
minorPlural: "Fils",
|
|
15377
|
+
ISOdigits: 3,
|
|
15378
|
+
decimals: 3,
|
|
15379
|
+
numToBasic: 1e3
|
|
15380
|
+
},
|
|
15381
|
+
KYD: {
|
|
15382
|
+
name: "Cayman Islands Dollar",
|
|
15383
|
+
demonym: "Cayman Islands",
|
|
15384
|
+
majorSingle: "Dollar",
|
|
15385
|
+
majorPlural: "Dollars",
|
|
15386
|
+
ISOnum: 136,
|
|
15387
|
+
symbol: "CI$",
|
|
15388
|
+
symbolNative: "$",
|
|
15389
|
+
minorSingle: "Cent",
|
|
15390
|
+
minorPlural: "Cents",
|
|
15391
|
+
ISOdigits: 2,
|
|
15392
|
+
decimals: 2,
|
|
15393
|
+
numToBasic: 100
|
|
15394
|
+
},
|
|
15395
|
+
KZT: {
|
|
15396
|
+
name: "Kazakhstani Tenge",
|
|
15397
|
+
demonym: "Kazakhstani",
|
|
15398
|
+
majorSingle: "Tenge",
|
|
15399
|
+
majorPlural: "Tenge",
|
|
15400
|
+
ISOnum: 398,
|
|
15401
|
+
symbol: "\u20B8",
|
|
15402
|
+
symbolNative: "\u20B8",
|
|
15403
|
+
minorSingle: "T\u0131yn",
|
|
15404
|
+
minorPlural: "T\u0131yn",
|
|
15405
|
+
ISOdigits: 2,
|
|
15406
|
+
decimals: 2,
|
|
15407
|
+
numToBasic: 100
|
|
15408
|
+
},
|
|
15409
|
+
LAK: {
|
|
15410
|
+
name: "Lao Kip",
|
|
15411
|
+
demonym: "Lao",
|
|
15412
|
+
majorSingle: "Kip",
|
|
15413
|
+
majorPlural: "Kip",
|
|
15414
|
+
ISOnum: 418,
|
|
15415
|
+
symbol: "\u20ADN",
|
|
15416
|
+
symbolNative: "\u20AD",
|
|
15417
|
+
minorSingle: "Att",
|
|
15418
|
+
minorPlural: "Att",
|
|
15419
|
+
ISOdigits: 2,
|
|
15420
|
+
decimals: 2,
|
|
15421
|
+
numToBasic: 100
|
|
15422
|
+
},
|
|
15423
|
+
LBP: {
|
|
15424
|
+
name: "Lebanese Pound",
|
|
15425
|
+
demonym: "Lebanese",
|
|
15426
|
+
majorSingle: "Pound",
|
|
15427
|
+
majorPlural: "Pounds",
|
|
15428
|
+
ISOnum: 422,
|
|
15429
|
+
symbol: "LL.",
|
|
15430
|
+
symbolNative: "\u0644.\u0644.",
|
|
15431
|
+
minorSingle: "Qirsh",
|
|
15432
|
+
minorPlural: "Qirsh",
|
|
15433
|
+
ISOdigits: 2,
|
|
15434
|
+
decimals: 2,
|
|
15435
|
+
numToBasic: 100
|
|
15436
|
+
},
|
|
15437
|
+
LKR: {
|
|
15438
|
+
name: "Sri Lankan Rupee",
|
|
15439
|
+
demonym: "Sri Lankan",
|
|
15440
|
+
majorSingle: "Rupee",
|
|
15441
|
+
majorPlural: "Rupees",
|
|
15442
|
+
ISOnum: 144,
|
|
15443
|
+
symbol: "Rs.",
|
|
15444
|
+
symbolNative: "\u0DBB\u0DD4 or \u0BB0\u0BC2",
|
|
15445
|
+
minorSingle: "Cent",
|
|
15446
|
+
minorPlural: "Cents",
|
|
15447
|
+
ISOdigits: 2,
|
|
15448
|
+
decimals: 2,
|
|
15449
|
+
numToBasic: 100
|
|
15450
|
+
},
|
|
15451
|
+
LRD: {
|
|
15452
|
+
name: "Liberian Dollar",
|
|
15453
|
+
demonym: "Liberian",
|
|
15454
|
+
majorSingle: "Dollar",
|
|
15455
|
+
majorPlural: "Dollars",
|
|
15456
|
+
ISOnum: 430,
|
|
15457
|
+
symbol: "L$",
|
|
15458
|
+
symbolNative: "$",
|
|
15459
|
+
minorSingle: "Cent",
|
|
15460
|
+
minorPlural: "Cents",
|
|
15461
|
+
ISOdigits: 2,
|
|
15462
|
+
decimals: 2,
|
|
15463
|
+
numToBasic: 100
|
|
15464
|
+
},
|
|
15465
|
+
LSL: {
|
|
15466
|
+
name: "Lesotho Loti",
|
|
15467
|
+
demonym: "Lesotho",
|
|
15468
|
+
majorSingle: "Loti",
|
|
15469
|
+
majorPlural: "maLoti",
|
|
15470
|
+
ISOnum: 426,
|
|
15471
|
+
symbol: "L",
|
|
15472
|
+
symbolNative: "L",
|
|
15473
|
+
minorSingle: "Sente",
|
|
15474
|
+
minorPlural: "Lisente",
|
|
15475
|
+
ISOdigits: 2,
|
|
15476
|
+
decimals: 2,
|
|
15477
|
+
numToBasic: 100
|
|
15478
|
+
},
|
|
15479
|
+
LYD: {
|
|
15480
|
+
name: "Libyan Dinar",
|
|
15481
|
+
demonym: "Libyan",
|
|
15482
|
+
majorSingle: "Dinar",
|
|
15483
|
+
majorPlural: "Dinars",
|
|
15484
|
+
ISOnum: 434,
|
|
15485
|
+
symbol: "LD",
|
|
15486
|
+
symbolNative: "\u0644.\u062F.",
|
|
15487
|
+
minorSingle: "Dirham",
|
|
15488
|
+
minorPlural: "Dirhams",
|
|
15489
|
+
ISOdigits: 3,
|
|
15490
|
+
decimals: 3,
|
|
15491
|
+
numToBasic: 1e3
|
|
15492
|
+
},
|
|
15493
|
+
MAD: {
|
|
15494
|
+
name: "Moroccan Dirham",
|
|
15495
|
+
demonym: "Moroccan",
|
|
15496
|
+
majorSingle: "Dirham",
|
|
15497
|
+
majorPlural: "Dirhams",
|
|
15498
|
+
ISOnum: 504,
|
|
15499
|
+
symbol: "DH",
|
|
15500
|
+
symbolNative: "\u062F.\u0645.",
|
|
15501
|
+
minorSingle: "Centime",
|
|
15502
|
+
minorPlural: "Centimes",
|
|
15503
|
+
ISOdigits: 2,
|
|
15504
|
+
decimals: 2,
|
|
15505
|
+
numToBasic: 100
|
|
15506
|
+
},
|
|
15507
|
+
MDL: {
|
|
15508
|
+
name: "Moldovan Leu",
|
|
15509
|
+
demonym: "Moldovan",
|
|
15510
|
+
majorSingle: "Leu",
|
|
15511
|
+
majorPlural: "Lei",
|
|
15512
|
+
ISOnum: 498,
|
|
15513
|
+
symbol: "L",
|
|
15514
|
+
symbolNative: "L",
|
|
15515
|
+
minorSingle: "Ban",
|
|
15516
|
+
minorPlural: "Bani",
|
|
15517
|
+
ISOdigits: 2,
|
|
15518
|
+
decimals: 2,
|
|
15519
|
+
numToBasic: 100
|
|
15520
|
+
},
|
|
15521
|
+
MGA: {
|
|
15522
|
+
name: "Malagasy Ariary",
|
|
15523
|
+
demonym: "Malagasy",
|
|
15524
|
+
majorSingle: "Ariary",
|
|
15525
|
+
majorPlural: "Ariary",
|
|
15526
|
+
ISOnum: 969,
|
|
15527
|
+
symbol: "Ar",
|
|
15528
|
+
symbolNative: "Ar",
|
|
15529
|
+
minorSingle: "Iraimbilanja",
|
|
15530
|
+
minorPlural: "Iraimbilanja",
|
|
15531
|
+
ISOdigits: 2,
|
|
15532
|
+
decimals: 0,
|
|
15533
|
+
numToBasic: 5
|
|
15534
|
+
},
|
|
15535
|
+
MKD: {
|
|
15536
|
+
name: "Macedonian Denar",
|
|
15537
|
+
demonym: "Macedonian",
|
|
15538
|
+
majorSingle: "Denar",
|
|
15539
|
+
majorPlural: "Denars",
|
|
15540
|
+
ISOnum: 807,
|
|
15541
|
+
symbol: "den",
|
|
15542
|
+
symbolNative: "\u0434\u0435\u043D",
|
|
15543
|
+
minorSingle: "Deni",
|
|
15544
|
+
minorPlural: "Deni",
|
|
15545
|
+
ISOdigits: 2,
|
|
15546
|
+
decimals: 2,
|
|
15547
|
+
numToBasic: 100
|
|
15548
|
+
},
|
|
15549
|
+
MMK: {
|
|
15550
|
+
name: "Myanmar Kyat",
|
|
15551
|
+
demonym: "Myanmar",
|
|
15552
|
+
majorSingle: "Kyat",
|
|
15553
|
+
majorPlural: "Kyat",
|
|
15554
|
+
ISOnum: 104,
|
|
15555
|
+
symbol: "Ks",
|
|
15556
|
+
symbolNative: "Ks",
|
|
15557
|
+
minorSingle: "Pya",
|
|
15558
|
+
minorPlural: "Pya",
|
|
15559
|
+
ISOdigits: 2,
|
|
15560
|
+
decimals: 2,
|
|
15561
|
+
numToBasic: 100
|
|
15562
|
+
},
|
|
15563
|
+
MNT: {
|
|
15564
|
+
name: "Mongolian T\xF6gr\xF6g",
|
|
15565
|
+
demonym: "Mongolian",
|
|
15566
|
+
majorSingle: "T\xF6gr\xF6g",
|
|
15567
|
+
majorPlural: "T\xF6gr\xF6g",
|
|
15568
|
+
ISOnum: 496,
|
|
15569
|
+
symbol: "\u20AE",
|
|
15570
|
+
symbolNative: "\u20AE",
|
|
15571
|
+
minorSingle: "m\xF6ng\xF6",
|
|
15572
|
+
minorPlural: "m\xF6ng\xF6",
|
|
15573
|
+
ISOdigits: 2,
|
|
15574
|
+
decimals: 2,
|
|
15575
|
+
numToBasic: 100
|
|
15576
|
+
},
|
|
15577
|
+
MOP: {
|
|
15578
|
+
name: "Macanese Pataca",
|
|
15579
|
+
demonym: "Macanese",
|
|
15580
|
+
majorSingle: "Pataca",
|
|
15581
|
+
majorPlural: "Patacas",
|
|
15582
|
+
ISOnum: 446,
|
|
15583
|
+
symbol: "MOP$",
|
|
15584
|
+
symbolNative: "MOP$",
|
|
15585
|
+
minorSingle: "Avo",
|
|
15586
|
+
minorPlural: "Avos",
|
|
15587
|
+
ISOdigits: 2,
|
|
15588
|
+
decimals: 2,
|
|
15589
|
+
numToBasic: 100
|
|
15590
|
+
},
|
|
15591
|
+
MRU: {
|
|
15592
|
+
name: "Mauritanian Ouguiya",
|
|
15593
|
+
demonym: "Mauritanian",
|
|
15594
|
+
majorSingle: "Ouguiya",
|
|
15595
|
+
majorPlural: "Ouguiya",
|
|
15596
|
+
ISOnum: 929,
|
|
15597
|
+
symbol: "UM",
|
|
15598
|
+
symbolNative: "\u0623.\u0645.",
|
|
15599
|
+
minorSingle: "Khoums",
|
|
15600
|
+
minorPlural: "Khoums",
|
|
15601
|
+
ISOdigits: 2,
|
|
15602
|
+
decimals: 0,
|
|
15603
|
+
numToBasic: 5
|
|
15604
|
+
},
|
|
15605
|
+
MUR: {
|
|
15606
|
+
name: "Mauritian Rupee",
|
|
15607
|
+
demonym: "Mauritian",
|
|
15608
|
+
majorSingle: "Rupee",
|
|
15609
|
+
majorPlural: "Rupees",
|
|
15610
|
+
ISOnum: 480,
|
|
15611
|
+
symbol: "Rs.",
|
|
15612
|
+
symbolNative: "\u0930\u0941 ",
|
|
15613
|
+
minorSingle: "Cent",
|
|
15614
|
+
minorPlural: "Cents",
|
|
15615
|
+
ISOdigits: 2,
|
|
15616
|
+
decimals: 2,
|
|
15617
|
+
numToBasic: 100
|
|
15618
|
+
},
|
|
15619
|
+
MVR: {
|
|
15620
|
+
name: "Maldivian Rufiyaa",
|
|
15621
|
+
demonym: "Maldivian",
|
|
15622
|
+
majorSingle: "Rufiyaa",
|
|
15623
|
+
majorPlural: "Rufiyaa",
|
|
15624
|
+
ISOnum: 462,
|
|
15625
|
+
symbol: "MRf",
|
|
15626
|
+
symbolNative: ".\u0783",
|
|
15627
|
+
minorSingle: "laari",
|
|
15628
|
+
minorPlural: "laari",
|
|
15629
|
+
ISOdigits: 2,
|
|
15630
|
+
decimals: 2,
|
|
15631
|
+
numToBasic: 100
|
|
15632
|
+
},
|
|
15633
|
+
MWK: {
|
|
15634
|
+
name: "Malawian Kwacha",
|
|
15635
|
+
demonym: "Malawian",
|
|
15636
|
+
majorSingle: "Kwacha",
|
|
15637
|
+
majorPlural: "Kwacha",
|
|
15638
|
+
ISOnum: 454,
|
|
15639
|
+
symbol: "MK",
|
|
15640
|
+
symbolNative: "MK",
|
|
15641
|
+
minorSingle: "Tambala",
|
|
15642
|
+
minorPlural: "Tambala",
|
|
15643
|
+
ISOdigits: 2,
|
|
15644
|
+
decimals: 2,
|
|
15645
|
+
numToBasic: 100
|
|
15646
|
+
},
|
|
15647
|
+
MXN: {
|
|
15648
|
+
name: "Mexican Peso",
|
|
15649
|
+
demonym: "Mexican",
|
|
15650
|
+
majorSingle: "Peso",
|
|
15651
|
+
majorPlural: "Pesos",
|
|
15652
|
+
ISOnum: 484,
|
|
15653
|
+
symbol: "MX$",
|
|
15654
|
+
symbolNative: "$",
|
|
15655
|
+
minorSingle: "Centavo",
|
|
15656
|
+
minorPlural: "Centavos",
|
|
15657
|
+
ISOdigits: 2,
|
|
15658
|
+
decimals: 2,
|
|
15659
|
+
numToBasic: 100
|
|
15660
|
+
},
|
|
15661
|
+
MYR: {
|
|
15662
|
+
name: "Malaysian Ringgit",
|
|
15663
|
+
demonym: "Malaysian",
|
|
15664
|
+
majorSingle: "Ringgit",
|
|
15665
|
+
majorPlural: "Ringgit",
|
|
15666
|
+
ISOnum: 458,
|
|
15667
|
+
symbol: "RM",
|
|
15668
|
+
symbolNative: "RM",
|
|
15669
|
+
minorSingle: "Sen",
|
|
15670
|
+
minorPlural: "Sen",
|
|
15671
|
+
ISOdigits: 2,
|
|
15672
|
+
decimals: 2,
|
|
15673
|
+
numToBasic: 100
|
|
15674
|
+
},
|
|
15675
|
+
MZN: {
|
|
15676
|
+
name: "Mozambican Metical",
|
|
15677
|
+
demonym: "Mozambican",
|
|
15678
|
+
majorSingle: "Metical",
|
|
15679
|
+
majorPlural: "Meticais",
|
|
15680
|
+
ISOnum: 943,
|
|
15681
|
+
symbol: "MTn",
|
|
15682
|
+
symbolNative: "MT",
|
|
15683
|
+
minorSingle: "Centavo",
|
|
15684
|
+
minorPlural: "Centavos",
|
|
15685
|
+
ISOdigits: 2,
|
|
15686
|
+
decimals: 2,
|
|
15687
|
+
numToBasic: 100
|
|
15688
|
+
},
|
|
15689
|
+
NAD: {
|
|
15690
|
+
name: "Namibian Dollar",
|
|
15691
|
+
demonym: "Namibian",
|
|
15692
|
+
majorSingle: "Dollar",
|
|
15693
|
+
majorPlural: "Dollars",
|
|
15694
|
+
ISOnum: 516,
|
|
15695
|
+
symbol: "N$",
|
|
15696
|
+
symbolNative: "$",
|
|
15697
|
+
minorSingle: "Cent",
|
|
15698
|
+
minorPlural: "Cents",
|
|
15699
|
+
ISOdigits: 2,
|
|
15700
|
+
decimals: 2,
|
|
15701
|
+
numToBasic: 100
|
|
15702
|
+
},
|
|
15703
|
+
NGN: {
|
|
15704
|
+
name: "Nigerian Naira",
|
|
15705
|
+
demonym: "Nigerian",
|
|
15706
|
+
majorSingle: "Naira",
|
|
15707
|
+
majorPlural: "Naira",
|
|
15708
|
+
ISOnum: 566,
|
|
15709
|
+
symbol: "\u20A6",
|
|
15710
|
+
symbolNative: "\u20A6",
|
|
15711
|
+
minorSingle: "Kobo",
|
|
15712
|
+
minorPlural: "Kobo",
|
|
15713
|
+
ISOdigits: 2,
|
|
15714
|
+
decimals: 2,
|
|
15715
|
+
numToBasic: 100
|
|
15716
|
+
},
|
|
15717
|
+
NIO: {
|
|
15718
|
+
name: "Nicaraguan C\xF3rdoba",
|
|
15719
|
+
demonym: "Nicaraguan",
|
|
15720
|
+
majorSingle: "C\xF3rdoba Oro",
|
|
15721
|
+
majorPlural: "C\xF3rdoba Oro",
|
|
15722
|
+
ISOnum: 558,
|
|
15723
|
+
symbol: "C$",
|
|
15724
|
+
symbolNative: "C$",
|
|
15725
|
+
minorSingle: "Centavo",
|
|
15726
|
+
minorPlural: "Centavos",
|
|
15727
|
+
ISOdigits: 2,
|
|
15728
|
+
decimals: 2,
|
|
15729
|
+
numToBasic: 100
|
|
15730
|
+
},
|
|
15731
|
+
NOK: {
|
|
15732
|
+
name: "Norwegian Krone",
|
|
15733
|
+
demonym: "Norwegian",
|
|
15734
|
+
majorSingle: "Krone",
|
|
15735
|
+
majorPlural: "Kroner",
|
|
15736
|
+
ISOnum: 578,
|
|
15737
|
+
symbol: "kr",
|
|
15738
|
+
symbolNative: "kr",
|
|
15739
|
+
minorSingle: "\xF8re",
|
|
15740
|
+
minorPlural: "\xF8re",
|
|
15741
|
+
ISOdigits: 2,
|
|
15742
|
+
decimals: 2,
|
|
15743
|
+
numToBasic: 100
|
|
15744
|
+
},
|
|
15745
|
+
NPR: {
|
|
15746
|
+
name: "Nepalese Rupee",
|
|
15747
|
+
demonym: "Nepalese",
|
|
15748
|
+
majorSingle: "Rupee",
|
|
15749
|
+
majorPlural: "Rupees",
|
|
15750
|
+
ISOnum: 524,
|
|
15751
|
+
symbol: "Rs.",
|
|
15752
|
+
symbolNative: "\u0930\u0942",
|
|
15753
|
+
minorSingle: "Paisa",
|
|
15754
|
+
minorPlural: "Paise",
|
|
15755
|
+
ISOdigits: 2,
|
|
15756
|
+
decimals: 2,
|
|
15757
|
+
numToBasic: 100
|
|
15758
|
+
},
|
|
15759
|
+
NZD: {
|
|
15760
|
+
name: "New Zealand Dollar",
|
|
15761
|
+
demonym: "New Zealand",
|
|
15762
|
+
majorSingle: "Dollar",
|
|
15763
|
+
majorPlural: "Dollars",
|
|
15764
|
+
ISOnum: 554,
|
|
15765
|
+
symbol: "NZ$",
|
|
15766
|
+
symbolNative: "$",
|
|
15767
|
+
minorSingle: "Cent",
|
|
15768
|
+
minorPlural: "Cents",
|
|
15769
|
+
ISOdigits: 2,
|
|
15770
|
+
decimals: 2,
|
|
15771
|
+
numToBasic: 100
|
|
15772
|
+
},
|
|
15773
|
+
OMR: {
|
|
15774
|
+
name: "Omani Rial",
|
|
15775
|
+
demonym: "Omani",
|
|
15776
|
+
majorSingle: "Rial",
|
|
15777
|
+
majorPlural: "Rials",
|
|
15778
|
+
ISOnum: 512,
|
|
15779
|
+
symbol: "OR",
|
|
15780
|
+
symbolNative: "\u0631.\u0639.",
|
|
15781
|
+
minorSingle: "Baisa",
|
|
15782
|
+
minorPlural: "Baisa",
|
|
15783
|
+
ISOdigits: 3,
|
|
15784
|
+
decimals: 3,
|
|
15785
|
+
numToBasic: 1e3
|
|
15786
|
+
},
|
|
15787
|
+
PAB: {
|
|
15788
|
+
name: "Panamanian Balboa",
|
|
15789
|
+
demonym: "Panamanian",
|
|
15790
|
+
majorSingle: "Balboa",
|
|
15791
|
+
majorPlural: "Balboa",
|
|
15792
|
+
ISOnum: 590,
|
|
15793
|
+
symbol: "B/.",
|
|
15794
|
+
symbolNative: "B/.",
|
|
15795
|
+
minorSingle: "Cent\xE9simo",
|
|
15796
|
+
minorPlural: "Cent\xE9simos",
|
|
15797
|
+
ISOdigits: 2,
|
|
15798
|
+
decimals: 2,
|
|
15799
|
+
numToBasic: 100
|
|
15800
|
+
},
|
|
15801
|
+
PEN: {
|
|
15802
|
+
name: "Peruvian Sol",
|
|
15803
|
+
demonym: "Peruvian",
|
|
15804
|
+
majorSingle: "Sol",
|
|
15805
|
+
majorPlural: "Soles",
|
|
15806
|
+
ISOnum: 604,
|
|
15807
|
+
symbol: "S/.",
|
|
15808
|
+
symbolNative: "S/.",
|
|
15809
|
+
minorSingle: "C\xE9ntimo",
|
|
15810
|
+
minorPlural: "C\xE9ntimos",
|
|
15811
|
+
ISOdigits: 2,
|
|
15812
|
+
decimals: 2,
|
|
15813
|
+
numToBasic: 100
|
|
15814
|
+
},
|
|
15815
|
+
PGK: {
|
|
15816
|
+
name: "Papua New Guinean Kina",
|
|
15817
|
+
demonym: "Papua New Guinean",
|
|
15818
|
+
majorSingle: "Kina",
|
|
15819
|
+
majorPlural: "Kina",
|
|
15820
|
+
ISOnum: 598,
|
|
15821
|
+
symbol: "K",
|
|
15822
|
+
symbolNative: "K",
|
|
15823
|
+
minorSingle: "Toea",
|
|
15824
|
+
minorPlural: "Toea",
|
|
15825
|
+
ISOdigits: 2,
|
|
15826
|
+
decimals: 2,
|
|
15827
|
+
numToBasic: 100
|
|
15828
|
+
},
|
|
15829
|
+
PHP: {
|
|
15830
|
+
name: "Philippine Peso",
|
|
15831
|
+
demonym: "Philippine",
|
|
15832
|
+
majorSingle: "Peso",
|
|
15833
|
+
majorPlural: "Pesos",
|
|
15834
|
+
ISOnum: 608,
|
|
15835
|
+
symbol: "\u20B1",
|
|
15836
|
+
symbolNative: "\u20B1",
|
|
15837
|
+
minorSingle: "Sentimo",
|
|
15838
|
+
minorPlural: "Sentimo",
|
|
15839
|
+
ISOdigits: 2,
|
|
15840
|
+
decimals: 2,
|
|
15841
|
+
numToBasic: 100
|
|
15842
|
+
},
|
|
15843
|
+
PKR: {
|
|
15844
|
+
name: "Pakistani Rupee",
|
|
15845
|
+
demonym: "Pakistani",
|
|
15846
|
+
majorSingle: "Rupee",
|
|
15847
|
+
majorPlural: "Rupees",
|
|
15848
|
+
ISOnum: 586,
|
|
15849
|
+
symbol: "Rs.",
|
|
15850
|
+
symbolNative: "Rs",
|
|
15851
|
+
minorSingle: "Paisa",
|
|
15852
|
+
minorPlural: "Paise",
|
|
15853
|
+
ISOdigits: 2,
|
|
15854
|
+
decimals: 2,
|
|
15855
|
+
numToBasic: 100
|
|
15856
|
+
},
|
|
15857
|
+
PLN: {
|
|
15858
|
+
name: "Polish Zloty",
|
|
15859
|
+
demonym: "Polish",
|
|
15860
|
+
majorSingle: "Zloty",
|
|
15861
|
+
majorPlural: "Zlotys",
|
|
15862
|
+
ISOnum: 985,
|
|
15863
|
+
symbol: "z\u0142",
|
|
15864
|
+
symbolNative: "z\u0142",
|
|
15865
|
+
minorSingle: "Grosz",
|
|
15866
|
+
minorPlural: "Groszy",
|
|
15867
|
+
ISOdigits: 2,
|
|
15868
|
+
decimals: 2,
|
|
15869
|
+
numToBasic: 100
|
|
15870
|
+
},
|
|
15871
|
+
PND: {
|
|
15872
|
+
name: "Pitcairn Islands Dollar",
|
|
15873
|
+
demonym: "Pitcairn Islands",
|
|
15874
|
+
majorSingle: "Dollar",
|
|
15875
|
+
majorPlural: "Dollars",
|
|
15876
|
+
ISOnum: null,
|
|
15877
|
+
symbol: "$",
|
|
15878
|
+
symbolNative: "$",
|
|
15879
|
+
minorSingle: "Cent",
|
|
15880
|
+
minorPlural: "Cents",
|
|
15881
|
+
ISOdigits: 2,
|
|
15882
|
+
decimals: 2,
|
|
15883
|
+
numToBasic: 100
|
|
15884
|
+
},
|
|
15885
|
+
PRB: {
|
|
15886
|
+
name: "Transnistrian Ruble",
|
|
15887
|
+
demonym: "Transnistrian",
|
|
15888
|
+
majorSingle: "Ruble",
|
|
15889
|
+
majorPlural: "Rubles",
|
|
15890
|
+
ISOnum: null,
|
|
15891
|
+
symbol: "\u0440.",
|
|
15892
|
+
symbolNative: "\u0440.",
|
|
15893
|
+
minorSingle: "Kopek",
|
|
15894
|
+
minorPlural: "Kopeks",
|
|
15895
|
+
ISOdigits: 2,
|
|
15896
|
+
decimals: 2,
|
|
15897
|
+
numToBasic: 100
|
|
15898
|
+
},
|
|
15899
|
+
PYG: {
|
|
15900
|
+
name: "Paraguayan Guaran\xED",
|
|
15901
|
+
demonym: "Paraguayan",
|
|
15902
|
+
majorSingle: "Guaran\xED",
|
|
15903
|
+
majorPlural: "Guaran\xEDes",
|
|
15904
|
+
ISOnum: 600,
|
|
15905
|
+
symbol: "\u20B2",
|
|
15906
|
+
symbolNative: "\u20B2",
|
|
15907
|
+
minorSingle: "Centimo",
|
|
15908
|
+
minorPlural: "Centimos",
|
|
15909
|
+
ISOdigits: 0,
|
|
15910
|
+
decimals: 2,
|
|
15911
|
+
numToBasic: 100
|
|
15912
|
+
},
|
|
15913
|
+
QAR: {
|
|
15914
|
+
name: "Qatari Riyal",
|
|
15915
|
+
demonym: "Qatari",
|
|
15916
|
+
majorSingle: "Riyal",
|
|
15917
|
+
majorPlural: "Riyals",
|
|
15918
|
+
ISOnum: 634,
|
|
15919
|
+
symbol: "QR",
|
|
15920
|
+
symbolNative: "\u0631.\u0642.",
|
|
15921
|
+
minorSingle: "Dirham",
|
|
15922
|
+
minorPlural: "Dirhams",
|
|
15923
|
+
ISOdigits: 2,
|
|
15924
|
+
decimals: 2,
|
|
15925
|
+
numToBasic: 100
|
|
15926
|
+
},
|
|
15927
|
+
RON: {
|
|
15928
|
+
name: "Romanian Leu",
|
|
15929
|
+
demonym: "Romanian",
|
|
15930
|
+
majorSingle: "Leu",
|
|
15931
|
+
majorPlural: "Lei",
|
|
15932
|
+
ISOnum: 946,
|
|
15933
|
+
symbol: "L",
|
|
15934
|
+
symbolNative: "L",
|
|
15935
|
+
minorSingle: "Ban",
|
|
15936
|
+
minorPlural: "Bani",
|
|
15937
|
+
ISOdigits: 2,
|
|
15938
|
+
decimals: 2,
|
|
15939
|
+
numToBasic: 100
|
|
15940
|
+
},
|
|
15941
|
+
RSD: {
|
|
15942
|
+
name: "Serbian Dinar",
|
|
15943
|
+
demonym: "Serbian",
|
|
15944
|
+
majorSingle: "Dinar",
|
|
15945
|
+
majorPlural: "Dinars",
|
|
15946
|
+
ISOnum: 941,
|
|
15947
|
+
symbol: "din",
|
|
15948
|
+
symbolNative: "\u0434\u0438\u043D",
|
|
15949
|
+
minorSingle: "Para",
|
|
15950
|
+
minorPlural: "Para",
|
|
15951
|
+
ISOdigits: 2,
|
|
15952
|
+
decimals: 2,
|
|
15953
|
+
numToBasic: 100
|
|
15954
|
+
},
|
|
15955
|
+
RUB: {
|
|
15956
|
+
name: "Russian Ruble",
|
|
15957
|
+
demonym: "Russian",
|
|
15958
|
+
majorSingle: "Ruble",
|
|
15959
|
+
majorPlural: "Rubles",
|
|
15960
|
+
ISOnum: 643,
|
|
15961
|
+
symbol: "\u20BD",
|
|
15962
|
+
symbolNative: "\u20BD",
|
|
15963
|
+
minorSingle: "Kopek",
|
|
15964
|
+
minorPlural: "Kopeks",
|
|
15965
|
+
ISOdigits: 2,
|
|
15966
|
+
decimals: 2,
|
|
15967
|
+
numToBasic: 100
|
|
15968
|
+
},
|
|
15969
|
+
RWF: {
|
|
15970
|
+
name: "Rwandan Franc",
|
|
15971
|
+
demonym: "Rwandan",
|
|
15972
|
+
majorSingle: "Franc",
|
|
15973
|
+
majorPlural: "Francs",
|
|
15974
|
+
ISOnum: 646,
|
|
15975
|
+
symbol: "FRw",
|
|
15976
|
+
symbolNative: "R\u20A3",
|
|
15977
|
+
minorSingle: "Centime",
|
|
15978
|
+
minorPlural: "Centimes",
|
|
15979
|
+
ISOdigits: 0,
|
|
15980
|
+
decimals: 2,
|
|
15981
|
+
numToBasic: 100
|
|
15982
|
+
},
|
|
15983
|
+
SAR: {
|
|
15984
|
+
name: "Saudi Riyal",
|
|
15985
|
+
demonym: "Saudi",
|
|
15986
|
+
majorSingle: "Riyal",
|
|
15987
|
+
majorPlural: "Riyals",
|
|
15988
|
+
ISOnum: 682,
|
|
15989
|
+
symbol: "SR",
|
|
15990
|
+
symbolNative: "\u0631.\u0633.",
|
|
15991
|
+
minorSingle: "Halalah",
|
|
15992
|
+
minorPlural: "Halalahs",
|
|
15993
|
+
ISOdigits: 2,
|
|
15994
|
+
decimals: 2,
|
|
15995
|
+
numToBasic: 100
|
|
15996
|
+
},
|
|
15997
|
+
SBD: {
|
|
15998
|
+
name: "Solomon Islands Dollar",
|
|
15999
|
+
demonym: "Solomon Islands",
|
|
16000
|
+
majorSingle: "Dollar",
|
|
16001
|
+
majorPlural: "Dollars",
|
|
16002
|
+
ISOnum: 90,
|
|
16003
|
+
symbol: "SI$",
|
|
16004
|
+
symbolNative: "$",
|
|
16005
|
+
minorSingle: "Cent",
|
|
16006
|
+
minorPlural: "Cents",
|
|
16007
|
+
ISOdigits: 2,
|
|
16008
|
+
decimals: 2,
|
|
16009
|
+
numToBasic: 100
|
|
16010
|
+
},
|
|
16011
|
+
SCR: {
|
|
16012
|
+
name: "Seychellois Rupee",
|
|
16013
|
+
demonym: "Seychellois",
|
|
16014
|
+
majorSingle: "Rupee",
|
|
16015
|
+
majorPlural: "Rupees",
|
|
16016
|
+
ISOnum: 690,
|
|
16017
|
+
symbol: "Rs.",
|
|
16018
|
+
symbolNative: "Rs",
|
|
16019
|
+
minorSingle: "Cent",
|
|
16020
|
+
minorPlural: "Cents",
|
|
16021
|
+
ISOdigits: 2,
|
|
16022
|
+
decimals: 2,
|
|
16023
|
+
numToBasic: 100
|
|
16024
|
+
},
|
|
16025
|
+
SDG: {
|
|
16026
|
+
name: "Sudanese Pound",
|
|
16027
|
+
demonym: "Sudanese",
|
|
16028
|
+
majorSingle: "Pound",
|
|
16029
|
+
majorPlural: "Pounds",
|
|
16030
|
+
ISOnum: 938,
|
|
16031
|
+
symbol: "\xA3SD",
|
|
16032
|
+
symbolNative: "\u062C.\u0633.",
|
|
16033
|
+
minorSingle: "Qirsh",
|
|
16034
|
+
minorPlural: "Qirsh",
|
|
16035
|
+
ISOdigits: 2,
|
|
16036
|
+
decimals: 2,
|
|
16037
|
+
numToBasic: 100
|
|
16038
|
+
},
|
|
16039
|
+
SEK: {
|
|
16040
|
+
name: "Swedish Krona",
|
|
16041
|
+
demonym: "Swedish",
|
|
16042
|
+
majorSingle: "Krona",
|
|
16043
|
+
majorPlural: "Kronor",
|
|
16044
|
+
ISOnum: 752,
|
|
16045
|
+
symbol: "kr",
|
|
16046
|
+
symbolNative: "kr",
|
|
16047
|
+
minorSingle: "\xD6re",
|
|
16048
|
+
minorPlural: "\xD6re",
|
|
16049
|
+
ISOdigits: 2,
|
|
16050
|
+
decimals: 2,
|
|
16051
|
+
numToBasic: 100
|
|
16052
|
+
},
|
|
16053
|
+
SGD: {
|
|
16054
|
+
name: "Singapore Dollar",
|
|
16055
|
+
demonym: "Singapore",
|
|
16056
|
+
majorSingle: "Dollar",
|
|
16057
|
+
majorPlural: "Dollars",
|
|
16058
|
+
ISOnum: 702,
|
|
16059
|
+
symbol: "S$",
|
|
16060
|
+
symbolNative: "$",
|
|
16061
|
+
minorSingle: "Cent",
|
|
16062
|
+
minorPlural: "Cents",
|
|
16063
|
+
ISOdigits: 2,
|
|
16064
|
+
decimals: 2,
|
|
16065
|
+
numToBasic: 100
|
|
16066
|
+
},
|
|
16067
|
+
SHP: {
|
|
16068
|
+
name: "Saint Helena Pound",
|
|
16069
|
+
demonym: "Saint Helena",
|
|
16070
|
+
majorSingle: "Pound",
|
|
16071
|
+
majorPlural: "Pounds",
|
|
16072
|
+
ISOnum: 654,
|
|
16073
|
+
symbol: "\xA3",
|
|
16074
|
+
symbolNative: "\xA3",
|
|
16075
|
+
minorSingle: "Penny",
|
|
16076
|
+
minorPlural: "Pence",
|
|
16077
|
+
ISOdigits: 2,
|
|
16078
|
+
decimals: 2,
|
|
16079
|
+
numToBasic: 100
|
|
16080
|
+
},
|
|
16081
|
+
SLL: {
|
|
16082
|
+
name: "Sierra Leonean Leone",
|
|
16083
|
+
demonym: "Sierra Leonean",
|
|
16084
|
+
majorSingle: "Leone",
|
|
16085
|
+
majorPlural: "Leones",
|
|
16086
|
+
ISOnum: 694,
|
|
16087
|
+
symbol: "Le",
|
|
16088
|
+
symbolNative: "Le",
|
|
16089
|
+
minorSingle: "Cent",
|
|
16090
|
+
minorPlural: "Cents",
|
|
16091
|
+
ISOdigits: 2,
|
|
16092
|
+
decimals: 2,
|
|
16093
|
+
numToBasic: 100
|
|
16094
|
+
},
|
|
16095
|
+
SLS: {
|
|
16096
|
+
name: "Somaliland Shilling",
|
|
16097
|
+
demonym: "Somaliland",
|
|
16098
|
+
majorSingle: "Shilling",
|
|
16099
|
+
majorPlural: "Shillings",
|
|
16100
|
+
ISOnum: null,
|
|
16101
|
+
symbol: "Sl",
|
|
16102
|
+
symbolNative: "Sl",
|
|
16103
|
+
minorSingle: "Cent",
|
|
16104
|
+
minorPlural: "Cents",
|
|
16105
|
+
ISOdigits: 2,
|
|
16106
|
+
decimals: 2,
|
|
16107
|
+
numToBasic: 100
|
|
16108
|
+
},
|
|
16109
|
+
SOS: {
|
|
16110
|
+
name: "Somali Shilling",
|
|
16111
|
+
demonym: "Somali",
|
|
16112
|
+
majorSingle: "Shilling",
|
|
16113
|
+
majorPlural: "Shillings",
|
|
16114
|
+
ISOnum: 706,
|
|
16115
|
+
symbol: "Sh.So.",
|
|
16116
|
+
symbolNative: "Ssh",
|
|
16117
|
+
minorSingle: "Senti",
|
|
16118
|
+
minorPlural: "Senti",
|
|
16119
|
+
ISOdigits: 2,
|
|
16120
|
+
decimals: 2,
|
|
16121
|
+
numToBasic: 100
|
|
16122
|
+
},
|
|
16123
|
+
SRD: {
|
|
16124
|
+
name: "Surinamese Dollar",
|
|
16125
|
+
demonym: "Surinamese",
|
|
16126
|
+
majorSingle: "Dollar",
|
|
16127
|
+
majorPlural: "Dollars",
|
|
16128
|
+
ISOnum: 968,
|
|
16129
|
+
symbol: "Sr$",
|
|
16130
|
+
symbolNative: "$",
|
|
16131
|
+
minorSingle: "Cent",
|
|
16132
|
+
minorPlural: "Cents",
|
|
16133
|
+
ISOdigits: 2,
|
|
16134
|
+
decimals: 2,
|
|
16135
|
+
numToBasic: 100
|
|
16136
|
+
},
|
|
16137
|
+
SSP: {
|
|
16138
|
+
name: "South Sudanese Pound",
|
|
16139
|
+
demonym: "South Sudanese",
|
|
16140
|
+
majorSingle: "Pound",
|
|
16141
|
+
majorPlural: "Pounds",
|
|
16142
|
+
ISOnum: 728,
|
|
16143
|
+
symbol: "SS\xA3",
|
|
16144
|
+
symbolNative: "SS\xA3",
|
|
16145
|
+
minorSingle: "Qirsh",
|
|
16146
|
+
minorPlural: "Qirsh",
|
|
16147
|
+
ISOdigits: 2,
|
|
16148
|
+
decimals: 2,
|
|
16149
|
+
numToBasic: 100
|
|
16150
|
+
},
|
|
16151
|
+
STN: {
|
|
16152
|
+
name: "Sao Tome and Pr\xEDncipe Dobra",
|
|
16153
|
+
demonym: "Sao Tome",
|
|
16154
|
+
majorSingle: "Dobra",
|
|
16155
|
+
majorPlural: "Dobras",
|
|
16156
|
+
ISOnum: 930,
|
|
16157
|
+
symbol: "Db",
|
|
16158
|
+
symbolNative: "Db",
|
|
16159
|
+
minorSingle: "Centimo",
|
|
16160
|
+
minorPlural: "Centimos",
|
|
16161
|
+
ISOdigits: 2,
|
|
16162
|
+
decimals: 2,
|
|
16163
|
+
numToBasic: 100
|
|
16164
|
+
},
|
|
16165
|
+
SVC: {
|
|
16166
|
+
name: "Salvadoran Col\xF3n",
|
|
16167
|
+
demonym: "Salvadoran",
|
|
16168
|
+
majorSingle: "Col\xF3n",
|
|
16169
|
+
majorPlural: "Colones",
|
|
16170
|
+
ISOnum: 222,
|
|
16171
|
+
symbol: "\u20A1",
|
|
16172
|
+
symbolNative: "\u20A1",
|
|
16173
|
+
minorSingle: "Centavo",
|
|
16174
|
+
minorPlural: "Centavos",
|
|
16175
|
+
ISOdigits: 2,
|
|
16176
|
+
decimals: 2,
|
|
16177
|
+
numToBasic: 100
|
|
16178
|
+
},
|
|
16179
|
+
SYP: {
|
|
16180
|
+
name: "Syrian Pound",
|
|
16181
|
+
demonym: "Syrian",
|
|
16182
|
+
majorSingle: "Pound",
|
|
16183
|
+
majorPlural: "Pounds",
|
|
16184
|
+
ISOnum: 760,
|
|
16185
|
+
symbol: "LS",
|
|
16186
|
+
symbolNative: "\u0644.\u0633.",
|
|
16187
|
+
minorSingle: "Qirsh",
|
|
16188
|
+
minorPlural: "Qirsh",
|
|
16189
|
+
ISOdigits: 2,
|
|
16190
|
+
decimals: 2,
|
|
16191
|
+
numToBasic: 100
|
|
16192
|
+
},
|
|
16193
|
+
SZL: {
|
|
16194
|
+
name: "Swazi Lilangeni",
|
|
16195
|
+
demonym: "Swazi",
|
|
16196
|
+
majorSingle: "Lilangeni",
|
|
16197
|
+
majorPlural: "Emalangeni",
|
|
16198
|
+
ISOnum: 748,
|
|
16199
|
+
symbol: "L",
|
|
16200
|
+
symbolNative: "L",
|
|
16201
|
+
minorSingle: "Cent",
|
|
16202
|
+
minorPlural: "Cents",
|
|
16203
|
+
ISOdigits: 2,
|
|
16204
|
+
decimals: 2,
|
|
16205
|
+
numToBasic: 100
|
|
16206
|
+
},
|
|
16207
|
+
THB: {
|
|
16208
|
+
name: "Thai Baht",
|
|
16209
|
+
demonym: "Thai",
|
|
16210
|
+
majorSingle: "Baht",
|
|
16211
|
+
majorPlural: "Baht",
|
|
16212
|
+
ISOnum: 764,
|
|
16213
|
+
symbol: "\u0E3F",
|
|
16214
|
+
symbolNative: "\u0E3F",
|
|
16215
|
+
minorSingle: "Satang",
|
|
16216
|
+
minorPlural: "Satang",
|
|
16217
|
+
ISOdigits: 2,
|
|
16218
|
+
decimals: 2,
|
|
16219
|
+
numToBasic: 100
|
|
16220
|
+
},
|
|
16221
|
+
TJS: {
|
|
16222
|
+
name: "Tajikistani Somoni",
|
|
16223
|
+
demonym: "Tajikistani",
|
|
16224
|
+
majorSingle: "Somoni",
|
|
16225
|
+
majorPlural: "Somoni",
|
|
16226
|
+
ISOnum: 972,
|
|
16227
|
+
symbol: "SM",
|
|
16228
|
+
symbolNative: "SM",
|
|
16229
|
+
minorSingle: "Diram",
|
|
16230
|
+
minorPlural: "Diram",
|
|
16231
|
+
ISOdigits: 2,
|
|
16232
|
+
decimals: 2,
|
|
16233
|
+
numToBasic: 100
|
|
16234
|
+
},
|
|
16235
|
+
TMT: {
|
|
16236
|
+
name: "Turkmenistan Manat",
|
|
16237
|
+
demonym: "Turkmenistan",
|
|
16238
|
+
majorSingle: "Manat",
|
|
16239
|
+
majorPlural: "Manat",
|
|
16240
|
+
ISOnum: 934,
|
|
16241
|
+
symbol: "m.",
|
|
16242
|
+
symbolNative: "T",
|
|
16243
|
+
minorSingle: "Tenge",
|
|
16244
|
+
minorPlural: "Tenge",
|
|
16245
|
+
ISOdigits: 2,
|
|
16246
|
+
decimals: 2,
|
|
16247
|
+
numToBasic: 100
|
|
16248
|
+
},
|
|
16249
|
+
TND: {
|
|
16250
|
+
name: "Tunisian Dinar",
|
|
16251
|
+
demonym: "Tunisian",
|
|
16252
|
+
majorSingle: "Dinar",
|
|
16253
|
+
majorPlural: "Dinars",
|
|
16254
|
+
ISOnum: 788,
|
|
16255
|
+
symbol: "DT",
|
|
16256
|
+
symbolNative: "\u062F.\u062A.",
|
|
16257
|
+
minorSingle: "Millime",
|
|
16258
|
+
minorPlural: "Millime",
|
|
16259
|
+
ISOdigits: 3,
|
|
16260
|
+
decimals: 3,
|
|
16261
|
+
numToBasic: 1e3
|
|
16262
|
+
},
|
|
16263
|
+
TOP: {
|
|
16264
|
+
name: "Tongan Pa\u02BBanga",
|
|
16265
|
+
demonym: "Tongan",
|
|
16266
|
+
majorSingle: "Pa'anga",
|
|
16267
|
+
majorPlural: "Pa'anga",
|
|
16268
|
+
ISOnum: 776,
|
|
16269
|
+
symbol: "T$",
|
|
16270
|
+
symbolNative: "PT",
|
|
16271
|
+
minorSingle: "Seniti",
|
|
16272
|
+
minorPlural: "Seniti",
|
|
16273
|
+
ISOdigits: 2,
|
|
16274
|
+
decimals: 2,
|
|
16275
|
+
numToBasic: 100
|
|
16276
|
+
},
|
|
16277
|
+
TRY: {
|
|
16278
|
+
name: "Turkish Lira",
|
|
16279
|
+
demonym: "Turkish",
|
|
16280
|
+
majorSingle: "Lira",
|
|
16281
|
+
majorPlural: "Lira",
|
|
16282
|
+
ISOnum: 949,
|
|
16283
|
+
symbol: "TL",
|
|
16284
|
+
symbolNative: "\u20BA",
|
|
16285
|
+
minorSingle: "Kuru\u015F",
|
|
16286
|
+
minorPlural: "Kuru\u015F",
|
|
16287
|
+
ISOdigits: 2,
|
|
16288
|
+
decimals: 2,
|
|
16289
|
+
numToBasic: 100
|
|
16290
|
+
},
|
|
16291
|
+
TTD: {
|
|
16292
|
+
name: "Trinidad and Tobago Dollar",
|
|
16293
|
+
demonym: "Trinidad and Tobago",
|
|
16294
|
+
majorSingle: "Dollar",
|
|
16295
|
+
majorPlural: "Dollars",
|
|
16296
|
+
ISOnum: 780,
|
|
16297
|
+
symbol: "TT$",
|
|
16298
|
+
symbolNative: "$",
|
|
16299
|
+
minorSingle: "Cent",
|
|
16300
|
+
minorPlural: "Cents",
|
|
16301
|
+
ISOdigits: 2,
|
|
16302
|
+
decimals: 2,
|
|
16303
|
+
numToBasic: 100
|
|
16304
|
+
},
|
|
16305
|
+
TVD: {
|
|
16306
|
+
name: "Tuvaluan Dollar",
|
|
16307
|
+
demonym: "Tuvaluan",
|
|
16308
|
+
majorSingle: "Dollar",
|
|
16309
|
+
majorPlural: "Dollars",
|
|
16310
|
+
ISOnum: null,
|
|
16311
|
+
symbol: "$",
|
|
16312
|
+
symbolNative: "$",
|
|
16313
|
+
minorSingle: "Cent",
|
|
16314
|
+
minorPlural: "Cents",
|
|
16315
|
+
ISOdigits: 2,
|
|
16316
|
+
decimals: 2,
|
|
16317
|
+
numToBasic: 100
|
|
16318
|
+
},
|
|
16319
|
+
TWD: {
|
|
16320
|
+
name: "New Taiwan Dollar",
|
|
16321
|
+
demonym: "New Taiwan",
|
|
16322
|
+
majorSingle: "Dollar",
|
|
16323
|
+
majorPlural: "Dollars",
|
|
16324
|
+
ISOnum: 901,
|
|
16325
|
+
symbol: "NT$",
|
|
16326
|
+
symbolNative: "\u5713",
|
|
16327
|
+
minorSingle: "Cent",
|
|
16328
|
+
minorPlural: "Cents",
|
|
16329
|
+
ISOdigits: 2,
|
|
16330
|
+
decimals: 2,
|
|
16331
|
+
numToBasic: 100
|
|
16332
|
+
},
|
|
16333
|
+
TZS: {
|
|
16334
|
+
name: "Tanzanian Shilling",
|
|
16335
|
+
demonym: "Tanzanian",
|
|
16336
|
+
majorSingle: "Shilling",
|
|
16337
|
+
majorPlural: "Shillings",
|
|
16338
|
+
ISOnum: 834,
|
|
16339
|
+
symbol: "TSh",
|
|
16340
|
+
symbolNative: "TSh",
|
|
16341
|
+
minorSingle: "Senti",
|
|
16342
|
+
minorPlural: "Senti",
|
|
16343
|
+
ISOdigits: 2,
|
|
16344
|
+
decimals: 2,
|
|
16345
|
+
numToBasic: 100
|
|
16346
|
+
},
|
|
16347
|
+
UAH: {
|
|
16348
|
+
name: "Ukrainian Hryvnia",
|
|
16349
|
+
demonym: "Ukrainian",
|
|
16350
|
+
majorSingle: "Hryvnia",
|
|
16351
|
+
majorPlural: "Hryvnias",
|
|
16352
|
+
ISOnum: 980,
|
|
16353
|
+
symbol: "\u20B4",
|
|
16354
|
+
symbolNative: "\u0433\u0440\u043D",
|
|
16355
|
+
minorSingle: "Kopiyka",
|
|
16356
|
+
minorPlural: "kopiyky",
|
|
16357
|
+
ISOdigits: 2,
|
|
16358
|
+
decimals: 2,
|
|
16359
|
+
numToBasic: 100
|
|
16360
|
+
},
|
|
16361
|
+
UGX: {
|
|
16362
|
+
name: "Ugandan Shilling",
|
|
16363
|
+
demonym: "Ugandan",
|
|
16364
|
+
majorSingle: "Shilling",
|
|
16365
|
+
majorPlural: "Shillings",
|
|
16366
|
+
ISOnum: 800,
|
|
16367
|
+
symbol: "USh",
|
|
16368
|
+
symbolNative: "Sh",
|
|
16369
|
+
minorSingle: "Cent",
|
|
16370
|
+
minorPlural: "Cents",
|
|
16371
|
+
ISOdigits: 0,
|
|
16372
|
+
decimals: 2,
|
|
16373
|
+
numToBasic: 100
|
|
16374
|
+
},
|
|
16375
|
+
USD: {
|
|
16376
|
+
name: "United States Dollar",
|
|
16377
|
+
demonym: "US",
|
|
16378
|
+
majorSingle: "Dollar",
|
|
16379
|
+
majorPlural: "Dollars",
|
|
16380
|
+
ISOnum: 840,
|
|
16381
|
+
symbol: "$",
|
|
16382
|
+
symbolNative: "$",
|
|
16383
|
+
minorSingle: "Cent",
|
|
16384
|
+
minorPlural: "Cents",
|
|
16385
|
+
ISOdigits: 2,
|
|
16386
|
+
decimals: 2,
|
|
16387
|
+
numToBasic: 100
|
|
16388
|
+
},
|
|
16389
|
+
UYU: {
|
|
16390
|
+
name: "Uruguayan Peso",
|
|
16391
|
+
demonym: "Uruguayan",
|
|
16392
|
+
majorSingle: "Peso",
|
|
16393
|
+
majorPlural: "Pesos",
|
|
16394
|
+
ISOnum: 858,
|
|
16395
|
+
symbol: "$U",
|
|
16396
|
+
symbolNative: "$",
|
|
16397
|
+
minorSingle: "Cent\xE9simo",
|
|
16398
|
+
minorPlural: "Cent\xE9simos",
|
|
16399
|
+
ISOdigits: 2,
|
|
16400
|
+
decimals: 2,
|
|
16401
|
+
numToBasic: 100
|
|
16402
|
+
},
|
|
16403
|
+
UZS: {
|
|
16404
|
+
name: "Uzbekistani Som",
|
|
16405
|
+
demonym: "Uzbekistani",
|
|
16406
|
+
majorSingle: "Som",
|
|
16407
|
+
majorPlural: "Som",
|
|
16408
|
+
ISOnum: 860,
|
|
16409
|
+
symbol: "\u0441\u0443\u043C",
|
|
16410
|
+
symbolNative: "\u0441\u0443\u043C",
|
|
16411
|
+
minorSingle: "Tiyin",
|
|
16412
|
+
minorPlural: "Tiyin",
|
|
16413
|
+
ISOdigits: 2,
|
|
16414
|
+
decimals: 2,
|
|
16415
|
+
numToBasic: 100
|
|
16416
|
+
},
|
|
16417
|
+
VED: {
|
|
16418
|
+
name: "Venezuelan bol\xEDvar digital",
|
|
16419
|
+
demonym: "Venezuelan",
|
|
16420
|
+
majorSingle: "Bol\xEDvar Digital",
|
|
16421
|
+
majorPlural: "Bol\xEDvars Digital",
|
|
16422
|
+
ISOnum: null,
|
|
16423
|
+
symbol: "Bs.",
|
|
16424
|
+
symbolNative: "Bs.",
|
|
16425
|
+
minorSingle: "C\xE9ntimo",
|
|
16426
|
+
minorPlural: "C\xE9ntimos",
|
|
16427
|
+
ISOdigits: 2,
|
|
16428
|
+
decimals: 2,
|
|
16429
|
+
numToBasic: 100
|
|
16430
|
+
},
|
|
16431
|
+
VES: {
|
|
16432
|
+
name: "Venezuelan Bol\xEDvar Soberano",
|
|
16433
|
+
demonym: "Venezuelan",
|
|
16434
|
+
majorSingle: "Bol\xEDvar",
|
|
16435
|
+
majorPlural: "Bol\xEDvares",
|
|
16436
|
+
ISOnum: 928,
|
|
16437
|
+
symbol: "Bs.F",
|
|
16438
|
+
symbolNative: "Bs.F",
|
|
16439
|
+
minorSingle: "Centimo",
|
|
16440
|
+
minorPlural: "Centimos",
|
|
16441
|
+
ISOdigits: 2,
|
|
16442
|
+
decimals: 2,
|
|
16443
|
+
numToBasic: 100
|
|
16444
|
+
},
|
|
16445
|
+
VND: {
|
|
16446
|
+
name: "Vietnamese Dong",
|
|
16447
|
+
demonym: "Vietnamese",
|
|
16448
|
+
majorSingle: "Dong",
|
|
16449
|
+
majorPlural: "Dong",
|
|
16450
|
+
ISOnum: 704,
|
|
16451
|
+
symbol: "\u20AB",
|
|
16452
|
+
symbolNative: "\u20AB",
|
|
16453
|
+
minorSingle: "H\xE0o",
|
|
16454
|
+
minorPlural: "H\xE0o",
|
|
16455
|
+
ISOdigits: 0,
|
|
16456
|
+
decimals: 2,
|
|
16457
|
+
numToBasic: 10
|
|
16458
|
+
},
|
|
16459
|
+
VUV: {
|
|
16460
|
+
name: "Vanuatu Vatu",
|
|
16461
|
+
demonym: "Vanuatu",
|
|
16462
|
+
majorSingle: "Vatu",
|
|
16463
|
+
majorPlural: "Vatu",
|
|
16464
|
+
ISOnum: 548,
|
|
16465
|
+
symbol: "VT",
|
|
16466
|
+
symbolNative: "VT",
|
|
16467
|
+
minorSingle: "",
|
|
16468
|
+
minorPlural: "",
|
|
16469
|
+
ISOdigits: 0,
|
|
16470
|
+
decimals: 0,
|
|
16471
|
+
numToBasic: null
|
|
16472
|
+
},
|
|
16473
|
+
WST: {
|
|
16474
|
+
name: "Samoan Tala",
|
|
16475
|
+
demonym: "Samoan",
|
|
16476
|
+
majorSingle: "Tala",
|
|
16477
|
+
majorPlural: "Tala",
|
|
16478
|
+
ISOnum: 882,
|
|
16479
|
+
symbol: "T",
|
|
16480
|
+
symbolNative: "ST",
|
|
16481
|
+
minorSingle: "Sene",
|
|
16482
|
+
minorPlural: "Sene",
|
|
16483
|
+
ISOdigits: 2,
|
|
16484
|
+
decimals: 2,
|
|
16485
|
+
numToBasic: 100
|
|
16486
|
+
},
|
|
16487
|
+
XAF: {
|
|
16488
|
+
name: "Central African CFA Franc BEAC",
|
|
16489
|
+
demonym: "Central African CFA",
|
|
16490
|
+
majorSingle: "Franc",
|
|
16491
|
+
majorPlural: "Francs",
|
|
16492
|
+
ISOnum: 950,
|
|
16493
|
+
symbol: "Fr",
|
|
16494
|
+
symbolNative: "Fr.",
|
|
16495
|
+
minorSingle: "Centime",
|
|
16496
|
+
minorPlural: "Centimes",
|
|
16497
|
+
ISOdigits: 0,
|
|
16498
|
+
decimals: 2,
|
|
16499
|
+
numToBasic: 100
|
|
16500
|
+
},
|
|
16501
|
+
XCD: {
|
|
16502
|
+
name: "East Caribbean Dollar",
|
|
16503
|
+
demonym: "East Caribbean",
|
|
16504
|
+
majorSingle: "Dollar",
|
|
16505
|
+
majorPlural: "Dollars",
|
|
16506
|
+
ISOnum: 951,
|
|
16507
|
+
symbol: "$",
|
|
16508
|
+
symbolNative: "$",
|
|
16509
|
+
minorSingle: "Cent",
|
|
16510
|
+
minorPlural: "Cents",
|
|
16511
|
+
ISOdigits: 2,
|
|
16512
|
+
decimals: 2,
|
|
16513
|
+
numToBasic: 100
|
|
16514
|
+
},
|
|
16515
|
+
XOF: {
|
|
16516
|
+
name: "West African CFA Franc BCEAO",
|
|
16517
|
+
demonym: "West African CFA",
|
|
16518
|
+
majorSingle: "Franc",
|
|
16519
|
+
majorPlural: "Francs",
|
|
16520
|
+
ISOnum: 952,
|
|
16521
|
+
symbol: "\u20A3",
|
|
16522
|
+
symbolNative: "\u20A3",
|
|
16523
|
+
minorSingle: "Centime",
|
|
16524
|
+
minorPlural: "Centimes",
|
|
16525
|
+
ISOdigits: 0,
|
|
16526
|
+
decimals: 2,
|
|
16527
|
+
numToBasic: 100
|
|
16528
|
+
},
|
|
16529
|
+
XPF: {
|
|
16530
|
+
name: "CFP Franc (Franc Pacifique)",
|
|
16531
|
+
demonym: "CFP",
|
|
16532
|
+
majorSingle: "Franc",
|
|
16533
|
+
majorPlural: "Francs",
|
|
16534
|
+
ISOnum: 953,
|
|
16535
|
+
symbol: "\u20A3",
|
|
16536
|
+
symbolNative: "\u20A3",
|
|
16537
|
+
minorSingle: "Centime",
|
|
16538
|
+
minorPlural: "Centimes",
|
|
16539
|
+
ISOdigits: 0,
|
|
16540
|
+
decimals: 0,
|
|
16541
|
+
numToBasic: 100
|
|
16542
|
+
},
|
|
16543
|
+
YER: {
|
|
16544
|
+
name: "Yemeni Rial",
|
|
16545
|
+
demonym: "Yemeni",
|
|
16546
|
+
majorSingle: "Rial",
|
|
16547
|
+
majorPlural: "Rials",
|
|
16548
|
+
ISOnum: 886,
|
|
16549
|
+
symbol: "YR",
|
|
16550
|
+
symbolNative: "\u0631.\u064A.",
|
|
16551
|
+
minorSingle: "Fils",
|
|
16552
|
+
minorPlural: "Fils",
|
|
16553
|
+
ISOdigits: 2,
|
|
16554
|
+
decimals: 2,
|
|
16555
|
+
numToBasic: 100
|
|
16556
|
+
},
|
|
16557
|
+
ZAR: {
|
|
16558
|
+
name: "South African Rand",
|
|
16559
|
+
demonym: "South African",
|
|
16560
|
+
majorSingle: "Rand",
|
|
16561
|
+
majorPlural: "Rand",
|
|
16562
|
+
ISOnum: 710,
|
|
16563
|
+
symbol: "R",
|
|
16564
|
+
symbolNative: "R",
|
|
16565
|
+
minorSingle: "Cent",
|
|
16566
|
+
minorPlural: "Cents",
|
|
16567
|
+
ISOdigits: 2,
|
|
16568
|
+
decimals: 2,
|
|
16569
|
+
numToBasic: 100
|
|
16570
|
+
},
|
|
16571
|
+
ZMW: {
|
|
16572
|
+
name: "Zambian Kwacha",
|
|
16573
|
+
demonym: "Zambian",
|
|
16574
|
+
majorSingle: "Kwacha",
|
|
16575
|
+
majorPlural: "Kwacha",
|
|
16576
|
+
ISOnum: 967,
|
|
16577
|
+
symbol: "ZK",
|
|
16578
|
+
symbolNative: "ZK",
|
|
16579
|
+
minorSingle: "Ngwee",
|
|
16580
|
+
minorPlural: "Ngwee",
|
|
16581
|
+
ISOdigits: 2,
|
|
16582
|
+
decimals: 2,
|
|
16583
|
+
numToBasic: 100
|
|
16584
|
+
},
|
|
16585
|
+
ZWB: {
|
|
16586
|
+
name: "RTGS Dollar",
|
|
16587
|
+
demonym: "RTGS",
|
|
16588
|
+
majorSingle: "Dollar",
|
|
16589
|
+
majorPlural: "Dollars",
|
|
16590
|
+
ISOnum: null,
|
|
16591
|
+
symbol: "",
|
|
16592
|
+
symbolNative: "",
|
|
16593
|
+
minorSingle: "",
|
|
16594
|
+
minorPlural: "",
|
|
16595
|
+
ISOdigits: 0,
|
|
16596
|
+
decimals: 0,
|
|
16597
|
+
numToBasic: null
|
|
16598
|
+
},
|
|
16599
|
+
ZWL: {
|
|
16600
|
+
name: "Zimbabwean Dollar",
|
|
16601
|
+
demonym: "Zimbabwean",
|
|
16602
|
+
majorSingle: "Dollar",
|
|
16603
|
+
majorPlural: "Dollars",
|
|
16604
|
+
ISOnum: 932,
|
|
16605
|
+
symbol: "Z$",
|
|
16606
|
+
symbolNative: "$",
|
|
16607
|
+
minorSingle: "Cent",
|
|
16608
|
+
minorPlural: "Cents",
|
|
16609
|
+
ISOdigits: 2,
|
|
16610
|
+
decimals: 2,
|
|
16611
|
+
numToBasic: 100
|
|
16612
|
+
},
|
|
16613
|
+
Abkhazia: {
|
|
16614
|
+
name: "Abkhazian Apsar",
|
|
16615
|
+
demonym: "Abkhazian",
|
|
16616
|
+
majorSingle: "Apsar",
|
|
16617
|
+
majorPlural: "Apsark",
|
|
16618
|
+
ISOnum: null,
|
|
16619
|
+
symbol: "",
|
|
16620
|
+
symbolNative: "",
|
|
16621
|
+
minorSingle: "",
|
|
16622
|
+
minorPlural: "",
|
|
16623
|
+
ISOdigits: 0,
|
|
16624
|
+
decimals: 0,
|
|
16625
|
+
numToBasic: null
|
|
16626
|
+
},
|
|
16627
|
+
Artsakh: {
|
|
16628
|
+
name: "Artsakh Dram",
|
|
16629
|
+
demonym: "Artsakh",
|
|
16630
|
+
majorSingle: "Dram",
|
|
16631
|
+
majorPlural: "Dram",
|
|
16632
|
+
ISOnum: null,
|
|
16633
|
+
symbol: "\u0564\u0580.",
|
|
16634
|
+
symbolNative: "\u0564\u0580.",
|
|
16635
|
+
minorSingle: "Luma",
|
|
16636
|
+
minorPlural: "Luma",
|
|
16637
|
+
ISOdigits: 2,
|
|
16638
|
+
decimals: 2,
|
|
16639
|
+
numToBasic: 100
|
|
16640
|
+
}
|
|
16641
|
+
};
|
|
16642
|
+
|
|
16643
|
+
// src/react/utils/money.ts
|
|
16644
|
+
function formatCurrency(amount, locale, currency) {
|
|
16645
|
+
const currencySymbols = {
|
|
16646
|
+
AUD: "A$",
|
|
16647
|
+
CAD: "CA$",
|
|
16648
|
+
USD: "$"
|
|
16649
|
+
};
|
|
16650
|
+
try {
|
|
16651
|
+
const formatter = new Intl.NumberFormat(locale, {
|
|
16652
|
+
style: "currency",
|
|
16653
|
+
currency
|
|
16654
|
+
});
|
|
16655
|
+
let formatted = formatter.format(amount);
|
|
16656
|
+
if (currency in currencySymbols) {
|
|
16657
|
+
const correctSymbol = currencySymbols[currency];
|
|
16658
|
+
formatted = formatted.replace(/^[^\d\s.,]+/, correctSymbol);
|
|
16659
|
+
}
|
|
16660
|
+
return formatted;
|
|
16661
|
+
} catch (error) {
|
|
16662
|
+
console.error("Intl.NumberFormat Error:", error);
|
|
16663
|
+
return "".concat(currency in currencySymbols ? currencySymbols[currency] : "").concat(amount.toFixed(2));
|
|
16664
|
+
}
|
|
16665
|
+
}
|
|
16666
|
+
function formatMoney(amountMinorUnits, currencyCode = "USD", locale) {
|
|
16667
|
+
const safeLocale = locale || "en-US";
|
|
16668
|
+
const currencyInfo = currencies_default[currencyCode];
|
|
16669
|
+
if (!currencyInfo) {
|
|
16670
|
+
throw new Error("Currency ".concat(currencyCode, " not found in currency data."));
|
|
16671
|
+
}
|
|
16672
|
+
let value;
|
|
16673
|
+
if (currencyInfo.ISOdigits === 0 || currencyInfo.ISOdigits === 3) {
|
|
16674
|
+
value = amountMinorUnits / 100;
|
|
16675
|
+
} else {
|
|
16676
|
+
value = amountMinorUnits / Math.pow(10, currencyInfo.ISOdigits);
|
|
16677
|
+
}
|
|
16678
|
+
return formatCurrency(value, safeLocale, currencyCode);
|
|
16679
|
+
}
|
|
16680
|
+
function getCurrencyInfo(currencyCode) {
|
|
16681
|
+
return currencies_default[currencyCode] || null;
|
|
16682
|
+
}
|
|
16683
|
+
function moneyStringOrNumberToMinorUnits(moneyStringOrNumber, currencyCode) {
|
|
16684
|
+
const currencyInfo = currencies_default[currencyCode];
|
|
16685
|
+
if (!currencyInfo) {
|
|
16686
|
+
throw new Error("Currency ".concat(currencyCode, " not found in currency data."));
|
|
16687
|
+
}
|
|
16688
|
+
const value = typeof moneyStringOrNumber === "string" ? parseFloat(moneyStringOrNumber) : moneyStringOrNumber;
|
|
16689
|
+
return Math.round(value * Math.pow(10, currencyInfo.ISOdigits));
|
|
16690
|
+
}
|
|
16691
|
+
function minorUnitsToMajorUnits(amountMinorUnits, currencyCode) {
|
|
16692
|
+
const currencyInfo = currencies_default[currencyCode];
|
|
16693
|
+
if (!currencyInfo) {
|
|
16694
|
+
throw new Error("Currency ".concat(currencyCode, " not found in currency data."));
|
|
16695
|
+
}
|
|
16696
|
+
if (currencyInfo.ISOdigits === 0 || currencyInfo.ISOdigits === 3) {
|
|
16697
|
+
return amountMinorUnits / 100;
|
|
16698
|
+
}
|
|
16699
|
+
return amountMinorUnits / Math.pow(10, currencyInfo.ISOdigits);
|
|
16700
|
+
}
|
|
16701
|
+
|
|
16702
|
+
// src/v2/standalone/external-tracker.ts
|
|
16703
|
+
init_tokenStorage();
|
|
16704
|
+
var TRACKER_VERSION = "1.0.0";
|
|
16705
|
+
function getUrlParam(name) {
|
|
16706
|
+
if (typeof window === "undefined") return null;
|
|
16707
|
+
const params = new URLSearchParams(window.location.search);
|
|
16708
|
+
return params.get(name);
|
|
16709
|
+
}
|
|
16710
|
+
function log(debug, ...args) {
|
|
16711
|
+
if (debug) {
|
|
16712
|
+
console.log("[TagadaTracker]", ...args);
|
|
16713
|
+
}
|
|
16714
|
+
}
|
|
16715
|
+
function warn(...args) {
|
|
16716
|
+
console.warn("[TagadaTracker]", ...args);
|
|
16717
|
+
}
|
|
13067
16718
|
function validate(config) {
|
|
13068
16719
|
if (!config.storeId || typeof config.storeId !== "string") {
|
|
13069
16720
|
throw new Error("TagadaTracker: storeId is required and must be a non-empty string.");
|
|
@@ -13449,6 +17100,11 @@ var TagadaSDKBundle = (() => {
|
|
|
13449
17100
|
});
|
|
13450
17101
|
}
|
|
13451
17102
|
if (typeof window !== "undefined" && typeof document !== "undefined") {
|
|
17103
|
+
try {
|
|
17104
|
+
publishTrackingGlobal();
|
|
17105
|
+
} catch (error) {
|
|
17106
|
+
console.error("[TagadaPay] Failed to publish tracking global:", error);
|
|
17107
|
+
}
|
|
13452
17108
|
const runInjection = () => {
|
|
13453
17109
|
if (document.body) {
|
|
13454
17110
|
injectStepConfigScripts();
|
|
@@ -13465,7 +17121,7 @@ var TagadaSDKBundle = (() => {
|
|
|
13465
17121
|
function createTagadaClient(config = {}) {
|
|
13466
17122
|
return new TagadaClient(config);
|
|
13467
17123
|
}
|
|
13468
|
-
function
|
|
17124
|
+
function getBasisTheoryApiKey3() {
|
|
13469
17125
|
return getBasisTheoryApiKey();
|
|
13470
17126
|
}
|
|
13471
17127
|
function getBasisTheoryTenantId2() {
|