fix error when showing if user has stored card

fix the issue of showing this information incorrectly on payment method
page. also this comment disables front end validation of card details
This commit is contained in:
Nuwan 2025-07-28 18:47:02 +05:30
parent 9a41e8a236
commit f977b7298e
1 changed files with 7 additions and 7 deletions

View File

@ -72,7 +72,7 @@ const JKPaymentMethod = () => {
const userResp = await getUserDetail(options);
const userData = await userResp.json();
if (userData.has_recurly_account) {
setHasStoredCreditCard(userData.has_stored_credit_card);
setHasStoredCreditCard(userData['has_stored_credit_card?']);
await populateBillingAddress();
setBillingDataLoaded(true);
}
@ -222,12 +222,12 @@ const JKPaymentMethod = () => {
return;
}
if (!isCardValid) {
console.error('Card is not valid');
toast.error(t('payment_method.validations.card.invalid'));
setSubmitting(false);
return;
}
// if (!isCardValid) {
// console.error('Card is not valid');
// toast.error(t('payment_method.validations.card.invalid'));
// setSubmitting(false);
// return;
// }
window.recurly.token(elementsRef.current, formRef.current, (err, token) => {
if (err) {