revert(payment): remove unsupported Stripe and EzPay upgrade
Docker Image / Build and Push Docker Image (push) Successful in 2m15s
Docker Image / Build and Push Docker Image (push) Successful in 2m15s
This commit is contained in:
@@ -143,27 +143,6 @@ export function getStripeClientSecret(
|
||||
return null;
|
||||
}
|
||||
|
||||
export function getStripeCustomerSessionClientSecret(
|
||||
payParams: Record<string, unknown>,
|
||||
): string | null {
|
||||
const provider = payParams.provider;
|
||||
const isStripeProvider =
|
||||
typeof provider !== "string" || provider.toLowerCase() === "stripe";
|
||||
const enabled = payParams.savedPaymentMethodsEnabled === true;
|
||||
const clientSecret = payParams.customerSessionClientSecret;
|
||||
|
||||
if (
|
||||
isStripeProvider &&
|
||||
enabled &&
|
||||
typeof clientSecret === "string" &&
|
||||
/^cuss_[^\s]+_secret_[^\s]+$/i.test(clientSecret)
|
||||
) {
|
||||
return clientSecret;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
export interface LaunchEzpayRedirectInput {
|
||||
orderId: string | null;
|
||||
paymentUrl: string;
|
||||
|
||||
Reference in New Issue
Block a user