Merge branch 'dev' into test
This commit is contained in:
@@ -60,7 +60,7 @@ export function SubscriptionCheckoutButton({
|
||||
if (paymentUrl) {
|
||||
const isEzpay = isEzpayPayment(payment.payParams);
|
||||
|
||||
if (AppEnvUtil.isDevelopment() && isEzpay) {
|
||||
if (!AppEnvUtil.isProduction() && isEzpay) {
|
||||
if (ezpayRedirectTimeoutRef.current !== null) {
|
||||
window.clearTimeout(ezpayRedirectTimeoutRef.current);
|
||||
}
|
||||
@@ -150,7 +150,7 @@ export function SubscriptionCheckoutButton({
|
||||
stripeClientSecret !== hiddenStripeClientSecret &&
|
||||
!payment.isPaid;
|
||||
const pendingEzpayRedirectOrderId =
|
||||
AppEnvUtil.isDevelopment() &&
|
||||
!AppEnvUtil.isProduction() &&
|
||||
payment.payParams &&
|
||||
isEzpayPayment(payment.payParams) &&
|
||||
getPaymentUrl(payment.payParams) &&
|
||||
@@ -185,7 +185,7 @@ export function SubscriptionCheckoutButton({
|
||||
{pendingEzpayRedirectOrderId ? (
|
||||
<div className={styles.pendingRedirect} role="status">
|
||||
<span className={styles.pendingRedirectLabel}>
|
||||
Ezpay order created. Redirecting in 3 seconds.
|
||||
Ezpay order created. Redirecting in 5 seconds.
|
||||
</span>
|
||||
<span className={styles.pendingRedirectOrder}>
|
||||
Order No. {pendingEzpayRedirectOrderId}
|
||||
|
||||
@@ -270,37 +270,6 @@ export const paymentMachine = setup({
|
||||
|
||||
paid: {
|
||||
on: {
|
||||
PaymentPlanSelected: {
|
||||
target: "ready",
|
||||
actions: assign(({ event }) => ({
|
||||
...resetOrderState(),
|
||||
selectedPlanId: event.planId,
|
||||
autoRenew: defaultAutoRenewForPlan(event.planId),
|
||||
})),
|
||||
},
|
||||
PaymentPayChannelChanged: {
|
||||
target: "ready",
|
||||
actions: assign(({ event }) => ({
|
||||
...resetOrderState(),
|
||||
payChannel: event.payChannel,
|
||||
errorMessage: null,
|
||||
})),
|
||||
},
|
||||
PaymentCreateOrderSubmitted: [
|
||||
{
|
||||
guard: ({ context }) =>
|
||||
context.agreed && context.selectedPlanId.length > 0,
|
||||
target: "creatingOrder",
|
||||
actions: assign(resetOrderState),
|
||||
},
|
||||
{
|
||||
target: "ready",
|
||||
actions: assign({
|
||||
errorMessage:
|
||||
"Choose a plan and accept the agreement before continuing.",
|
||||
}),
|
||||
},
|
||||
],
|
||||
PaymentReset: {
|
||||
target: "ready",
|
||||
actions: assign(resetOrderState),
|
||||
|
||||
Reference in New Issue
Block a user