more
This commit is contained in:
@@ -58,6 +58,13 @@ const SignupPage = () => {
|
||||
return hasErrors ? null : objectMap(({ value }) => value, newData);
|
||||
};
|
||||
|
||||
const validatePaymentData = () => {
|
||||
const newData = getValidatedFormData(data, signupfields);
|
||||
const hasErrors = isFormDataHasErrors(newData);
|
||||
setPaymentdata(newData);
|
||||
return hasErrors ? null : objectMap(({ value }) => value, newData);
|
||||
};
|
||||
|
||||
const [cardNumber, setCardNumber] = useState("");
|
||||
const [cardName, setCardName] = useState("");
|
||||
const [cardSecNumber, setCardSecNumber] = useState("");
|
||||
@@ -105,10 +112,19 @@ const SignupPage = () => {
|
||||
}
|
||||
}
|
||||
|
||||
async function handleStripePaymentAuthorization(paymentDataValues) {
|
||||
console.log(paymentDataValues);
|
||||
}
|
||||
const handleSignup = async (e) => {
|
||||
console.log("handleSignup");
|
||||
/*
|
||||
e.preventDefault();
|
||||
const paymentDataValues = validatePaymentData();
|
||||
if (paymentDataValues === null) {
|
||||
return;
|
||||
}
|
||||
/*
|
||||
const paymentSuccess = handleStripePaymentAuthorization(paymentDataValues);
|
||||
|
||||
if (paymentSuccess) {
|
||||
if (isBusy) {
|
||||
return;
|
||||
}
|
||||
@@ -129,16 +145,16 @@ const SignupPage = () => {
|
||||
error.message || "Sorry, something went wrong. Please try again."
|
||||
);
|
||||
}
|
||||
}
|
||||
*/
|
||||
};
|
||||
|
||||
const handleProceed = () => {
|
||||
/*
|
||||
const dataValues = validateData();
|
||||
if (dataValues === null) {
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
setShowPaymentModal(true);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user