fix(payment): enable ezpay debug delay outside production
This commit is contained in:
@@ -60,7 +60,7 @@ export function SubscriptionCheckoutButton({
|
|||||||
if (paymentUrl) {
|
if (paymentUrl) {
|
||||||
const isEzpay = isEzpayPayment(payment.payParams);
|
const isEzpay = isEzpayPayment(payment.payParams);
|
||||||
|
|
||||||
if (AppEnvUtil.isDevelopment() && isEzpay) {
|
if (!AppEnvUtil.isProduction() && isEzpay) {
|
||||||
if (ezpayRedirectTimeoutRef.current !== null) {
|
if (ezpayRedirectTimeoutRef.current !== null) {
|
||||||
window.clearTimeout(ezpayRedirectTimeoutRef.current);
|
window.clearTimeout(ezpayRedirectTimeoutRef.current);
|
||||||
}
|
}
|
||||||
@@ -150,7 +150,7 @@ export function SubscriptionCheckoutButton({
|
|||||||
stripeClientSecret !== hiddenStripeClientSecret &&
|
stripeClientSecret !== hiddenStripeClientSecret &&
|
||||||
!payment.isPaid;
|
!payment.isPaid;
|
||||||
const pendingEzpayRedirectOrderId =
|
const pendingEzpayRedirectOrderId =
|
||||||
AppEnvUtil.isDevelopment() &&
|
!AppEnvUtil.isProduction() &&
|
||||||
payment.payParams &&
|
payment.payParams &&
|
||||||
isEzpayPayment(payment.payParams) &&
|
isEzpayPayment(payment.payParams) &&
|
||||||
getPaymentUrl(payment.payParams) &&
|
getPaymentUrl(payment.payParams) &&
|
||||||
@@ -185,7 +185,7 @@ export function SubscriptionCheckoutButton({
|
|||||||
{pendingEzpayRedirectOrderId ? (
|
{pendingEzpayRedirectOrderId ? (
|
||||||
<div className={styles.pendingRedirect} role="status">
|
<div className={styles.pendingRedirect} role="status">
|
||||||
<span className={styles.pendingRedirectLabel}>
|
<span className={styles.pendingRedirectLabel}>
|
||||||
Ezpay order created. Redirecting in 3 seconds.
|
Ezpay order created. Redirecting in 5 seconds.
|
||||||
</span>
|
</span>
|
||||||
<span className={styles.pendingRedirectOrder}>
|
<span className={styles.pendingRedirectOrder}>
|
||||||
Order No. {pendingEzpayRedirectOrderId}
|
Order No. {pendingEzpayRedirectOrderId}
|
||||||
|
|||||||
Reference in New Issue
Block a user