AutoClick Pay with Credit Card in Infusionsoft Order Forms Code

by Automator Z

Recently Infusionsoft came out with a big update and they changed the Infusionsoft order form code. Overall the biggest change that affected our clients was the Order Form Payment Selection Step.

If you haven’t created a new order form recently you may not be aware of the change.  

Previously when you had both PayPal and a CC merchant as a payment options you would select between the two in the payment information section of the order form, but now your customers will be greeted with a choice before they begin entering billing information, presumably to save the customers the trouble if they are going to be using PayPal.   See below:

Pre-Update – You select the Payment Options in the Payment Information section:

payment-Info-Pre-Patch

 

 

Post-Update – You select the Payment Options with buttons before entering billing info.

Pay_with_Credit_Card

 

For our clients this added a click step that we wanted to avoid.

Insightful Automation has come through and figured out a simple script to avoid this for clients that do not like the new process.

The funny thing is Infusionsoft did all the work for us. Check it out…

Looking at the code there is javascript in the button’s onclick attribute.

onclick_attribute

onclick_attribute

Well, that was the clue. There is a bit more to do than that. Gotta put that into a script.

<script>
jQuery(window).load(function(){Infusion.Ecomm.OrderForms.selectPaymentType('creditcard');
Infusion.Ecomm.OrderForms.ajaxSubmitForm('orderForm', false, 0, '', 'Name-of-Order-Form', 'RENDER_ORDER_FORM', ['ORDER_FORM_BILLING_ENTRY', 'PAYMENT_SELECTION', 'ORDER_FORM_SHIPPING_ENTRY', 'SHIPPING_OPTIONS', 'CHECKOUT_LINKS']);});
</script>

Add the above code to the Custom Header Section of your Order form. The the last thing you need to do is replace Name-of-Order-Form in your code snippet with the name of your order form from the url. For example:

https://xx123.infusionsoft.com/app/orderForms/Name-of-Order-Form

and you are ready to rock!

code-in-custom-area

Did we screw something up? Fill out the form below and tell us about it! Thanks,  The Insightful Automation Team.


Comments are closed.