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:
parent
9a41e8a236
commit
f977b7298e
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue