@voyage_ai/v402-web-ts 0.1.3 → 0.1.5

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.
@@ -4,12 +4,11 @@ var __esm = (fn, res) => function __init() {
4
4
  };
5
5
 
6
6
  // src/types/common.ts
7
- var PROD_BACK_URL, DEV_BACK_URL;
7
+ var PROD_BACK_URL;
8
8
  var init_common = __esm({
9
9
  "src/types/common.ts"() {
10
10
  "use strict";
11
11
  PROD_BACK_URL = "https://v402.onvoyage.ai/api/pay";
12
- DEV_BACK_URL = "http://localhost:3000/api/pay";
13
12
  }
14
13
  });
15
14
 
@@ -1746,7 +1745,7 @@ var notify = {
1746
1745
  }
1747
1746
  };
1748
1747
  function V402Checkout({
1749
- merchantId,
1748
+ checkoutId,
1750
1749
  headerInfo = {},
1751
1750
  isModal = false,
1752
1751
  onPaymentComplete,
@@ -1758,12 +1757,12 @@ function V402Checkout({
1758
1757
  subtitle = "onvoyage.ai",
1759
1758
  tooltipText = "V402Pay - Accept Crypto Payments Easier"
1760
1759
  } = headerInfo;
1761
- let endpoint = DEV_BACK_URL;
1760
+ const endpoint = PROD_BACK_URL;
1762
1761
  const {
1763
1762
  supportedNetworks,
1764
1763
  isLoading: fetchingPaymentInfo,
1765
1764
  paymentInfo
1766
- } = usePaymentInfo(merchantId, endpoint, additionalParams);
1765
+ } = usePaymentInfo(checkoutId, endpoint, additionalParams);
1767
1766
  const targetNetwork = expectedNetwork || supportedNetworks[0];
1768
1767
  const { address, networkType, disconnect, ensureNetwork } = usePageNetwork(
1769
1768
  targetNetwork,
@@ -1808,7 +1807,7 @@ function V402Checkout({
1808
1807
  setError(null);
1809
1808
  setIsProcessing(true);
1810
1809
  try {
1811
- const response = await makePayment(networkType, merchantId, endpoint, additionalParams);
1810
+ const response = await makePayment(networkType, checkoutId, endpoint, additionalParams);
1812
1811
  const data = await response.json();
1813
1812
  setResult(data);
1814
1813
  notify.success("Payment Successful!", "Your payment has been processed successfully.");