Remove checkbox for credit card fees
This commit is contained in:
parent
b532de646d
commit
c4b5d24186
@ -59,7 +59,6 @@ function CheckoutForm({
|
|||||||
const [selectedAdditionalDonation, setSelectedAdditionalDonation] = useState<number | null>(null);
|
const [selectedAdditionalDonation, setSelectedAdditionalDonation] = useState<number | null>(null);
|
||||||
const [customAmount, setCustomAmount] = useState('');
|
const [customAmount, setCustomAmount] = useState('');
|
||||||
const [email, setEmail] = useState('');
|
const [email, setEmail] = useState('');
|
||||||
const [offsetFees, setOffsetFees] = useState(true);
|
|
||||||
const [totalAmount, setTotalAmount] = useState(300);
|
const [totalAmount, setTotalAmount] = useState(300);
|
||||||
const [message, setMessage] = useState<string>('');
|
const [message, setMessage] = useState<string>('');
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
@ -111,9 +110,7 @@ function CheckoutForm({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (offsetFees) {
|
subtotal = Math.ceil(subtotal * 1.03)
|
||||||
subtotal = Math.ceil(subtotal * 1.03)
|
|
||||||
}
|
|
||||||
|
|
||||||
setTotalAmount(subtotal);
|
setTotalAmount(subtotal);
|
||||||
|
|
||||||
@ -128,7 +125,7 @@ function CheckoutForm({
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}, [paymentIntentID, selectedMembershipLevel, selectedAdditionalDonation, customAmount, offsetFees, email])
|
}, [paymentIntentID, selectedMembershipLevel, selectedAdditionalDonation, customAmount, email])
|
||||||
|
|
||||||
const handleSubmit = async (e: FormEvent) => {
|
const handleSubmit = async (e: FormEvent) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@ -303,33 +300,16 @@ function CheckoutForm({
|
|||||||
Payment
|
Payment
|
||||||
</h2>
|
</h2>
|
||||||
<div className="mt-1 text-sm text-gray-500">
|
<div className="mt-1 text-sm text-gray-500">
|
||||||
If you would like to pay by cash or check, please instead
|
Credit card fees included. If you would like to avoid these fees or
|
||||||
<a className="underline mx-1" href="/WSCC-Membership-Form.pdf">fill out a paper form</a>
|
to pay by cash or check, please instead <a className="underline
|
||||||
and mail to the address on the form.
|
mx-1" href="/WSCC-Membership-Form.pdf">fill out a paper form</a> and
|
||||||
|
mail to the address on the form.
|
||||||
</div>
|
</div>
|
||||||
<PaymentElement id="payment-element" />
|
<PaymentElement id="payment-element" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* TODO: Automatically renew toggle? */}
|
{/* TODO: Automatically renew toggle? */}
|
||||||
|
|
||||||
<div className="relative flex gap-x-3">
|
|
||||||
<div className="flex h-6 items-center">
|
|
||||||
<input
|
|
||||||
id="offsetFees"
|
|
||||||
name="offsetFees"
|
|
||||||
type="checkbox"
|
|
||||||
checked={offsetFees}
|
|
||||||
onChange={(e) => setOffsetFees(e.target.checked)}
|
|
||||||
className="h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="text-sm leading-6">
|
|
||||||
<label htmlFor="offsetFees" className="font-medium text-gray-900">
|
|
||||||
Help offset credit card fees
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button
|
<button
|
||||||
className="mt-6 w-full rounded-md flex justify-center border border-transparent bg-indigo-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"
|
className="mt-6 w-full rounded-md flex justify-center border border-transparent bg-indigo-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"
|
||||||
disabled={isLoading || !stripe || !elements}
|
disabled={isLoading || !stripe || !elements}
|
||||||
|
Loading…
Reference in New Issue
Block a user