feat(payment): expand Stripe methods and checkout handoff
Docker Image / Build and Push Docker Image (push) Successful in 2m10s

This commit is contained in:
Codex
2026-07-28 16:27:03 +08:00
parent 2e402de15b
commit 59e4eac736
42 changed files with 1151 additions and 92 deletions
@@ -4,6 +4,7 @@ import { type Dispatch, useEffect, useRef, useState } from "react";
import {
getPaymentUrl,
getStripeCustomerSessionClientSecret,
getStripeClientSecret,
isEzpayPayment,
launchEzpayRedirect,
@@ -59,6 +60,8 @@ export interface PaymentLaunchFlow {
shouldShowQrisDialog: boolean;
shouldShowStripeDialog: boolean;
stripeClientSecret: string | null;
stripeCustomerSessionClientSecret: string | null;
savedPaymentMethodsEnabled: boolean;
}
export interface QrisPaymentDetails {
@@ -165,6 +168,9 @@ export function usePaymentLaunchFlow({
const stripeClientSecret = payment.payParams
? getStripeClientSecret(payment.payParams)
: null;
const stripeCustomerSessionClientSecret = payment.payParams
? getStripeCustomerSessionClientSecret(payment.payParams)
: null;
const ezpayLaunchTarget =
payment.payParams && isEzpayPayment(payment.payParams)
? resolveEzpayLaunchTarget(payment.payParams)
@@ -385,5 +391,8 @@ export function usePaymentLaunchFlow({
shouldShowQrisDialog,
shouldShowStripeDialog,
stripeClientSecret,
stripeCustomerSessionClientSecret,
savedPaymentMethodsEnabled:
stripeCustomerSessionClientSecret !== null,
};
}