mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-09-24 16:05:44 +08:00
fix(payment): revert Stripe to same-window navigation, use Stripe brand color for pay button
This commit is contained in:
@@ -231,9 +231,7 @@ async function createOrder(orderAmount: number, orderType: string, planId?: numb
|
||||
plan_id: planId,
|
||||
})
|
||||
if (result.client_secret) {
|
||||
const stripeUrl = router.resolve({ path: '/payment/stripe', query: { order_id: String(result.order_id), client_secret: result.client_secret } }).href
|
||||
window.open(stripeUrl, '_blank')
|
||||
router.push({ path: '/payment/qrcode', query: { order_id: String(result.order_id), expires_at: result.expires_at || '', payment_type: 'stripe' } })
|
||||
router.push({ path: '/payment/stripe', query: { order_id: String(result.order_id), client_secret: result.client_secret } })
|
||||
} else if (result.qr_code) {
|
||||
router.push({ path: '/payment/qrcode', query: { order_id: String(result.order_id), qr: result.qr_code || '', pay_url: result.pay_url || '', expires_at: result.expires_at || '', payment_type: selectedMethod.value } })
|
||||
} else if (result.pay_url) {
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<Icon name="checkCircle" size="md" />
|
||||
<span class="text-sm font-medium">{{ t('payment.stripeSuccessProcessing') }}</span>
|
||||
</div>
|
||||
<button v-if="!stripeSuccess" class="btn btn-primary mt-6 w-full py-3" :disabled="stripeSubmitting || !stripeReady" @click="handlePay">
|
||||
<button v-if="!stripeSuccess" class="mt-6 w-full rounded-lg bg-[#635bff] py-3 text-base font-semibold text-white transition-colors hover:bg-[#5851ea] disabled:opacity-50 dark:bg-[#7a73ff] dark:hover:bg-[#635bff]" :disabled="stripeSubmitting || !stripeReady" @click="handlePay">
|
||||
<span v-if="stripeSubmitting" class="flex items-center justify-center gap-2">
|
||||
<span class="h-4 w-4 animate-spin rounded-full border-2 border-white border-t-transparent"></span>
|
||||
{{ t('common.processing') }}
|
||||
|
||||
Reference in New Issue
Block a user