chore(payment): update ezpay dev redirect notice
This commit is contained in:
@@ -17,7 +17,7 @@ import { StripePaymentDialog } from "./stripe-payment-dialog";
|
||||
import { SubscriptionCtaButton } from "./subscription-cta-button";
|
||||
import styles from "./subscription-cta-button.module.css";
|
||||
|
||||
const EZPAY_DEVELOPMENT_REDIRECT_DELAY_MS = 3000;
|
||||
const EZPAY_DEVELOPMENT_REDIRECT_DELAY_MS = 5000;
|
||||
|
||||
export interface SubscriptionCheckoutButtonProps {
|
||||
/** 是否可用(未选套餐 / 未勾选协议 → false) */
|
||||
@@ -149,6 +149,14 @@ export function SubscriptionCheckoutButton({
|
||||
stripeClientSecret !== null &&
|
||||
stripeClientSecret !== hiddenStripeClientSecret &&
|
||||
!payment.isPaid;
|
||||
const pendingEzpayRedirectOrderId =
|
||||
AppEnvUtil.isDevelopment() &&
|
||||
payment.payParams &&
|
||||
isEzpayPayment(payment.payParams) &&
|
||||
getPaymentUrl(payment.payParams) &&
|
||||
payment.currentOrderId
|
||||
? payment.currentOrderId
|
||||
: null;
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -174,6 +182,16 @@ export function SubscriptionCheckoutButton({
|
||||
{payment.errorMessage}
|
||||
</p>
|
||||
) : null}
|
||||
{pendingEzpayRedirectOrderId ? (
|
||||
<div className={styles.pendingRedirect} role="status">
|
||||
<span className={styles.pendingRedirectLabel}>
|
||||
Ezpay order created. Redirecting in 3 seconds.
|
||||
</span>
|
||||
<span className={styles.pendingRedirectOrder}>
|
||||
Order No. {pendingEzpayRedirectOrderId}
|
||||
</span>
|
||||
</div>
|
||||
) : null}
|
||||
{shouldShowStripeDialog ? (
|
||||
<StripePaymentDialog
|
||||
clientSecret={stripeClientSecret}
|
||||
|
||||
Reference in New Issue
Block a user