# Custom Code to Remove Credit Card Requirement on Order Form?

**URL:** <https://integration.keap.com/t/custom-code-to-remove-credit-card-requirement-on-order-form/62055>\
**Category:** Max Classic\
**Tags:** shopping-cart, custom-code\
**Created:** [January 22, 2019, 7:02pm UTC](https://integration.keap.com/t/custom-code-to-remove-credit-card-requirement-on-order-form/62055 "2019-01-22T19:02:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danny\_Dorr](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@Danny\_Dorr](https://integration.keap.com/u/Danny_Dorr)\
**Post date:** [January 22, 2019, 7:02pm UTC](https://integration.keap.com/t/custom-code-to-remove-credit-card-requirement-on-order-form/62055/1 "2019-01-22T19:02:46Z")

</div>

Requesting your help. I am using an order form and a custom promo code to gift a digital product to select customers. The net price after the discount will be $0. Infusionsoft confirmed that it would require custom code to remove the Credit Card Requirement, even with a zero dollar transaction. Would anyone be willing to provide the custom code that would make this possible?

There may be other work arounds, but I want them to have the experience of the order form so they see the value of the product at the normal price before the code, but requiring them to use a credit card is a deal breaker for me. Thank you in advance!

---

<div class="post-metadata">

**Author:** ![Jordan\_Novak](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@Jordan\_Novak](https://integration.keap.com/u/Jordan_Novak)\
**Post date:** [January 23, 2019, 8:49pm UTC](https://integration.keap.com/t/custom-code-to-remove-credit-card-requirement-on-order-form/62055/2 "2019-01-23T20:49:45Z")

</div>

Hey Danny,

Any custom order form code needs to be tested on the target order form before being certified as ready to go. I do have some code that I made for a client who needed a very similar thing, and I’ve pasted that code below for you to try it out. It may not be exactly what you need - this tidbit is designed to make an order form into a zero-dollar order form that never asks for payment. It may go beyond what you want, but it’s an easy starting place for someone to tweak to your needs.

[https://s3.amazonaws.com/novaksolutions/hosted/javascript/NS\_ZeroDollarOrderForm.js](https://s3.amazonaws.com/novaksolutions/hosted/javascript/NS_ZeroDollarOrderForm.js)

---

<div class="post-metadata">

**Author:** ![Danny\_Dorr](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@Danny\_Dorr](https://integration.keap.com/u/Danny_Dorr)\
**Post date:** [January 23, 2019, 9:03pm UTC](https://integration.keap.com/t/custom-code-to-remove-credit-card-requirement-on-order-form/62055/3 "2019-01-23T21:03:26Z")

</div>

> [@Danny\_Dorr](#):
>
> Requesting your help. I am using an order form and a custom promo code to gift a digital product to select customers. The net price after the discount will be $0. Infusionsoft confirmed that it would require custom code to remove the Credit Card Requirement, even with a zero dollar transaction. Would anyone be willing to provide the custom code that would make this possible?
> 
> There may be other work arounds, but I want them to have the experience of the order form so they see the value of the product at the normal price before the code, but requiring them to use a credit card is a deal breaker for me. Thank you in advance!

Jordan, I greatly appreciate the response and the great solution! Best to you. Danny

---

<div class="post-metadata">

**Author:** ![Jordan\_Novak](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@Jordan\_Novak](https://integration.keap.com/u/Jordan_Novak)\
**Post date:** [April 2, 2019, 1:55am UTC](https://integration.keap.com/t/custom-code-to-remove-credit-card-requirement-on-order-form/62055/4 "2019-04-02T01:55:54Z")

</div>

Important Follow-up:

The Order Form does not allow the use of the “Pay By Check” option that makes a true zero-dollar order form possible. There is a solution possible using the Shopping Cart, where a piece of javascript hides the credit card options and allows a direct check-out process without any payment info if a promo code brings the price down to zero. Using this option does require having the “Pay by Check” option enabled, so if you use the shopping cart for other uses, your customers will see the option to pay by check.

---

<div class="post-metadata">

**Author:** ![Damion\_Lupo](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/damion_lupo/32/6756_2.png) [@Damion\_Lupo](https://integration.keap.com/u/Damion_Lupo)\
**Post date:** [October 30, 2019, 12:28pm UTC](https://integration.keap.com/t/custom-code-to-remove-credit-card-requirement-on-order-form/62055/5 "2019-10-30T12:28:06Z")

</div>

Hi, i tried copying and pasting this java into the HTML header on my order form and the order form comes back looking like this:

 ![49](https://us1.discourse-cdn.com/flex019/uploads/infusionsoft1/original/2X/4/4ad53a6bd2e3f3fafed20f85b25482cf8bd43079.png)  
[![](https://us1.discourse-cdn.com/flex019/uploads/infusionsoft1/original/2X/4/4ad53a6bd2e3f3fafed20f85b25482cf8bd43079.png) ](https://dl.dropboxusercontent.com/s/spedh93xpbqsh4y/Screenshot%202019-10-30%2005.26.49.png?dl=0)  
Is there something I need to change about this bit of code? Not versed in java or the syntax how to drop it so KEAP will accept it and hid the credit card info. Thanks!

---

<div class="post-metadata">

**Author:** ![martinc](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/martinc/32/14_2.png) [@martinc](https://integration.keap.com/u/martinc)\
**Post date:** [October 30, 2019, 9:29pm UTC](https://integration.keap.com/t/custom-code-to-remove-credit-card-requirement-on-order-form/62055/6 "2019-10-30T21:29:20Z")

</div>

You just need to enclose the script in a script tag

```
<script>jQuery(function($){
    //The tables that show product info and the order summary are re-loaded via ajax anytime the billing information is updated.
    // So - we hide their parent elements and the order form needs to have any explanations in the custom HTML header instead of in the product name
    $('#ORDER_FORM_PRODUCT_LIST').hide();
    $('#ORDER_FORM_SUMMARY').hide();

    //We hide these two containers as well because if we don't then we get a flashing "loading" message when billing info is changed
    $('#SHIPPING_OPTIONS').hide();
    $("#PAYMENT_PLANS").hide();

    //Change text on the Place Order button
    $('a.continueButton').text('Save Credit Card');
});</script>

```

---

<div class="post-metadata">

**Author:** ![Damion\_Lupo](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/damion_lupo/32/6756_2.png) [@Damion\_Lupo](https://integration.keap.com/u/Damion_Lupo)\
**Post date:** [October 30, 2019, 11:34pm UTC](https://integration.keap.com/t/custom-code-to-remove-credit-card-requirement-on-order-form/62055/7 "2019-10-30T23:34:28Z")

</div>

> [@martinc](#):
>

Thanks! I tried this and now as soon as I hit the Save Credit Card it pops up a window saying " you must select a shipping option" while simultaneously removing shipping options.

The shipping on these items is free, they are products, not digital and have no weight in the settings. Any ideas?

---

<div class="post-metadata">

**Author:** ![John\_Borelli](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/john_borelli/32/11880_2.png) [@John\_Borelli](https://integration.keap.com/u/John_Borelli)\
**Post date:** [October 31, 2019, 2:37am UTC](https://integration.keap.com/t/custom-code-to-remove-credit-card-requirement-on-order-form/62055/8 "2019-10-31T02:37:06Z")

</div>

Try going into the products in question and changing the weight and shipping details…I don’t remember exactly what it is but there is something that can’t be set or have a value in order for that to not happen.
