@payment-kit-js/vanilla 0.5.12 → 0.5.13

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * PaymentKit.js v0.5.12
2
+ * PaymentKit.js v0.5.13
3
3
  * https://paymentkit.com
4
4
  *
5
5
  * @license MIT
@@ -42,7 +42,7 @@ var PaymentKit = (() => {
42
42
  });
43
43
 
44
44
  // package.json
45
- var version = "0.5.12";
45
+ var version = "0.5.13";
46
46
 
47
47
  // src/analytics/mock-adapter.ts
48
48
  var MockAnalyticsAdapter = class {
@@ -7597,6 +7597,14 @@ var PaymentKit = (() => {
7597
7597
  if (!options.country) {
7598
7598
  return { errors: { apple_pay: "Country is required for Airwallex Apple Pay" } };
7599
7599
  }
7600
+ if (!options.amount) {
7601
+ const sessionInfoResult = await callAirwallexSessionInfoEndpoint(apiBaseUrl, secureToken, checkoutRequestId);
7602
+ if (sessionInfoResult.data) {
7603
+ options.amount = sessionInfoResult.data.amount;
7604
+ options.currency = options.currency || sessionInfoResult.data.currency;
7605
+ options.country = options.country || sessionInfoResult.data.country;
7606
+ }
7607
+ }
7600
7608
  const adapter = new AirwallexApplePayAdapter(airwallexMockScenario);
7601
7609
  const config = {
7602
7610
  amount: options.amount || 0,