@seaverse/payment-sdk 0.9.5 → 0.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -2
- package/dist/index.browser.js +4 -5
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +4 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3138,7 +3138,7 @@ declare class CreditPackCard {
|
|
|
3138
3138
|
/**
|
|
3139
3139
|
* SDK version
|
|
3140
3140
|
*/
|
|
3141
|
-
declare const VERSION = "0.9.
|
|
3141
|
+
declare const VERSION = "0.9.7";
|
|
3142
3142
|
|
|
3143
3143
|
export { API_ENDPOINTS, BIZ_CODE, BindCardPaymentComponent, COMPONENT_LOAD_TIMEOUT, CheckoutAPI, CreditPackCard, CreditPackageModal, DEFAULT_CHECKOUT_CONFIG, DropinPaymentComponent, DropinPaymentModal, ENVIRONMENT_CONFIGS, ENV_CONFIG, ErrorHandler, GRID_COLUMNS, GenericPackageModal, HTTP_STATUS, LinkPaymentComponent, OrderPayment, PAYMENT_ELEMENT_NAME, PaymentAPIError, PaymentCheckoutClient, PaymentCheckoutModal, PaymentClient, PaymentError, PaymentFailedModal, PaymentModal, PaymentStorage, PaymentVerificationModal, PurchaseSuccessModal, RESPONSIVE_BREAKPOINTS, RetentionModal, SDK_CONFIG, ScriptLoader, SeaArtPayLoader, SeaartPaymentSDK, StylesheetLoader, VERSION, centsToDollars, changeSubscription, checkOrderStatus, createCheckoutPaymentError, createOrder, delay, dollarsToCents, fetchAvailablePackages, formatPrice, generateOrderReference, getActiveSubscription, getCreditDetail, getCurrentSubscription, getCurrentUrl, getGlobalLoader, getSDKLocale, hideLoadingIndicator, isBrowser, isCheckoutPaymentError, pollOrderStatus, resetGlobalLoader, restartSubscription, safeJsonParse, showErrorMessage, showInfoMessage, showLoadingIndicator, showSuccessMessage, withTimeout };
|
|
3144
3144
|
export type { ActiveSubscription, ApiErrorResponse, ApiResponse, ApiSuccessResponse, AutoCreateOrderConfig, AvailablePackagesResponse, BaseCheckoutOptions, BillingPeriod$1 as BillingPeriod, BindCard, BindCardCallbacks, BindCardPaymentOptions, CheckoutAPIConfig, CheckoutAPIResponse, CheckoutClientConfig, CheckoutClientStatus, CheckoutOptions, CheckoutPaymentError, CheckoutPaymentErrorCode, CheckoutResult, ComponentLoadStatus, CreateOrderResponse, CreditAccount, CreditAccountStatus, CreditDetailResponse$1 as CreditDetailResponse, CreditDetailSuccessResponse, CreditPackCardOptions, CreditPackageModalOptions, CreditPoolDetail, CreditPoolType$1 as CreditPoolType, CreditTransaction, CurrentSubscription, DropinCallbacks, DropinPaymentModalOptions, DropinPaymentOptions, Environment, EnvironmentConfig, GenericPackage, GenericPackageModalOptions, LinkPaymentOptions, ListTransactionsRequest, LoaderConfig, LocaleCode, OrderInfo, OrderStatus, OrderStatusResponse, PaymentCheckoutModalOptions, PaymentClientOptions, PaymentEnvironment, PaymentFailedModalOptions, PaymentMethod, PaymentMethodsParams, PaymentModalOptions, PaymentReadyEventDetail, PaymentResult, PaymentSDKConfig, PaymentSuccessEventDetail, PaymentUnsuccessEventDetail, PaymentUnsuccessResult, PaymentVerificationOptions, Product, PurchaseSuccessData, PurchaseSuccessModalOptions, PurchaseType, RetentionModalOptions, SDKCheckoutRequest, SDKCheckoutResponse, SDKConfig, SDKLoadStatus, ScriptLoaderOptions, SeaArtPaymentElement, SeaartBindCardPayment, SeaartDropinPayment, SeaartLinkPayment, SeaartPaymentComponentSDK, SeaartPaymentInstance, SeaartPaymentSDKConfig, ShowPaymentOptions, SubscribeOptions, SubscriptionParams, SubscriptionPeriod, TransactionListResponse, TransactionStatus, TransactionStorageData, TransactionType };
|
package/dist/index.js
CHANGED
|
@@ -2862,8 +2862,8 @@ const ENVIRONMENT_CONFIGS = {
|
|
|
2862
2862
|
production: {
|
|
2863
2863
|
scriptUrl: 'https://seaart-publish.sc-api.saconsole.com/payment-component/client.js',
|
|
2864
2864
|
clientId: 'XF11ik3u5AJ16IyDI3hebq5',
|
|
2865
|
-
orderApiUrl: 'https://payment.seaverse.
|
|
2866
|
-
walletApiUrl: 'https://wallet.seaverse.
|
|
2865
|
+
orderApiUrl: 'https://payment.seaverse.ai',
|
|
2866
|
+
walletApiUrl: 'https://wallet.seaverse.ai',
|
|
2867
2867
|
cssUrl: 'https://seaart-publish.sc-api.saconsole.com/payment-component/public/style.css',
|
|
2868
2868
|
},
|
|
2869
2869
|
};
|
|
@@ -4465,7 +4465,6 @@ async function fetchAvailablePackages(apiHost, token) {
|
|
|
4465
4465
|
throw new Error(`Failed to fetch available packages: ${response.status} ${response.statusText}`);
|
|
4466
4466
|
}
|
|
4467
4467
|
const result = await response.json();
|
|
4468
|
-
console.log('%c =获取可用积分包列表==result===>>>>>>>>', 'color:orange;', result);
|
|
4469
4468
|
if (result.code !== 0 || !result.data) {
|
|
4470
4469
|
throw new Error(result.msg || 'Failed to fetch available packages');
|
|
4471
4470
|
}
|
|
@@ -6610,7 +6609,7 @@ class LinkPaymentStrategy extends BasePaymentStrategy {
|
|
|
6610
6609
|
// 创建 Link 支付实例
|
|
6611
6610
|
const link = context.orderPayment.createLinkPayment(method, {
|
|
6612
6611
|
callback_url: typeof window !== 'undefined'
|
|
6613
|
-
? `${window.location.origin}
|
|
6612
|
+
? `${window.location.origin}${window.location.pathname}`
|
|
6614
6613
|
: '',
|
|
6615
6614
|
});
|
|
6616
6615
|
// 创建订单
|
|
@@ -9184,7 +9183,7 @@ class GenericPackageModal extends BasePackageModal {
|
|
|
9184
9183
|
/**
|
|
9185
9184
|
* SDK version
|
|
9186
9185
|
*/
|
|
9187
|
-
const VERSION$2 = '0.9.
|
|
9186
|
+
const VERSION$2 = '0.9.7';
|
|
9188
9187
|
|
|
9189
9188
|
var __defProp = Object.defineProperty;
|
|
9190
9189
|
var __defProps = Object.defineProperties;
|