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 [customAmount, setCustomAmount] = useState('');
|
||||
const [email, setEmail] = useState('');
|
||||
const [offsetFees, setOffsetFees] = useState(true);
|
||||
const [totalAmount, setTotalAmount] = useState(300);
|
||||
const [message, setMessage] = useState<string>('');
|
||||
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);
|
||||
|
||||
@ -128,7 +125,7 @@ function CheckoutForm({
|
||||
},
|
||||
}),
|
||||
});
|
||||
}, [paymentIntentID, selectedMembershipLevel, selectedAdditionalDonation, customAmount, offsetFees, email])
|
||||
}, [paymentIntentID, selectedMembershipLevel, selectedAdditionalDonation, customAmount, email])
|
||||
|
||||
const handleSubmit = async (e: FormEvent) => {
|
||||
e.preventDefault();
|
||||
@ -303,33 +300,16 @@ function CheckoutForm({
|
||||
Payment
|
||||
</h2>
|
||||
<div className="mt-1 text-sm text-gray-500">
|
||||
If you would like to pay by cash or check, please instead
|
||||
<a className="underline mx-1" href="/WSCC-Membership-Form.pdf">fill out a paper form</a>
|
||||
and mail to the address on the form.
|
||||
Credit card fees included. If you would like to avoid these fees or
|
||||
to pay by cash or check, please instead <a className="underline
|
||||
mx-1" href="/WSCC-Membership-Form.pdf">fill out a paper form</a> and
|
||||
mail to the address on the form.
|
||||
</div>
|
||||
<PaymentElement id="payment-element" />
|
||||
</div>
|
||||
|
||||
{/* 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
|
||||
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}
|
||||
|
Loading…
Reference in New Issue
Block a user