Step 1
If you wish to hide the Service Fee/Upcharge field when customer did not select the payment type where a service fee/upcharge will be taken, go to the selected component (renamed Service Fee/Upcharge field).
Step 2
Select Conditional tab.
Step 3
Select Advanced Conditions.
Step 4
*Replace texts in RED. SF/UC = Service Fee/Upcharge.
Enter the following script in the JavaScript field:
show = data.{PaymentSystemComponentAPIname} && data.{PaymentSystemComponentAPIname}.paymentType === '{Payment method to charge SF/UC}';
❖ For payment method, input: credit_card OR ach depending on your selected payment method where you want the Service Fee/Upcharge field to show.
➔ For example, heartlandpayment is the API name of the Payment System component and the selected payment type to charge service fee/upcharge is credit card.
Hence, calculated value script would be:
show = data.heartlandpayment && data.heartlandpayment.paymentType === 'credit_card';
(Change credit_card to ach if you prefer to show the service fee/upcharge field when ACH payments is selected.)
Step 5
Select Save.
Step 6
Finish up building your Payment Form, update the status and embed your form to an HTML page.