@seaverse/payment-sdk 0.9.4 → 0.9.6
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 +28 -3
- package/dist/index.browser.js +113 -140
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +113 -140
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +113 -140
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @seaverse/payment-sdk
|
|
2
2
|
|
|
3
|
-
> **Version**: 0.9.
|
|
3
|
+
> **Version**: 0.9.6 | **Language**: English
|
|
4
4
|
|
|
5
5
|
A comprehensive payment solution for SeaVerse platform, providing credit management, payment checkout, subscription management, and order tracking.
|
|
6
6
|
|
|
@@ -928,6 +928,31 @@ import type {
|
|
|
928
928
|
|
|
929
929
|
## 📄 Changelog
|
|
930
930
|
|
|
931
|
+
### v0.9.6 (2026-02-08) - Link Payment Callback Fix
|
|
932
|
+
|
|
933
|
+
**🔧 Bug Fixes**:
|
|
934
|
+
- **Dynamic Callback URL**: Fixed Link payment `callback_url` from hardcoded `/pricing` to `window.location.pathname`, ensuring correct redirect on any page.
|
|
935
|
+
- **Removed Debug Logs**: Cleaned up leftover `console.log` in `packages.ts`.
|
|
936
|
+
|
|
937
|
+
### v0.9.5 (2026-02-08) - CreditPackCard UI Refinement & Modal Fix
|
|
938
|
+
|
|
939
|
+
**🎨 CreditPackCard UI Overhaul**:
|
|
940
|
+
- **1:1 Design Restoration**: Rebuilt CreditPackCard to pixel-match reference design across all dimensions.
|
|
941
|
+
- Card: `246x252` → `228x auto`, `border-radius: 16px`, compact padding `28px 20px 16px`.
|
|
942
|
+
- Number: `36px` → `32px`, italic weight `600`, tighter letter-spacing.
|
|
943
|
+
- Credits text: `16px` at `0.45` opacity, 8px margin below.
|
|
944
|
+
- Bonus tag: `16px` bold green `#00E699`, `6px` border-radius, compact padding.
|
|
945
|
+
- Button: `48px` height, `14px` border-radius, `18px` font, fixed `16px` margin-top.
|
|
946
|
+
- **Color System Update**: Unified to `#00E699` green palette across glow, bonus text, button gradient, and borders.
|
|
947
|
+
- **Badge Refinement**: Reduced to `72px`, repositioned `top: -16px, right: -12px`, `12deg` rotation, italic "Double" text.
|
|
948
|
+
- **Spacing Optimization**: Eliminated excessive gaps between bonus tag and button; content flows naturally without `flex: 1` or `margin-top: auto` stretch.
|
|
949
|
+
|
|
950
|
+
**🔧 GenericPackageModal Fix**:
|
|
951
|
+
- **Fixed White Background Layer**: Resolved issue where `.payment-modal` white background (`#ffffff`) was visible behind dark-themed cards.
|
|
952
|
+
- Added `backgroundColor: transparent`, `boxShadow: none`, `borderRadius: 0` overrides.
|
|
953
|
+
- Cleared `.payment-modal-content` background to transparent.
|
|
954
|
+
- **SeaartPaymentSDK**: Now uses environment config `clientId` instead of user-provided one for correct payment gateway routing.
|
|
955
|
+
|
|
931
956
|
### v0.9.4 (2026-02-07) - Mobile Responsiveness & SDK Refinement
|
|
932
957
|
|
|
933
958
|
**📱 Mobile & Responsive Enhancements**:
|
|
@@ -1022,5 +1047,5 @@ Issues and Pull Requests are welcome!
|
|
|
1022
1047
|
|
|
1023
1048
|
---
|
|
1024
1049
|
|
|
1025
|
-
**Last Updated**: 2026-02-
|
|
1026
|
-
**SDK Version**: 0.9.
|
|
1050
|
+
**Last Updated**: 2026-02-08
|
|
1051
|
+
**SDK Version**: 0.9.6
|
package/dist/index.browser.js
CHANGED
|
@@ -2968,7 +2968,7 @@ class SeaartPaymentSDK {
|
|
|
2968
2968
|
}
|
|
2969
2969
|
// 4. 初始化 SDK
|
|
2970
2970
|
await window.SeaartPaymentComponent.init({
|
|
2971
|
-
client_id: config.clientId,
|
|
2971
|
+
client_id: ENVIRONMENT_CONFIGS[config.environment].clientId,
|
|
2972
2972
|
language: language,
|
|
2973
2973
|
});
|
|
2974
2974
|
// 5. 保存配置并标记已初始化
|
|
@@ -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
|
}
|
|
@@ -4489,34 +4488,33 @@ async function fetchAvailablePackages(apiHost, token) {
|
|
|
4489
4488
|
* - 悬停微交互和平滑过渡
|
|
4490
4489
|
*/
|
|
4491
4490
|
/**
|
|
4492
|
-
* 设计系统常量 -
|
|
4491
|
+
* 设计系统常量 - 一比一还原参考图
|
|
4493
4492
|
*/
|
|
4494
4493
|
const DESIGN_TOKENS = {
|
|
4495
|
-
//
|
|
4494
|
+
// 卡片尺寸(紧凑布局,4卡并排)
|
|
4496
4495
|
card: {
|
|
4497
|
-
width: '
|
|
4498
|
-
height: '
|
|
4496
|
+
width: '228px',
|
|
4497
|
+
height: 'auto',
|
|
4499
4498
|
borderRadius: '16px',
|
|
4500
|
-
padding: '20px',
|
|
4499
|
+
padding: '28px 20px 16px',
|
|
4501
4500
|
},
|
|
4502
4501
|
// 颜色系统
|
|
4503
4502
|
colors: {
|
|
4504
4503
|
text: {
|
|
4505
4504
|
primary: '#ffffff',
|
|
4506
|
-
|
|
4507
|
-
bonus: '#00e699',
|
|
4505
|
+
bonus: '#00E699',
|
|
4508
4506
|
},
|
|
4509
4507
|
background: {
|
|
4510
|
-
card: 'rgba(255, 255, 255, 0.
|
|
4511
|
-
cardHighlight: 'linear-gradient(
|
|
4512
|
-
bonus: 'rgba(0,
|
|
4513
|
-
button: 'rgba(255, 255, 255, 0.
|
|
4514
|
-
buttonHighlight: 'linear-gradient(
|
|
4508
|
+
card: 'rgba(255, 255, 255, 0.04)',
|
|
4509
|
+
cardHighlight: 'linear-gradient(180deg, rgba(0, 230, 153, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%)',
|
|
4510
|
+
bonus: 'rgba(0, 230, 153, 0.1)',
|
|
4511
|
+
button: 'rgba(255, 255, 255, 0.06)',
|
|
4512
|
+
buttonHighlight: 'linear-gradient(90deg, #00E699 0%, #00D4AA 100%)',
|
|
4515
4513
|
},
|
|
4516
4514
|
border: {
|
|
4517
|
-
default: 'rgba(255, 255, 255, 0.
|
|
4518
|
-
highlighted: 'rgba(0,
|
|
4519
|
-
button: 'rgba(255, 255, 255, 0.
|
|
4515
|
+
default: 'rgba(255, 255, 255, 0.08)',
|
|
4516
|
+
highlighted: 'rgba(0, 230, 153, 0.3)',
|
|
4517
|
+
button: 'rgba(255, 255, 255, 0.1)',
|
|
4520
4518
|
},
|
|
4521
4519
|
glow: '#00E699',
|
|
4522
4520
|
badge: {
|
|
@@ -4533,7 +4531,7 @@ const DESIGN_TOKENS = {
|
|
|
4533
4531
|
},
|
|
4534
4532
|
// 徽章
|
|
4535
4533
|
badge: {
|
|
4536
|
-
size: '
|
|
4534
|
+
size: '72px',
|
|
4537
4535
|
},
|
|
4538
4536
|
};
|
|
4539
4537
|
/**
|
|
@@ -4591,7 +4589,6 @@ class CreditPackCard {
|
|
|
4591
4589
|
display: flex;
|
|
4592
4590
|
flex-direction: column;
|
|
4593
4591
|
align-items: center;
|
|
4594
|
-
justify-content: space-between;
|
|
4595
4592
|
width: ${DESIGN_TOKENS.card.width};
|
|
4596
4593
|
height: ${DESIGN_TOKENS.card.height};
|
|
4597
4594
|
padding: ${DESIGN_TOKENS.card.padding};
|
|
@@ -4600,6 +4597,7 @@ class CreditPackCard {
|
|
|
4600
4597
|
overflow: hidden;
|
|
4601
4598
|
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
4602
4599
|
cursor: pointer;
|
|
4600
|
+
box-sizing: border-box;
|
|
4603
4601
|
`;
|
|
4604
4602
|
// 边框层
|
|
4605
4603
|
const border = document.createElement('div');
|
|
@@ -4619,11 +4617,11 @@ class CreditPackCard {
|
|
|
4619
4617
|
const glowContainer = document.createElement('div');
|
|
4620
4618
|
glowContainer.style.cssText = `
|
|
4621
4619
|
position: absolute;
|
|
4622
|
-
top: -
|
|
4620
|
+
top: -60px;
|
|
4623
4621
|
left: 50%;
|
|
4624
4622
|
transform: translateX(-50%);
|
|
4625
|
-
width:
|
|
4626
|
-
height:
|
|
4623
|
+
width: 160px;
|
|
4624
|
+
height: 120px;
|
|
4627
4625
|
pointer-events: none;
|
|
4628
4626
|
overflow: visible;
|
|
4629
4627
|
`;
|
|
@@ -4637,73 +4635,61 @@ class CreditPackCard {
|
|
|
4637
4635
|
`;
|
|
4638
4636
|
const glow = document.createElement('div');
|
|
4639
4637
|
glow.style.cssText = `
|
|
4640
|
-
width:
|
|
4641
|
-
height:
|
|
4638
|
+
width: 160px;
|
|
4639
|
+
height: 120px;
|
|
4642
4640
|
background: ${DESIGN_TOKENS.colors.glow};
|
|
4643
|
-
opacity: 0.
|
|
4644
|
-
filter: blur(
|
|
4641
|
+
opacity: 0.18;
|
|
4642
|
+
filter: blur(50px);
|
|
4645
4643
|
border-radius: 50%;
|
|
4646
4644
|
`;
|
|
4647
4645
|
glowInner.appendChild(glow);
|
|
4648
4646
|
glowContainer.appendChild(glowInner);
|
|
4649
4647
|
card.appendChild(glowContainer);
|
|
4650
4648
|
}
|
|
4651
|
-
// 悬停效果
|
|
4652
|
-
let hoverAnimationId = null;
|
|
4653
4649
|
card.addEventListener('mouseenter', () => {
|
|
4654
4650
|
card.style.transform = 'translateY(-4px) scale(1.02)';
|
|
4655
4651
|
border.style.borderColor = isHighlighted
|
|
4656
|
-
? 'rgba(0,
|
|
4657
|
-
: 'rgba(255, 255, 255, 0.
|
|
4658
|
-
// 暂停呼吸动画
|
|
4659
|
-
if (hoverAnimationId) {
|
|
4660
|
-
card.style.animationPlayState = 'paused';
|
|
4661
|
-
}
|
|
4652
|
+
? 'rgba(0, 230, 153, 0.5)'
|
|
4653
|
+
: 'rgba(255, 255, 255, 0.15)';
|
|
4662
4654
|
});
|
|
4663
4655
|
card.addEventListener('mouseleave', () => {
|
|
4664
4656
|
card.style.transform = 'translateY(0) scale(1)';
|
|
4665
4657
|
border.style.borderColor = isHighlighted
|
|
4666
4658
|
? DESIGN_TOKENS.colors.border.highlighted
|
|
4667
4659
|
: DESIGN_TOKENS.colors.border.default;
|
|
4668
|
-
// 恢复呼吸动画
|
|
4669
|
-
if (hoverAnimationId) {
|
|
4670
|
-
card.style.animationPlayState = 'running';
|
|
4671
|
-
}
|
|
4672
4660
|
});
|
|
4673
4661
|
// 添加呼吸动画(仅高亮卡片)
|
|
4674
|
-
if (isHighlighted) {
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
@keyframes ${animationId} {
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
}
|
|
4689
|
-
.credit-pack-card[data-package-id="${this.options.id}"] {
|
|
4690
|
-
|
|
4691
|
-
}
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
}
|
|
4662
|
+
// if (isHighlighted) {
|
|
4663
|
+
// const animationId = `pulse-${this.options.id}`;
|
|
4664
|
+
// hoverAnimationId = animationId;
|
|
4665
|
+
// const style = document.createElement('style');
|
|
4666
|
+
// style.textContent = `
|
|
4667
|
+
// @keyframes ${animationId} {
|
|
4668
|
+
// 0%, 100% {
|
|
4669
|
+
// transform: translateY(0) scale(1);
|
|
4670
|
+
// box-shadow: 0 8px 32px rgba(0, 255, 136, 0.3);
|
|
4671
|
+
// }
|
|
4672
|
+
// 50% {
|
|
4673
|
+
// transform: translateY(-2px) scale(1.02);
|
|
4674
|
+
// box-shadow: 0 12px 40px rgba(0, 255, 136, 0.4);
|
|
4675
|
+
// }
|
|
4676
|
+
// }
|
|
4677
|
+
// .credit-pack-card[data-package-id="${this.options.id}"] {
|
|
4678
|
+
// animation: ${animationId} 2s ease-in-out infinite;
|
|
4679
|
+
// }
|
|
4680
|
+
// `;
|
|
4681
|
+
// document.head.appendChild(style);
|
|
4682
|
+
// }
|
|
4695
4683
|
// 内容容器
|
|
4696
4684
|
const contentContainer = document.createElement('div');
|
|
4697
4685
|
contentContainer.style.cssText = `
|
|
4698
4686
|
display: flex;
|
|
4699
4687
|
flex-direction: column;
|
|
4700
4688
|
align-items: center;
|
|
4701
|
-
justify-content:
|
|
4702
|
-
gap:
|
|
4703
|
-
margin-top: 16px;
|
|
4689
|
+
justify-content: flex-start;
|
|
4690
|
+
gap: 0;
|
|
4704
4691
|
z-index: 10;
|
|
4705
4692
|
width: 100%;
|
|
4706
|
-
flex: 1;
|
|
4707
4693
|
`;
|
|
4708
4694
|
// 金额(大数字)
|
|
4709
4695
|
const amountWrapper = document.createElement('div');
|
|
@@ -4711,15 +4697,17 @@ class CreditPackCard {
|
|
|
4711
4697
|
display: flex;
|
|
4712
4698
|
flex-direction: column;
|
|
4713
4699
|
align-items: center;
|
|
4700
|
+
margin-bottom: 2px;
|
|
4714
4701
|
`;
|
|
4715
4702
|
const amount = document.createElement('span');
|
|
4716
4703
|
amount.style.cssText = `
|
|
4717
|
-
font-size:
|
|
4718
|
-
font-weight:
|
|
4719
|
-
line-height:
|
|
4704
|
+
font-size: 32px;
|
|
4705
|
+
font-weight: 600;
|
|
4706
|
+
line-height: 1.1;
|
|
4720
4707
|
font-style: italic;
|
|
4721
4708
|
color: ${DESIGN_TOKENS.colors.text.primary};
|
|
4722
|
-
font-family: -apple-system, BlinkMacSystemFont,
|
|
4709
|
+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
4710
|
+
letter-spacing: -0.02em;
|
|
4723
4711
|
`;
|
|
4724
4712
|
amount.textContent = this.options.totalCredits.toLocaleString();
|
|
4725
4713
|
amountWrapper.appendChild(amount);
|
|
@@ -4727,8 +4715,8 @@ class CreditPackCard {
|
|
|
4727
4715
|
// 积分文本
|
|
4728
4716
|
const creditsWrapper = document.createElement('div');
|
|
4729
4717
|
creditsWrapper.style.cssText = `
|
|
4730
|
-
|
|
4731
|
-
|
|
4718
|
+
margin-bottom: 12px;
|
|
4719
|
+
margin-top: 12px;
|
|
4732
4720
|
display: flex;
|
|
4733
4721
|
align-items: center;
|
|
4734
4722
|
justify-content: center;
|
|
@@ -4736,9 +4724,9 @@ class CreditPackCard {
|
|
|
4736
4724
|
const creditsText = document.createElement('span');
|
|
4737
4725
|
creditsText.style.cssText = `
|
|
4738
4726
|
font-size: 16px;
|
|
4739
|
-
font-weight:
|
|
4740
|
-
|
|
4741
|
-
|
|
4727
|
+
font-weight: 400;
|
|
4728
|
+
color: rgba(255, 255, 255, 0.45);
|
|
4729
|
+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
4742
4730
|
`;
|
|
4743
4731
|
creditsText.textContent = `${this.options.baseCredits.toLocaleString()} ${texts.credits}`;
|
|
4744
4732
|
creditsWrapper.appendChild(creditsText);
|
|
@@ -4748,27 +4736,26 @@ class CreditPackCard {
|
|
|
4748
4736
|
const bonusWrapper = document.createElement('div');
|
|
4749
4737
|
bonusWrapper.style.cssText = `
|
|
4750
4738
|
background: ${DESIGN_TOKENS.colors.background.bonus};
|
|
4751
|
-
padding:
|
|
4752
|
-
border-radius:
|
|
4753
|
-
display: flex;
|
|
4739
|
+
padding: 4px 6px;
|
|
4740
|
+
border-radius: 6px;
|
|
4754
4741
|
align-items: center;
|
|
4755
4742
|
justify-content: center;
|
|
4743
|
+
margin-bottom: 0;
|
|
4756
4744
|
`;
|
|
4757
4745
|
const bonusText = document.createElement('span');
|
|
4758
4746
|
bonusText.style.cssText = `
|
|
4759
|
-
font-size:
|
|
4760
|
-
font-weight:
|
|
4761
|
-
line-height: 24px;
|
|
4747
|
+
font-size: 16px;
|
|
4748
|
+
font-weight: 700;
|
|
4762
4749
|
color: ${DESIGN_TOKENS.colors.text.bonus};
|
|
4750
|
+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
4763
4751
|
`;
|
|
4764
4752
|
bonusText.textContent = `+${this.options.bonusCredits.toLocaleString()} ${texts.bonus}`;
|
|
4765
4753
|
bonusWrapper.appendChild(bonusText);
|
|
4766
4754
|
contentContainer.appendChild(bonusWrapper);
|
|
4767
4755
|
}
|
|
4768
4756
|
else {
|
|
4769
|
-
// 占位以保持高度一致
|
|
4770
4757
|
const spacer = document.createElement('div');
|
|
4771
|
-
spacer.style.cssText = 'height:
|
|
4758
|
+
spacer.style.cssText = 'height: 24px; margin-bottom: 0;';
|
|
4772
4759
|
contentContainer.appendChild(spacer);
|
|
4773
4760
|
}
|
|
4774
4761
|
card.appendChild(contentContainer);
|
|
@@ -4784,9 +4771,9 @@ class CreditPackCard {
|
|
|
4784
4771
|
border: ${isHighlighted ? 'none' : `1px solid ${DESIGN_TOKENS.colors.border.button}`};
|
|
4785
4772
|
background: ${isHighlighted ? DESIGN_TOKENS.colors.background.buttonHighlight : DESIGN_TOKENS.colors.background.button};
|
|
4786
4773
|
color: ${isHighlighted ? '#0a0a0f' : DESIGN_TOKENS.colors.text.primary};
|
|
4787
|
-
font-size:
|
|
4788
|
-
font-weight:
|
|
4789
|
-
line-height:
|
|
4774
|
+
font-size: 18px;
|
|
4775
|
+
font-weight: 700;
|
|
4776
|
+
line-height: 1;
|
|
4790
4777
|
cursor: pointer;
|
|
4791
4778
|
display: flex;
|
|
4792
4779
|
align-items: center;
|
|
@@ -4794,8 +4781,9 @@ class CreditPackCard {
|
|
|
4794
4781
|
overflow: hidden;
|
|
4795
4782
|
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
4796
4783
|
z-index: 10;
|
|
4797
|
-
margin-top:
|
|
4798
|
-
|
|
4784
|
+
margin-top: 16px;
|
|
4785
|
+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
4786
|
+
box-shadow: ${isHighlighted ? '0 4px 16px rgba(0, 230, 153, 0.35)' : 'none'};
|
|
4799
4787
|
`;
|
|
4800
4788
|
// 按钮内边框(仅非高亮)
|
|
4801
4789
|
if (!isHighlighted) {
|
|
@@ -4816,16 +4804,17 @@ class CreditPackCard {
|
|
|
4816
4804
|
// 按钮悬停效果
|
|
4817
4805
|
button.addEventListener('mouseenter', () => {
|
|
4818
4806
|
if (isHighlighted) {
|
|
4819
|
-
button.style.boxShadow = '0 6px 20px rgba(0,
|
|
4807
|
+
button.style.boxShadow = '0 6px 20px rgba(0, 230, 153, 0.45)';
|
|
4808
|
+
button.style.transform = 'translateY(-1px)';
|
|
4820
4809
|
}
|
|
4821
4810
|
else {
|
|
4822
|
-
button.style.background = 'rgba(255, 255, 255, 0.
|
|
4811
|
+
button.style.background = 'rgba(255, 255, 255, 0.1)';
|
|
4812
|
+
button.style.transform = 'translateY(-1px)';
|
|
4823
4813
|
}
|
|
4824
|
-
button.style.transform = 'translateY(-2px)';
|
|
4825
4814
|
});
|
|
4826
4815
|
button.addEventListener('mouseleave', () => {
|
|
4827
4816
|
if (isHighlighted) {
|
|
4828
|
-
button.style.boxShadow = '0 4px 16px rgba(0,
|
|
4817
|
+
button.style.boxShadow = '0 4px 16px rgba(0, 230, 153, 0.35)';
|
|
4829
4818
|
}
|
|
4830
4819
|
else {
|
|
4831
4820
|
button.style.background = DESIGN_TOKENS.colors.background.button;
|
|
@@ -4852,18 +4841,19 @@ class CreditPackCard {
|
|
|
4852
4841
|
const badge = document.createElement('div');
|
|
4853
4842
|
badge.style.cssText = `
|
|
4854
4843
|
position: absolute;
|
|
4855
|
-
top: -
|
|
4856
|
-
right: -
|
|
4844
|
+
top: -16px;
|
|
4845
|
+
right: -12px;
|
|
4857
4846
|
width: ${DESIGN_TOKENS.badge.size};
|
|
4858
4847
|
height: ${DESIGN_TOKENS.badge.size};
|
|
4859
4848
|
z-index: 30;
|
|
4860
4849
|
pointer-events: none;
|
|
4850
|
+
transform: rotate(12deg);
|
|
4861
4851
|
`;
|
|
4862
4852
|
// SVG 内容
|
|
4863
4853
|
const svgNS = 'http://www.w3.org/2000/svg';
|
|
4864
4854
|
const svg = document.createElementNS(svgNS, 'svg');
|
|
4865
|
-
svg.setAttribute('width', '
|
|
4866
|
-
svg.setAttribute('height', '
|
|
4855
|
+
svg.setAttribute('width', '72');
|
|
4856
|
+
svg.setAttribute('height', '72');
|
|
4867
4857
|
svg.setAttribute('viewBox', '0 0 86 86');
|
|
4868
4858
|
svg.setAttribute('fill', 'none');
|
|
4869
4859
|
svg.style.cssText = 'width: 100%; height: 100%;';
|
|
@@ -4879,47 +4869,25 @@ class CreditPackCard {
|
|
|
4879
4869
|
starStroke.setAttribute('stroke-opacity', '0.08');
|
|
4880
4870
|
svg.appendChild(starStroke);
|
|
4881
4871
|
// 文字(中文或英文)
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
svg.appendChild(text2);
|
|
4902
|
-
}
|
|
4903
|
-
else {
|
|
4904
|
-
const text1 = document.createElementNS(svgNS, 'text');
|
|
4905
|
-
text1.setAttribute('x', '43');
|
|
4906
|
-
text1.setAttribute('y', '35');
|
|
4907
|
-
text1.setAttribute('text-anchor', 'middle');
|
|
4908
|
-
text1.setAttribute('fill', DESIGN_TOKENS.colors.badge.text);
|
|
4909
|
-
text1.setAttribute('font-size', '10');
|
|
4910
|
-
text1.setAttribute('font-weight', '700');
|
|
4911
|
-
text1.textContent = 'On 1st';
|
|
4912
|
-
svg.appendChild(text1);
|
|
4913
|
-
const text2 = document.createElementNS(svgNS, 'text');
|
|
4914
|
-
text2.setAttribute('x', '43');
|
|
4915
|
-
text2.setAttribute('y', '51');
|
|
4916
|
-
text2.setAttribute('text-anchor', 'middle');
|
|
4917
|
-
text2.setAttribute('fill', DESIGN_TOKENS.colors.badge.text);
|
|
4918
|
-
text2.setAttribute('font-size', '12');
|
|
4919
|
-
text2.setAttribute('font-weight', '700');
|
|
4920
|
-
text2.textContent = 'Double';
|
|
4921
|
-
svg.appendChild(text2);
|
|
4922
|
-
}
|
|
4872
|
+
const text1 = document.createElementNS(svgNS, 'text');
|
|
4873
|
+
text1.setAttribute('x', '43');
|
|
4874
|
+
text1.setAttribute('y', '38');
|
|
4875
|
+
text1.setAttribute('text-anchor', 'middle');
|
|
4876
|
+
text1.setAttribute('fill', DESIGN_TOKENS.colors.badge.text);
|
|
4877
|
+
text1.setAttribute('font-size', '14');
|
|
4878
|
+
text1.setAttribute('font-weight', '800');
|
|
4879
|
+
text1.setAttribute('font-style', 'italic');
|
|
4880
|
+
text1.textContent = 'Double';
|
|
4881
|
+
svg.appendChild(text1);
|
|
4882
|
+
const text2 = document.createElementNS(svgNS, 'text');
|
|
4883
|
+
text2.setAttribute('x', '43');
|
|
4884
|
+
text2.setAttribute('y', '53');
|
|
4885
|
+
text2.setAttribute('text-anchor', 'middle');
|
|
4886
|
+
text2.setAttribute('fill', DESIGN_TOKENS.colors.badge.text);
|
|
4887
|
+
text2.setAttribute('font-size', '10');
|
|
4888
|
+
text2.setAttribute('font-weight', '700');
|
|
4889
|
+
text2.textContent = 'ON 1ST';
|
|
4890
|
+
svg.appendChild(text2);
|
|
4923
4891
|
// 渐变定义
|
|
4924
4892
|
const defs = document.createElementNS(svgNS, 'defs');
|
|
4925
4893
|
const gradient = document.createElementNS(svgNS, 'linearGradient');
|
|
@@ -6641,7 +6609,7 @@ class LinkPaymentStrategy extends BasePaymentStrategy {
|
|
|
6641
6609
|
// 创建 Link 支付实例
|
|
6642
6610
|
const link = context.orderPayment.createLinkPayment(method, {
|
|
6643
6611
|
callback_url: typeof window !== 'undefined'
|
|
6644
|
-
? `${window.location.origin}
|
|
6612
|
+
? `${window.location.origin}${window.location.pathname}`
|
|
6645
6613
|
: '',
|
|
6646
6614
|
});
|
|
6647
6615
|
// 创建订单
|
|
@@ -8538,7 +8506,9 @@ class CreditPackageModal extends BasePackageModal {
|
|
|
8538
8506
|
}
|
|
8539
8507
|
.credit-pack-card {
|
|
8540
8508
|
width: 100% !important;
|
|
8541
|
-
height:
|
|
8509
|
+
height: 300px !important;
|
|
8510
|
+
padding: 28px 20px 20px !important;
|
|
8511
|
+
border-radius: 20px !important;
|
|
8542
8512
|
}
|
|
8543
8513
|
.payment-modal {
|
|
8544
8514
|
width: 95vw !important;
|
|
@@ -8802,20 +8772,23 @@ class GenericPackageModal extends BasePackageModal {
|
|
|
8802
8772
|
* Apply modal styling (hook method override)
|
|
8803
8773
|
*/
|
|
8804
8774
|
applyModalStyling() {
|
|
8805
|
-
// Modify modal style - make card fully fill
|
|
8775
|
+
// Modify modal style - make card fully fill, remove white background
|
|
8806
8776
|
const modalElement = document.querySelector('.payment-modal');
|
|
8807
8777
|
if (modalElement) {
|
|
8808
8778
|
modalElement.style.background = 'transparent';
|
|
8779
|
+
modalElement.style.backgroundColor = 'transparent';
|
|
8809
8780
|
modalElement.style.border = 'none';
|
|
8810
8781
|
modalElement.style.padding = '0';
|
|
8811
|
-
modalElement.style.borderRadius = '
|
|
8812
|
-
modalElement.style.overflow = '
|
|
8782
|
+
modalElement.style.borderRadius = '0';
|
|
8783
|
+
modalElement.style.overflow = 'visible';
|
|
8784
|
+
modalElement.style.boxShadow = 'none';
|
|
8813
8785
|
}
|
|
8814
8786
|
// Modify content container style - remove padding
|
|
8815
8787
|
const contentElement = document.querySelector('.payment-modal-content');
|
|
8816
8788
|
if (contentElement) {
|
|
8817
8789
|
contentElement.style.padding = '0';
|
|
8818
8790
|
contentElement.style.margin = '0';
|
|
8791
|
+
contentElement.style.background = 'transparent';
|
|
8819
8792
|
}
|
|
8820
8793
|
// Listen for close button event from card
|
|
8821
8794
|
const container = this.getContentContainer();
|
|
@@ -9210,7 +9183,7 @@ class GenericPackageModal extends BasePackageModal {
|
|
|
9210
9183
|
/**
|
|
9211
9184
|
* SDK version
|
|
9212
9185
|
*/
|
|
9213
|
-
const VERSION$2 = '0.9.
|
|
9186
|
+
const VERSION$2 = '0.9.6';
|
|
9214
9187
|
|
|
9215
9188
|
var __defProp = Object.defineProperty;
|
|
9216
9189
|
var __defProps = Object.defineProperties;
|