fix: HashPay 支付跳转到外部支付页面
Build and Push Docker Image / build-and-push (push) Successful in 1m2s
Build and Push Docker Image / deploy (push) Successful in 8s

This commit is contained in:
2026-07-14 08:11:32 +00:00
parent b6da19f095
commit dfd7d6a256
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -623,7 +623,7 @@ async function handleCheckout() {
await cartStore.fetchCart()
const orderId = res.data?.id
const selectedChannel = paymentChannels.value.find(ch => ch.code === selectedPayment.value)
if (selectedChannel?.type === 'bepusdt' && orderId) {
if ((selectedChannel?.type === 'bepusdt' || selectedChannel?.type === 'hashpay') && orderId) {
router.push(`/checkout/${orderId}`)
} else {
router.push('/orders')
+7
View File
@@ -102,6 +102,13 @@ async function createPayment() {
orderId.value = Number(route.params.id)
const res: any = await orderApi.createPayment(orderId.value)
paymentInfo.value = res.data
// HashPay: 直接跳转到外部支付页面
if (res.data.checkout_url) {
window.location.href = res.data.checkout_url
return
}
totalTime.value = res.data.expiration_time || 600
remaining.value = totalTime.value