Shopping Cart plugins & guides

Are you one of the users of a ready to use Shopping Cart solutions? We want to make it easy for you!

Most of our modules are in our GitHub repository and they are open source.

Check out this modules and step by step instructions to integrate GetFinancing. Also remember you can always use our Simple Integration , which can be added virtually to any Shopping Cart software or HTML page.

3dcart Integration Guide

_images/banner-getfinancing-3dcart.png

In this guide we will be integrating GetFinancing as an alternate payment method for 3dcart. This means that besides your current payment methods you will have GetFinancing as a payment method in the checkout page.

The way this process works is by adding a Javascript to the checkout page, that redirects to our form when the payment method name is detected. Make sure to test it, since heavily modified templates or newer versions of 3dcarts could break this process.

For doubts do not hesitate to contact support@getfinancing.com

Step by Step

    1. Login to your 3dCart Back-End/Admin Area.
    1. Navigate to Content – Header & Footer – Global Footer
    1. Click the code revealer button
_images/01.png
    1. Insert the following code into the Global Footer, and save it:

Following you will find the Javascript to paste, replacing ##YOUR_MERCHANT_ID## for your merchant ID:

<script src="https://cdn.getfinancing.com/libs/1.0/getfinancing.js"></script>
<script type="text/javascript">


;(function() {

        /**
         * Config
         */

        var cfg = {
            scriptDebug: true
        };

        var GFcfg = {
            cookieName: "GetFinancingCSH",
            merchantID: "##YOUR_MERCHANT_ID###",
            environment: "production"
        };

        /**
         * Helpers
         */

        var deleteCookie = function(name) {
            document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;';
        };

        var initGetfinancing = function(parametersFn) {

            if (typeof(parametersFn) === "function") {
                debug("Init GF with Parameters");
                GetFinancingSimple.init({
                    platform: GFcfg.environment,
                    merchantID: GFcfg.merchantID,
                    getParameters: parametersFn
                });
            } else {
                debug("Init GF with NO Parameters");
                GetFinancingSimple.init({
                    platform: GFcfg.environment,
                    merchantID: GFcfg.merchantID
                });
            }
        };

        var debug = function(txt) {
            if (cfg.scriptDebug) {
                console.log(txt);
            }
        }

        /*
        * Router
        */

        // Simple URL router request
        var routeRequest = function() {

            // Get current URL
            var currURL = window.location.pathname;

            debug("Detected ROUTE: " + currURL);

            // Unused
            // if (currURL === "/checkout_one.asp") {
            //     controllerShoppingCart();
            // }

            if (currURL === "/checkout_one.asp") {
                controllerCheckout();
            }

            if (currURL === "/checkout_thankyou.asp") {
                controllerRedirectToSLF();
            }
        };


        /*
         * Controllers
         */

        var controllerCheckout = function() {

            var scrapeCartItems = function() {

                // Helper to trim Strings
                if (!String.prototype.trim) {
                    (function() {
                        // Make sure we trim BOM and NBSP
                        var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
                        String.prototype.trim = function() {
                            return this.replace(rtrim, '');
                        };
                    })();
                }

                var $cartItems = $('#divCart').children(".row");
                var cartItemsJson = [];
                if ($cartItems.length<=0) {
                    return JSON.stringify({});  // Return JSON empty object
                }

                // Iterate through the cart items and generate the json object.
                $.each($cartItems, function(k,v) {
                    var $item = $(v);
                    var jsonItem = {
                        display_name: $item.find(".item-options").text().toString().replace(/[\t\n,]/g, '').trim(),
                        quantity: $item.find(".checkout-quantity").text().toString().replace(/[\t\n,]/g, '').trim(),
                        unit_price: $item.find(".checkout-price").text().toString().replace(/[\t\n$,]/g, '').trim(), // Also remove Dollar Sign
                        unit_tax: 0  // There is no taxes per product in MatressRevolution
                    };
                    // Push the item to CartItemsJson
                    cartItemsJson.push(jsonItem);
                });

                return JSON.stringify(cartItemsJson);
            }



            var getGFDataFromCheckout = function() {
                var GFData = {};
                GFData.amount = $('.total_balance').text().toString().replace(/[\t\n$,]/g, '');
                GFData.first_name = $('INPUT[name="billing_firstname"]').val();
                GFData.last_name = $('INPUT[name="billing_lastname"]').val();
                GFData.email = $('INPUT[name="billing_email"]').val();
                GFData.billing_address = $('INPUT[name="billing_address"]').val() + " " + $('INPUT[name="billing_address2"]').val();
                GFData.billing_city = $('INPUT[name="billing_city"]').val();
                GFData.billing_state = $('SELECT[name="billing_state"]').val();
                GFData.billing_zipcode = $('INPUT[name="billing_zip"]').val();
                GFData.success_url = "";
                GFData.product_info = "";
                GFData.shipping = $('.total_shipping').text().toString().replace(/[\t\n$,]/g, '');
                GFData.taxes = $('.total_taxes').text().toString().replace(/[\t\n$,]/g, '');
                GFData.cart_items = scrapeCartItems();
                return GFData;
            };

            initGetfinancing(getGFDataFromCheckout);

            debug("Calling - counterPayment()");
            GetFinancingSimple.counterPayment();

            deleteCookie(GFcfg.cookieName);
            debug(GFcfg.cookieName + " - Cookie Removed!");

            // If getfinancing payment method selected.
            $("#btn_getfinancing").bind("click", function() {

                $(".gf-radio input").prop("checked", true);

                // Method from 3dCart to hide Check-out button
                checkoutSwitch(true);

                // Save all scraped data to a cookie.
                GetFinancingSimple.writeCookie(GFcfg.cookieName, JSON.stringify(getGFDataFromCheckout()), 2);
                debug(GFcfg.cookieName + " - Cookie Created!");

                // Method from 3dCart to process the order.
                doCheckout(document.billing);
            });

        };


        var controllerRedirectToSLF = function() {

            // Detect if the cookie exists and if not exists cancel function execution
            if (document.cookie.indexOf(GFcfg.cookieName) === -1) {
                return;
            }

            var getGFDataFromCookie = function() {
                var GFData = {};
                GFData = JSON.parse(GetFinancingSimple.readCookie(GFcfg.cookieName));
                GFData.success_url = window.location.href;
                return GFData;
            };

            initGetfinancing(getGFDataFromCookie);

            debug("Calling - counterCheckout()");
            GetFinancingSimple.counterCheckout();

            var getGF_SLF_Link = function(gfObj) {
                if (jQuery("#getfinancing-button-parent").length==0) {
                    jQuery("body").append('<div id="getfinancing-button-parent" style="display:none !important;"></div>');
                }
                gfObj.addCheckoutLink({
                    src: 'media/1.0/buttons/png/btn_getfinancing_checkout2.png',
                    selector: '#getfinancing-button-parent'
                });

                // Take the button link
                var link = $("#getfinancing-button-parent a").attr("href");
                $("#getfinancing-button-parent").remove();
                debug("Getted link to Gateway: " + link);
                return link;
            };

            var linkSLF = getGF_SLF_Link(GetFinancingSimple);

            // Add redirection texts.
            var redirectHTML = '<h3 style="padding:50px 100px 30px 100px; text-align:center;">' +
                'Redirecting to GetFinancing Payment Gateway' +
                '</h3>' + '<div style="text-align:center">' +
                '<img style="margin-bottom:20px;" src="https://www.getfinancing.com/static/img/logo-getfinancing.png" height="50" width="236" />' +
                '<img style="margin:20px auto; display:block;" src="https://partner.getfinancing.com/partner/static/lcinfo/images/wait28trans.gif" height="32" width="32" />' +
                '<br><br>If redirection doesn\'t work visit <a href="' + linkSLF + '" target="_self">this link</a>.</div>';


            // Redirect to GF-SLF

            setTimeout(function() {
               window.location = linkSLF;
            }, 1000);

            // Hide thankyou block and show redirection.
            jQuery("#checkoutThankYou").hide().after(redirectHTML);

            // We already have the data, so drop cookie
            deleteCookie(GFcfg.cookieName);


        };

        /*
         * Main / Bootstrap
         */

        jQuery(document).ready(function() {
            routeRequest();
        });

    })();

  </script>
    1. Now navigate to Settings - Payment – Method of Payment – Click on ‘Select Payment’
_images/02.png
    1. Click “Add New” in payment option window.
_images/03.png
    1. Title this “GetFinancing - Purchase Finance Gateway” and make sure that the following information is reflected in the settings of it.
_images/04.png
    1. After this is complete, go into your Checkout page (normally labeled: “checkout_one.asp”) by navigating into the Settings – Design – Themes & Styles and clicking on the “Edit HTML” button.
_images/05.png
    1. Then click on the drop down menu labeled “Go to folder” and click on “templates/common-html5”
_images/06.png
    1. Click on the file named “checkout-singlepage.html”
_images/07.png
    1. Copy this code to the payment button section of the HTML wherever you want the button to take residency, and save it:
<!--START: CUSTOM-->

  <div class="getfinancing">
    <h4>[payment_description]</h4>
    <div class="gf-radio" style="display:inline-block; vertical-align:middle;">
      <input name="payment" id="offline-[id]" onclick="$('#btn_getfinancing').trigger('click');" type="radio" value="offline-[id]" />
    </div>
    <div class="gf-logo" style="display:inline-block; vertical-align:middle; cursor:pointer;">
      <img id="btn_getfinancing" src="https://partner.getfinancing.com/media/1.0/buttons/png/btn_getfinancing_checkout2.png" alt="GetFinancing" />
    </div>
    <div class="clear"></div>
  </div>

  <!--END: CUSTOM-->
_images/08.png
    1. And the checkout page should something similar to this
_images/09.png

BigCommerce Integration Guide

_images/banner-getfinancing-bigcommerce.png

In this guide we will be integrating GetFinancing as an alternate payment method for BigCommerce. This means that besides your current payment methods you will have GetFinancing as a payment method in the checkout page.

The way this process works is by adding a Javascript to the checkout page, that redirects to our form when the payment method name is detected. Make sure to test it, since heavily modified templates or newer versions of BigCommerce could break this process.

For doubts do not hesitate to contact integrations@getfinancing.com.

Step by Step

  • Login onto your BigCommerce Merchant Admin Account.
  • Navigate to: Settings / Store Settings / Payments
_images/settings.png
  • Select Offline Payment Methods and Setup Bank deposit
_images/offline-methods.png
  • Change the name from Bank Deposit to GetFinancing (If you are already using Bank Deposit, use a different offline method).

Also make sure that is only enabled for USA and to replace the text of the thank you page.

Name: “GetFinancing”
_images/bank-deposit.png
  • Navigate to: Settings / Design

    Click ‘Edit HTML / CSS’

    A file explorer will open. Select one file that is loaded in all the pages. For instance in our case we chose HTMLHead.html

    Paste this javascript we provide and modify “your_merchant_id” and “environment” vars.

    Environment variable should be “production” or “staging” depending whether you are integrating in a production environment or not.

_images/add_script.png

Following you will find the Javascript to paste:

<script>
      /**
       * ##############################################
       * ## Modify this configuration with your data ##
       * ##############################################
       */
       var your_merchant_id = 3124;
       var environment = "staging"; //"production";
      /**
       * ######################################################
       * ## Modify this CSS selectors to match your template ##
       * ######################################################
       */
       var emailSelector                 = "#FormField_1";
       var firstNameSelector             = "#FormField_4";
       var lastNameSelector              = "#FormField_5";
       var billingAddressSelector        = "#FormField_8";
       var billingAddress2Selector       = "#FormField_9";
       var billingCitySelector           = "#FormField_10";
       var billingStateSelector          = "#FormField_12";
       var billingZipCodeSelector        = "#FormField_13";
       var subTotalSelector              = '.SubTotal em';
       var cartContentsSelector          = ".CartContents tbody tr";
       var cartContentsTitleSelector     = "strong";
       var cartContentsQuantitySelector  = "td:nth-child(2)";
       var cartContentsAmountSelector    = "td:nth-child(3)";
       var shippingAmountSelector        = '.SubTotal:nth-child(2) .ProductPrice';
       var addressLineSelector           = ".AddressLine";
   </script>
   <script>
   /**
   * ##############################################
   * ## Copy / Paste this code as it is          ##
   * ##############################################
   */
   </script>
   <script src="https://cdn.getfinancing.com/libs/1.0/getfinancing.js"></script>
   <script src="https://partner.getfinancing.com/libs/1.0/js-cookie.js"></script>
   <script>
   (function(w) {

     /**
     * Config
     */

     var GFcfg = {
       merchantID: your_merchant_id,
       environment: environment,
       cookieName: "GetFinancingCSH",
     };

     /**
     * Helpers
     */

     var deleteCookie = function(name) {
       document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;';
     };

     var initGetfinancing = function(parametersFn) {
       GetFinancingSimple.init({
         platform: GFcfg.environment,
         merchantID: GFcfg.merchantID,
         getParameters: parametersFn
       });
     };

     /**
     This function gets the value of a parameter from the current QueryString(URI)
     */
     var getURLParameter = function(name) {
       return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null
     };


     var setGetParameterToURL = function(url, paramName, paramValue) {
       if (url.indexOf(paramName + "=") >= 0) {
         var prefix = url.substring(0, url.indexOf(paramName));
         var suffix = url.substring(url.indexOf(paramName));
         suffix = suffix.substring(suffix.indexOf("=") + 1);
         suffix = (suffix.indexOf("&") >= 0) ? suffix.substring(suffix.indexOf("&")) : "";
         url = prefix + paramName + "=" + paramValue + suffix;
       }
       else {
         if (url.indexOf("?") < 0) {
           url += "?" + paramName + "=" + paramValue;
         } else {
           url += "&" + paramName + "=" + paramValue;
         }
       }

       return url;

     };

     var getGFDataFromCheckout = function() {


       user_data = $("addressLineSelector").text().split(",")
       var GFData = {};
       GFData.amount = Cookies.get("amount"); //$(".ProductPrice").text().split(" ")[0].replace(/[^0-9\.]+/g,"");//$('.SubTotal em').last().text().replace(/[^0-9\.]+/g,"");
       GFData.first_name = Cookies.get("first_name");
       GFData.last_name = Cookies.get("last_name");
       GFData.email = Cookies.get("email");
       GFData.billing_address = Cookies.get("billing_address");
       GFData.billing_city = Cookies.get("billing_city");
       GFData.billing_state = Cookies.get("billing_state");
       GFData.billing_zipcode = Cookies.get("billing_zipcode");
       GFData.success_url = window.location.protocol + "//" + window.location.host + "/finishorder.php?provider=checkout_bankdeposit&paid=1";
       GFData.failure_url = window.location.protocol + "//" + window.location.host + "/cart.php";
       //GFData.product_info = Cookies.get("product_info");
       GFData.cart_items = Cookies.get("cart_items");
       GFData.shipping_amount = Cookies.get("shipping_amount");
       return GFData;

     };

     var getGF_SLF_Link = function(gfObj) {
       if ($("#getfinancing-button-parent").length==0) {
         $("body").eq(0).append('<div id="getfinancing-button-parent" style="display:none !important;"></div>');
       }

       gfObj.addCheckoutLink({
         src: 'media/1.0/buttons/png/btn_pay.png',
         selector: '#getfinancing-button-parent'
       });

       // Take the button link
       return $("#getfinancing-button-parent a").attr("href");
     };

     /*
     * Controllers
     */

     var controller = {

       // --------------------
       // Thankyou Controller
       // --------------------
       thankyou: function() {
         // Change contents
         $(".BlockContent > p")[2].innerHTML="";
         $(".NotifyMessage").last().last().html("<div style='text-align:center;'><h2>Redirecting to GetFinancing Payment Gateway...</h2>" +
         "<br><br><img style='margin-bottom:20px;' " +
         "src='https://www.getfinancing.com/static/img/logo-getfinancing.png'" +
         " height='50' width='236' /><br><img style='margin-top:20px;'" +
         " src='https://partner.getfinancing.com/partner/static/lcinfo/images/wait28trans.gif'" +
         " height='32' width='32' /></div>");


         initGetfinancing(getGFDataFromCheckout);
         GetFinancingSimple.counterPayment();

         // Generate Link on the fly
         var linkSLF = getGF_SLF_Link(GetFinancingSimple);

         $(".ProviderNamecheckout_bankdeposit").append('<br><br>If redirection doesn\'t work visit <a href="' + linkSLF + '" target="_self">this link</a>.');

         // Redirect to GF-SLF

         setTimeout(function() {
           window.location = linkSLF;
         }, 1000);

       }

     };

     /*
     * Main / Bootstrap
     */

     //store parameters in checkout page

     jQuery(document).ajaxComplete(function() {
       if ( window.location.href.indexOf(window.location.protocol + "//" + window.location.host + "/checkout.php") >= 0){


         if ($(addressLineSelector).length <= 0){
           $(emailSelector).change(function() {
             if (typeof($(emailSelector).val()) != 'undefined'){
               Cookies.set("email", $(emailSelector).val());
             }else{
               Cookies.set("email", "");
             }
           });
           if (typeof($(emailSelector).val()) != 'undefined'){
            Cookies.set("email", $(emailSelector).val());
           }

           $(firstNameSelector).change(function() {
             Cookies.set("first_name", $(firstNameSelector).val());
           });
           if (typeof($(firstNameSelector).val()) != 'undefined'){
            Cookies.set("first_name", $(firstNameSelector).val());
           }

           $(lastNameSelector).change(function() {
             Cookies.set("last_name", $(lastNameSelector).val() );
           });
           if (typeof($(lastNameSelector).val()) != 'undefined'){
            Cookies.set("last_name", $(lastNameSelector).val() );
           }

           $(billingAddressSelector).change(function() {
             Cookies.set("billing_address", $(billingAddressSelector).val() + " " +$(billingAddress2Selector).val());
           });
           if (typeof($(billingAddressSelector).val()) != 'undefined'){
            Cookies.set("billing_address", $(billingAddressSelector).val() + " " +$(billingAddress2Selector).val());
           }

           $(billingAddress2Selector).change(function() {
             Cookies.set("billing_address", $(billingAddressSelector).val() + " " +$(billingAddress2Selector).val());
           });
           if (typeof($(billingAddress2Selector).val()) != 'undefined'){
            Cookies.set("billing_address", $(billingAddressSelector).val() + " " +$(billingAddress2Selector).val());
           }

           $(billingCitySelector).change(function() {
             Cookies.set("billing_city", $( "#FormField_10" ).val());
           });
           if (typeof($(billingCitySelector).val()) != 'undefined'){
             Cookies.set("billing_city", $(billingCitySelector).val());
           }

           $(billingStateSelector).change(function() {
             Cookies.set("billing_state", $(billingStateSelector).val());
           });
           if (typeof($(billingStateSelector).val()) != 'undefined'){
            Cookies.set("billing_state", $(billingStateSelector).val());
           }

           $(billingZipCodeSelector).change(function() {
             Cookies.set("billing_zipcode", $(billingZipCodeSelector).val());
           });
           if (typeof($(billingZipCodeSelector).val()) != 'undefined'){
            Cookies.set("billing_zipcode", $(billingZipCodeSelector).val());
           }

         }

         Cookies.set("amount", $(subTotalSelector).last().text().replace(/[^0-9\.]+/g,"") );

         var getProductInfo = function() {
           var retProd = "";
           $(cartContentsSelector).each(function(k,v){
             tds =$(v).find("td");
             if (tds.length == 0){}
             else
             {
               title = $(tds).find("strong").html();
               quantity = $(tds).next().html();
               amount =$(tds).next().next().html();
               if ( $.isNumeric(quantity ))
               {
                 //retProd+= quantity + "_x_" + title  + "_-_" + "$" + amount.replace(/[^0-9\.]+/g,"");
                 retProd+= title  + "( " + quantity + " ) :" + "$" + amount.replace(/[^0-9\.]+/g,"") + "\n";
               }

             }
           });
           return retProd;
         };

         var getCartItems = function() {
           var cartItems = [];
               $(cartContentsSelector).each(function(k,v){
                         title = $(v).find(cartContentsTitleSelector).text();
                         quantity = $(v).find(cartContentsQuantitySelector).html().replace(/[^\d.-]/g, '');
                         amount = $(v).find(cartContentsAmountSelector).text().replace(/[^\d.-]/g, '');
                         cartItems.push({'sku':title, 'display_name':title,'unit_price':amount,'quantity':quantity,'unit_tax': 0});
               });
           return cartItems;
         };

         var getShippingAmount = function() {
             return $(shippingAmountSelector).html().replace(/[^\d.-]/g, '');
         };

         //Cookies.set("product_info",getProductInfo());
         var cartItems = getCartItems();
         Cookies.set("cart_items",cartItems);
         Cookies.set("shipping_amount", getShippingAmount());


         //trick for logged people
         if ($(addressLineSelector).length > 0){
           user_data = $(addressLineSelector).text().split(",");
           Cookies.set("first_name", user_data[0].split(" ")[0]);
           Cookies.set("last_name", user_data[0].split(" ")[1]);
           Cookies.set("email","");
           Cookies.set("billing_address", user_data[1]);
           Cookies.set("billing_city", user_data[2]);
           Cookies.set("billing_state", user_data[3]);
           Cookies.set("billing_zipcode", user_data[4].trim());
         }
       }

     });

     //to enable gf on confirmation page
     jQuery(document).ready(function() {
       if ( window.location.href.indexOf(window.location.protocol + "//" + window.location.host + "/finishorder.php") >= 0){

         var paid = getURLParameter('paid');
         if (paid == 1){
           //we paid, standard page
           $(".BlockContent > p")[2].innerHTML="";
           $(".NotifyMessage").children(".Bold").html("");
         }
         else{
           //need to open gf
           controller.thankyou();
         }
       }
     });

   })(window);

   function xinspect(obj){
     for ( var prop in obj ) {
       console.log( prop + ' is ' + obj[prop] );
     }
   }
</script>
  • Finally save the changes and make sure to test it with a sample purchase.

You will see GetFinancing as a payment method in the checkout screen.

_images/gf_pay.png

If everything goes correctly, you will be redirected to our checkout process to complete the purchase. After that the user should be returned to that page with a congratulations message.

_images/gf_redirect.png

BigCommerce Integration Guide (New)

_images/banner-getfinancing-bigcommerce-new.png

In this guide we will be integrating GetFinancing as an alternate payment method for BigCommerce with the newer BigCommerce versions (post 2017). This means that besides your current payment methods you will have GetFinancing as a payment method in the checkout page.

The way this process works is by adding a Javascript to the checkout page, that redirects to our form when the payment method name is detected. Make sure to test it, since heavily modified templates or newer versions of BigCommerce could break this process.

This guide is different than the previous because it applies to new BigCommerce installations (post 2017).

For doubts do not hesitate to contact integrations@getfinancing.com.

Step by Step

  • Login onto your BigCommerce Merchant Admin Account.
  • Navigate to: ** Store Settings / Payments**
_images/store-setup.png _images/payment.png
  • Select Offline Payment Methods and Setup Bank deposit
_images/offline-methods.png
  • Change the name from Bank Deposit to GetFinancing (If you are already using Bank Deposit, use a different offline method).

Also make sure that is only enabled for USA and to replace the text of the thank you page.

Name: “GetFinancing”

Replace “Thank you message” with “Thank You For Your Purchase with GetFinancing”, make sure you include the word GetFinancing in the text, this word is used in the code to redirect to the proper page.

_images/bank-deposit.png
  • Follow these steps
_images/new-1-gotoAdvancedSettings.png _images/new-2-gotoWebAnalytics.png _images/new-3-pasteScript.png

Following you will find the Javascript to paste:

<script>
      /**
       * ##############################################
       * ## Modify this configuration with your data ##
       * ##############################################
       */
       var your_merchant_id = 3929;
       var environment = "production";
      /**
       * ######################################################
       * ## Modify this CSS selectors to match your template ##
       * ######################################################
       */
       var emailSelector                 = "#email";
       var firstNameSelector             = "#firstNameInput";
       var lastNameSelector              = "#lastNameInput";
       var billingAddressSelector        = "#addressLine1Input";
       var billingAddress2Selector       = "#addressLine2Input";
       var billingCitySelector           = "#cityInput";
       var billingStateSelector          = "#provinceCodeInput";
       /* fix billing state, billing city and quantity*/
       var billingZipCodeSelector        = "#postCodeInput";
       var subTotalSelector              = '.cart-priceItem--subtotal .cart-priceItem-value span';
       var cartContentsSelector          = "cart-items .cart-section .productList li";
       var cartContentsTitleSelector     = ".product-title";
       var cartContentsQuantitySelector  = ".product-title";
       var cartContentsAmountSelector    = ".product-price";
       var shippingAmountSelector        = 'cart-prices .cart-priceItem-value:nth(2) span';
       var addressLineSelector           = "checkout-header .optimizedCheckout-contentPrimary:nth(2)";
       var addressLineEmailSelector              = "checkout-header .optimizedCheckout-contentPrimary:nth(1)";
       var vCardSelector                                 = ".vcard:nth(1)";
   </script>
   <script>
   /**
   * ##############################################
   * ## Copy / Paste this code as it is          ##
   * ##############################################
   */
   </script>
   <script src="https://cdn.getfinancing.com/libs/1.0/getfinancing.js"></script>
   <script src="https://partner.getfinancing.com/libs/1.0/js-cookie.js"></script>
   <script>
   (function(w) {

     /**
     * Config
     */

     var GFcfg = {
       merchantID: your_merchant_id,
       environment: environment,
       cookieName: "GetFinancingCSH",
     };

     /**
     * Helpers
     */

     var deleteCookie = function(name) {
       document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;';
     };

     var initGetfinancing = function(parametersFn) {
       GetFinancingSimple.init({
         platform: GFcfg.environment,
         merchantID: GFcfg.merchantID,
         getParameters: parametersFn
       });
     };

     /**
     This function gets the value of a parameter from the current QueryString(URI)
     */
     var getURLParameter = function(name) {
       return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null
     };


     var setGetParameterToURL = function(url, paramName, paramValue) {
       if (url.indexOf(paramName + "=") >= 0) {
         var prefix = url.substring(0, url.indexOf(paramName));
         var suffix = url.substring(url.indexOf(paramName));
         suffix = suffix.substring(suffix.indexOf("=") + 1);
         suffix = (suffix.indexOf("&") >= 0) ? suffix.substring(suffix.indexOf("&")) : "";
         url = prefix + paramName + "=" + paramValue + suffix;
       }
       else {
         if (url.indexOf("?") < 0) {
           url += "?" + paramName + "=" + paramValue;
         } else {
           url += "&" + paramName + "=" + paramValue;
         }
       }

       return url;

     };

     var getGFDataFromCheckout = function() {


       user_data = $("addressLineSelector").text().split(",")
       var GFData = {};
       GFData.amount = Cookies.get("amount"); //$(".ProductPrice").text().split(" ")[0].replace(/[^0-9\.]+/g,"");//$('.SubTotal em').last().text().replace(/[^0-9\.]+/g,"");
       GFData.first_name = Cookies.get("first_name");
       GFData.last_name = Cookies.get("last_name");
       GFData.email = Cookies.get("email");
       GFData.billing_address = Cookies.get("billing_address");
       GFData.billing_city = Cookies.get("billing_city");
       GFData.billing_state = Cookies.get("billing_state");
       GFData.billing_zipcode = Cookies.get("billing_zipcode");
       //GFData.success_url = window.location.protocol + "//" + window.location.host + "/finishorder.php?provider=checkout_bankdeposit&paid=1";
       GFData.success_url = window.location.protocol + "//" + window.location.host + "/checkout/order-confirmation?provider=checkout_bankdeposit&paid=1";
       GFData.failure_url = window.location.protocol + "//" + window.location.host + "/cart.php";
       //GFData.product_info = Cookies.get("product_info");
       GFData.cart_items = Cookies.get("cart_items");
       GFData.shipping_amount = Cookies.get("shipping_amount");
       return GFData;

     };

     var getGF_SLF_Link = function(gfObj) {
       if ($("#getfinancing-button-parent").length==0) {
         $("body").eq(0).append('<div id="getfinancing-button-parent" style="display:none !important;"></div>');
       }

       gfObj.addCheckoutLink({
         src: 'media/1.0/buttons/png/btn_pay.png',
         selector: '#getfinancing-button-parent'
       });

       // Take the button link
       return $("#getfinancing-button-parent a").attr("href");
     };

     /*
     * Controllers
     */

     var controller = {

       // --------------------
       // Thankyou Controller
       // --------------------
       thankyou: function() {
         // Change contents
         if (typeof $(".BlockContent > p")[2] != 'undefined') {
             $(".BlockContent > p")[2].innerHTML="";
         }
         $(".NotifyMessage").last().last().html("<div style='text-align:center;'><h2>Redirecting to GetFinancing Payment Gateway...</h2>" +
         "<br><br><img style='margin-bottom:20px;' " +
         "src='https://www.getfinancing.com/static/img/logo-getfinancing.png'" +
         " height='50' width='236' /><br><img style='margin-top:20px;'" +
         " src='https://partner.getfinancing.com/partner/static/lcinfo/images/wait28trans.gif'" +
         " height='32' width='32' /></div>");


         initGetfinancing(getGFDataFromCheckout);
         GetFinancingSimple.counterPayment();

         // Generate Link on the fly
         var linkSLF = getGF_SLF_Link(GetFinancingSimple);

         $(".ProviderNamecheckout_bankdeposit").append('<br><br>If redirection doesn\'t work visit <a href="' + linkSLF + '" target="_self">this link</a>.');

         // Redirect to GF-SLF

         setTimeout(function() {
             window.location = linkSLF;
             /* We are in the checkout confirmation, now we take all the data from the cookies and send to the Getfinancing form */
         }, 1000);

       }

     };

     /*
     * Main / Bootstrap
     */
function cleanStrings (str) {
    if (typeof str != 'undefined' && str != '') {
        return str.replace(/\n/g, ' ').replace(/ +/g, ' ').trim();
    } else {
        return str;
    }
    /* We want to return the string without new lines and with only one space in each place */
}

     //store parameters in checkout page
function proccessChangeEvent () { //jQuery(document).ajaxComplete(function() {
    /* We were using ajaxComplete, but now we can't, because of Angular
     * We will try with a timer still the main/form element exists in the DOM */
    $("main li").on('change', function () {

           if ( window.location.href.indexOf(window.location.protocol + "//" + window.location.host + "/checkout") >= 0){
               /* We are in the checkout URL: /checkout */

             if ($(addressLineSelector).length <= 0 && $(vCardSelector).length <= 0){

               $(emailSelector).on('change', function() {
                 if (typeof($(emailSelector).val()) != 'undefined'){
                   Cookies.set("email", $(emailSelector).val());
                 }else{
                   Cookies.set("email", "");
                 }
               });
               if (typeof($(emailSelector).val()) != 'undefined'){
                Cookies.set("email", $(emailSelector).val());
               }

               $(firstNameSelector).on('change', function() {
                 Cookies.set("first_name", $(firstNameSelector).val());
               });
               if (typeof($(firstNameSelector).val()) != 'undefined'){
                Cookies.set("first_name", $(firstNameSelector).val());
               }

               $(lastNameSelector).on('change', function() {
                 Cookies.set("last_name", $(lastNameSelector).val() );
               });
               if (typeof($(lastNameSelector).val()) != 'undefined'){
                Cookies.set("last_name", $(lastNameSelector).val() );
               }

               $(billingAddressSelector).on('change', function() {
                 Cookies.set("billing_address", $(billingAddressSelector).val() + " " +$(billingAddress2Selector).val());
               });
               if (typeof($(billingAddressSelector).val()) != 'undefined'){
                Cookies.set("billing_address", $(billingAddressSelector).val() + " " +$(billingAddress2Selector).val());
               }

               $(billingAddress2Selector).on('change', function() {
                 Cookies.set("billing_address", $(billingAddressSelector).val() + " " +$(billingAddress2Selector).val());
               });
               if (typeof($(billingAddress2Selector).val()) != 'undefined'){
                Cookies.set("billing_address", $(billingAddressSelector).val() + " " +$(billingAddress2Selector).val());
               }

               $(billingCitySelector).on('change', function() {
                 Cookies.set("billing_city", $(billingCitySelector).val());
               });
               if (typeof($(billingCitySelector).val()) != 'undefined'){
                 Cookies.set("billing_city", $(billingCitySelector).val());
               }

                var getBillingState = function () {
                    if (typeof $(billingStateSelector).val() != 'undefined') {
                        var billingState = $(billingStateSelector).val().split(':');
                        if (billingState.length>1) {
                            billingState.splice(0,1);
                        }
                        billingState = billingState.join(':');
                        Cookies.set("billing_state", billingState);
                    }
                }
                /* Get the billing state, and remove String: used by Angular */
                getBillingState();

               $(billingStateSelector).on('change', function() {
                   getBillingState();
               });

               $(billingZipCodeSelector).on('change', function() {
                 Cookies.set("billing_zipcode", $(billingZipCodeSelector).val());
               });
               if (typeof($(billingZipCodeSelector).val()) != 'undefined'){
                Cookies.set("billing_zipcode", $(billingZipCodeSelector).val());
               }

             }

             Cookies.set("amount", $(subTotalSelector).last().text().replace(/[^0-9\.]+/g,"") );

             var getProductInfo = function() {
               var retProd = "";
               $(cartContentsSelector).each(function(k,v){
                    titleSplitted = $(v).find(cartContentsTitleSelector).text().split('x');
                    quantity = titleSplitted[0].trim();
                    if (titleSplitted.length>1) {
                        titleSplitted.splice(0,1);
                    }
                    title = titleSplitted.join('x').trim();
                    amount      = $(v).find(cartContentsAmountSelector).html();

                    if ( $.isNumeric(quantity )) { //retProd+= quantity + "_x_" + title  + "_-_" + "$" + amount.replace(/[^0-9\.]+/g,"");
                        retProd+= title  + "( " + quantity + " ) :" + "$" + amount.replace(/[^0-9\.]+/g,"") + "\n";
                    }
               });
               return retProd;
             };

             var getCartItems = function() {
               var cartItems = [];
                   $(cartContentsSelector).each(function(k,v){
                        titleSplitted = $(v).find(cartContentsTitleSelector).text().split('x'); // title = $(v).find(cartContentsTitleSelector).text();
                        quantity = titleSplitted[0].trim();  // quantity = $(v).find(cartContentsQuantitySelector).html().replace(/[^\d.-]/g, '');
                        if (titleSplitted.length>1) {
                            titleSplitted.splice(0,1);
                        }
                        title = titleSplitted.join('x').trim();
                        amount  = $(v).find(cartContentsAmountSelector).html(); // amount = $(v).find(cartContentsAmountSelector).text().replace(/[^\d.-]/g, '');
                        cartItems.push({'sku':title, 'display_name':title,'unit_price':amount,'quantity':quantity,'unit_tax': 0});
                   });
               return cartItems;
             };

             var getShippingAmount = function() {
                 if (typeof $(shippingAmountSelector).html() != 'undefined') {
                     return $(shippingAmountSelector).html().replace(/[^\d.-]/g, '');
                 } else {
                     return false
                 }
             };

             //Cookies.set("product_info",getProductInfo());
             var cartItems = getCartItems();
             Cookies.set("cart_items",cartItems);
             Cookies.set("shipping_amount", getShippingAmount());


             //trick for logged people
             if ($(addressLineSelector).length > 0){ //user_data = $(addressLineSelector).text().split(",");
               Cookies.set("first_name",                cleanStrings($(addressLineSelector+' .first-name').text()));
               Cookies.set("last_name",                 cleanStrings($(addressLineSelector+' .family-name').text()));
               Cookies.set("email",                             cleanStrings($(addressLineEmailSelector).text()));
               var billingAddressStreet = cleanStrings($(addressLineSelector+' .address-line-1').text());
               billingAddressStreet        += cleanStrings($(addressLineSelector+' .locality').text());
               Cookies.set("billing_address",   billingAddressStreet);
               Cookies.set("billing_city",              cleanStrings($(addressLineSelector+' .region').text()));
               Cookies.set("billing_state",     cleanStrings($(addressLineSelector+' .country-name').text()));
               Cookies.set("billing_zipcode",   cleanStrings($(addressLineSelector+' .postal-code').text()));
               /* Get the information from the addressLineSelector where are organized by class names */
             }

             if ($(vCardSelector).length <= 0) {
                Cookies.set("first_name",               cleanStrings($(vCardSelector+' .first-name').text()));
                Cookies.set("last_name",                cleanStrings($(vCardSelector+' .family-name').text()));
                Cookies.set("email",                            cleanStrings($(vCardSelector).text()));
                var billingAddressStreet = cleanStrings($(vCardSelector+' .address-line-1').text());
                billingAddressStreet       += cleanStrings($(vCardSelector+' .locality').text());
                Cookies.set("billing_address",  billingAddressStreet);
                Cookies.set("billing_city",             cleanStrings($(vCardSelector+' .region').text()));
                Cookies.set("billing_state",    cleanStrings($(vCardSelector+' .country-name').text()));
                Cookies.set("billing_zipcode",  cleanStrings($(vCardSelector+' .postal-code').text()));
                /* It's possible that the user information is already in a div on top, if so, we use that */
             }

           }

         });
     if ($("main li").length > 0) {
        clearInterval(refreshIntervalId);
        /* Now we know the main/form exists, and we already binded onchange
         * We can clear the interval now */
    }
}

     //to enable gf on confirmation page
     jQuery(document).ready(function() {
       if ( window.location.href.indexOf(window.location.protocol + "//" + window.location.host + "/checkout/order-confirmation") >= 0 &&
                    $('.orderConfirmation-section').text().trim().toLowerCase().includes('financing')){
         var paid = getURLParameter('paid');

         if (paid == 1){
           //we paid, standard page
         if (typeof $(".BlockContent > p")[2] != 'undefined') {
           $(".BlockContent > p")[2].innerHTML="";
          }
           $(".NotifyMessage").children(".Bold").html("");
         } else{
           //need to open gf
           controller.thankyou();
         }
       }
     });

        var refreshIntervalId = setInterval(proccessChangeEvent, 1000);
        /* Since Bigcommerce is now using Angular, the main screen with the inputs is loading async
         * So, we need to bind the onchange and try it again still the element exists in the DOM */

   })(window);

   function xinspect(obj){
     for ( var prop in obj ) {
       console.log( prop + ' is ' + obj[prop] );
     }
   }
</script>
  • Finally save the changes and make sure to test it with a sample purchase.

You will see GetFinancing as a payment method in the checkout screen.

_images/gf_pay.png

If everything goes correctly, you will be redirected to our checkout process to complete the purchase. After that the user should be returned to that page with a congratulations message.

_images/gf_redirect.png

CS-Cart Plugin

The following plugin was designed for CS-Cart:

DrupalCommerce Plugin

_images/banner-getfinancing-drupal.png

The following plugin was designed and tested with DrupalCommerce 2.x and Drupal 7.x

Joomla Virtuemart Plugin

The following plugin was designed and tested with VirtueMart 3 and Joomla 2.5 - 3.x.

Magento 1.X Plugin

_images/banner-getfinancing-magento.png

We recommend you to install our Magento Plugin.

The latest versions of the plugin can be installed completely visually from the Magento Connect area. Just open the file from there and follow the normal steps.

The plugin will add GetFinancing in your checkout process, like in the following example:

_images/magento.png

Once they select GetFinancing as a purchase the process will begin:

_images/magento2.png

You will be able to specify your configuration parameters using the configuration area in your admin backoffice:

_images/magento-config.png

We recommend that you add some banners and agreement description in your page besides this plugin to let the users know that they have the option of GetFinancing for their purchase.

Remember after installing the plugin to add the postback url on your GetFinancing portal. The url for the default magento module is {your_domain}/getfinancing/standard/postback i.e. http://www.yourdomain.com/getfinancing/standard/postback

Also notice that if you are using a highly modified template it could need some extra tunning.

Make sure to read the README file inside the plugin.

Magento 2.X Plugin

_images/banner-getfinancing-magento2.png

We recommend you to install our Magento 2.X Plugin.

OpenCart Plugin

_images/banner-getfinancing-opencart.png

We recommend you to install our OpenCart Plugin, which has versions for OpenCart 1.5.X and 2.0.X.

Installation:

Purchase demo:

Oscommerce Plugin

_images/banner-getfinancing-oscommerce.png

The following plugin was designed with Oscommerce 2.3:

Prestashop Plugin

The following plugin was designed for Prestashop 1.5 and 1.6:

Shopify Official Payment Method

_images/banner-getfinancing-shopify.png

In this guide we will be integrating GetFinancing as an alternate payment method for Shopify. This means that besides your current payment methods you will have GetFinancing as a payment method in the checkout page.

For doubts do not hesitate to contact support@getfinancing.com.

Step by Step

    1. Open this url:

https://www.shopify.com/login?redirect=authorize_gateway%2F1030330

(Enter your Shopify credentials if you are not logged in)

    1. After this, the following screen will appear, where you have to click “Add payment gateway”:
_images/image00.png
    1. And then under Settings-> Payments -> Alternative Payments there will be a place to add your merchant_id, username and password.

Notice you need to add them in a single location separated by # (i.e. merch_id#user#pass): Also notice you will need to enter again the password in the field below.

_images/image02.png

​ * 4) Add https://cart.getfinancing.com/s/callback.php (the same url for all Shopify users) as postback url in our portal for both testing and production environments. Otherwise the order will not appear on your Shopify when the customer completes its order on GetFinancing:

_images/portal-postbacks.png
    1. After saving GetFinancing should be available to be used:
_images/checkout11.png
  • Finally make sure to test it with a sample purchase.

Volusion Integration

_images/banner-getfinancing-volusion.png

In this guide we will be integrating GetFinancing as an alternate payment method for Volusion. This means that besides your current payment methods you will have GetFinancing as a payment method in the checkout page.

The way this process works is by adding a Javascript to the checkout page, that redirects to our form when the payment method name is detected. Make sure to test it, since heavily modified templates or newer versions of Volusion could break this process.

For doubts do not hesitate to contact support@getfinancing.com.

Step by Step

  • Login onto your Volusion Merchant Admin Account.
  • Navigate to: Settings / Payment
_images/1.png
  • Go to: More Payment Types and add a new Custom Type method called “GetFinancing”
_images/2.png _images/1-b.png
  • Navigate to: ** Design / Template ** and Edit your Active Template clicking on “Edit HTML”
  • In the dropdown, search the main template file to edit.
_images/3.png
  • Insert this piece of code before </head> tag as shown in the image:

    <script src="https://cdn.getfinancing.com/libs/1.0/getfinancing.js"></script>
    
_images/5.png
  • Next, copy/paste this piece of Javascript code before </body> tag and save the changes

    Remember to change [YOUR_MERCHANT_ID]

    Environment variable should be “production” or “staging” depending whether you are integrating in a production environment or not.

    <script type="text/javascript">
    
    /****************************
        Modify this variables
        gf_merchant_id with your current GetFinancing merchant id
        gf_environment --> production / staging
    *****************************/
    var gf_merchant_id = [YOUR_MERCHANT_ID];
    var gf_environment = "production";
    
    </script>
    
    <script type="text/javascript">
    
    ;(function() {
    
        /**
         * Config
         */
    
        var cfg = {
            scriptDebug: false
        };
    
        var GFcfg = {
            cookieName: "GetFinancingCSH",
            merchantID: gf_merchant_id,
            environment: gf_environment
        };
    
        /**
         * Helpers
         */
    
        var deleteCookie = function(name) {
            document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;';
        };
    
        var initGetfinancing = function(parametersFn) {
    
            if (typeof(parametersFn) === "function") {
                debug("Init GF with Parameters");
                GetFinancingSimple.init({
                    platform: GFcfg.environment,
                    merchantID: GFcfg.merchantID,
                    getParameters: parametersFn
                });
            } else {
                debug("Init GF with NO Parameters");
                GetFinancingSimple.init({
                    platform: GFcfg.environment,
                    merchantID: GFcfg.merchantID
                });
            }
        };
    
        var debug = function(txt) {
            if (cfg.scriptDebug) {
                console.log(txt);
            }
        }
    
        /*
        * Router
        */
    
        // Simple URL router request
        var routeRequest = function() {
    
            // Get current URL
            var currURL = window.location.pathname;
    
            debug("Detected ROUTE: " + currURL);
    
            if ((currURL === "/") || (currURL === "/default.asp")) {
                controllerHomepage();
            }
    
            if ((currURL === "/ShoppingCart.asp") || (currURL === "/shoppingcart.asp")) {
                controllerShoppingCart();
            }
    
            if (currURL === "/one-page-checkout.asp") {
                controllerCheckout();
            }
    
            if (currURL === "/OrderFinished.asp") {
                controllerRedirectToSLF();
            }
        };
    
    
        /*
         * Controllers
         */
    
        var controllerHomepage = function() {
            initGetfinancing({});
    
            debug("Calling - counterLanding()");
            GetFinancingSimple.counterLanding();
        };
    
    
        var controllerShoppingCart = function() {
    
            var getGFDataFromCart = function() {
                var GFData = {};
                GFData.amount = $('#v65-cart-total-estimate b').text().toString().replace(/[\t\n$,]/g, '').replace(/[^0-9.]/g, '');
                return GFData;
            };
    
            initGetfinancing(getGFDataFromCart);
    
            var $gfFAQLink = $('<div id="getfinancing_faq_link" style="float:right; margin:45px 50px 0 0;"></div>');
            $gfFAQLink.append('<a href="https://www.getfinancing.com/faq" target="_blank"><img src="https://partner.getfinancing.com/media/1.0/buttons/png/btn_getfinancing_180x46_a.png" /></a>');
            $("#v65-cart-show-giftoptions-cell").prepend($gfFAQLink);
            /*GetFinancingSimple.addFaqLink({
                src: "media/1.0/buttons/png/btn_getfinancing_180x46_a.png",
                selector: "#getfinancing_faq_link"
            });*/
        };
    
    
        var controllerCheckout = function() {
    
            var getGFDataFromCheckout = function() {
                var GFData = {};
                var product_info = "",
                    $cart_items = $('b.cart-item-name');
                $cart_items.each(function(index, cart_item) {
                    product_info += $(cart_item).text();
                    if (index < $cart_items.length - 1) {
                        product_info += ", ";
                    }
                });
                GFData.amount = $('#TotalsTotalTD').text().toString().replace(/[\t\n$,]/g, '');
                GFData.first_name = $('INPUT[name="BillingFirstName"]').val();
                GFData.last_name = $('INPUT[name="BillingLastName"]').val();
                GFData.email = $('INPUT[name="Email"]').val();
                GFData.billing_address = $('INPUT[name="BillingAddress1"]').val() + " " + $('INPUT[name="BillingAddress2"]').val();
                GFData.billing_city = $('INPUT[name="BillingCity"]').val();
                GFData.billing_state = $('SELECT[name="BillingState_dropdown"]').val();
                GFData.billing_zipcode = $('INPUT[name="BillingPostalCode"]').val();
                GFData.success_url = "";
                GFData.product_info = product_info;
                return GFData;
            };
    
            initGetfinancing(getGFDataFromCheckout);
            debug("Calling - counterPayment()");
            GetFinancingSimple.counterPayment();
    
            $("#PaymentMethodTypeDisplay").bind("change", function() {
                if (/get\ ?financing/i.test($(this).val())) {
                    var anchorHtml = '<a id="faq_gf_link" target="_blank" style="display:inline-block;font-size:16px;' +
                        'background-color:#8DC63F; color:#fff; line-height:22px; height:20px; width:20px;' +
                        'text-align:center; font-weight:bold; margin-left:4px;' +
                        'border-radius:100px;" href="#">?</a>' +
                        '<div id="hidden_button_faq_gf" style="display:none;"></div>';
                    $(this).after(anchorHtml);
                    $(this).parent().width("300px");
                    // Generate and add a hidden faq link.
                    debug("Adding FaqLink");
                    GetFinancingSimple.addFaqLink({
                        selector: "#hidden_button_faq_gf"
                    });
                    // Change HREF to FAQ
                    $("#faq_gf_link").attr("href", $("#hidden_button_faq_gf a").attr("href"));
                   // $("#faq_gf_link").attr("class", $("#hidden_button_faq_gf a").attr("class"));
                } else {
                    $("#faq_gf_link").remove();
                    $("#hidden_button_faq_gf").remove();
                }
            });
    
            // When submiting the order.
            $("#btnSubmitOrder").bind("click", function() {
                var payMethod = jQuery("#PaymentMethodTypeDisplay").val();
                if (/get\ ?financing/i.test(payMethod)) {
                    GetFinancingSimple.writeCookie(GFcfg.cookieName, JSON.stringify(getGFDataFromCheckout()), 2);
                    debug(GFcfg.cookiename + " - Cookie Created!");
                } else {
                    deleteCookie(GFcfg.cookieName);
                    debug(GFcfg.cookiename + " - Cookie Removed!");
                }
            });
    
        };
    
        var controllerRedirectToSLF = function() {
    
            // Detect if the cookie exists and if not exists cancel function execution
            if (document.cookie.indexOf(GFcfg.cookieName) === -1) {
                return;
            }
    
            var getGFDataFromCookie = function() {
                var GFData = {};
                GFData = JSON.parse(GetFinancingSimple.readCookie(GFcfg.cookieName));
                GFData.success_url = window.location.href;
                return GFData;
            };
    
            initGetfinancing(getGFDataFromCookie);
    
            debug("Calling - counterCheckout()");
            GetFinancingSimple.counterCheckout();
    
            var getGF_SLF_Link = function(gfObj) {
                if (jQuery("#getfinancing-button-parent").length==0) {
                    jQuery("body").append('<div id="getfinancing-button-parent" style="display:none !important;"></div>');
                }
                gfObj.addCheckoutLink({
                    src: 'media/1.0/buttons/png/btn_getfinancing_checkout2.png',
                    selector: '#getfinancing-button-parent'
                });
    
                // Take the button link
                var link = $("#getfinancing-button-parent a").attr("href");
                $("#getfinancing-button-parent").remove();
                debug("Getted link to Gateway: " + link);
                return link;
            };
    
            var linkSLF = getGF_SLF_Link(GetFinancingSimple);
    
            // Add redirection texts.
            var redirectHTML = '<h3 style="padding:0px 100px 30px 100px; text-align:center;">' +
                'Redirecting to GetFinancing Payment Gateway' +
                '</h3>' +
                '<img style="margin-bottom:20px;" src="https://www.getfinancing.com/static/img/logo-getfinancing.png" height="50" width="236" />' +
                '<img style="margin:20px auto; display:block;" src="https://partner.getfinancing.com/partner/static/lcinfo/images/wait28trans.gif" height="32" width="32" />' +
                '<br><br>If redirection doesn\'t work visit <a href="' + linkSLF + '" target="_self">this link</a>.';
    
    
            // Redirect to GF-SLF
    
            setTimeout(function() {
                window.location = linkSLF;
            }, 1000);
    
            jQuery("#div_articleid_49").hide().after('' + redirectHTML + '</h2>');
    
            // We already have the data, so drop cookie
            deleteCookie(GFcfg.cookieName);
    
    
        };
    
        /*
         * Main / Bootstrap
         */
    
        jQuery(document).ready(function() {
            routeRequest();
        });
    
      })();
    </script>
    
_images/6.png
  • Finally save the changes and make sure to test it with a sample purchase.

You will see GetFinancing as a payment method in the checkout screen.

_images/7.png

If everything goes correctly, you will be redirected to our checkout process to complete the purchase. After that the user should be returned to that page with a congratulations message.

_images/8.jpg

WooCommerce (Wordpress) Plugin

_images/banner-getfinancing-woocommerce.png

We recommend you to install our WooCommerce Plugin.

To install the plugin into your WooCommerce store go to your Wordpress Backoffice: Plugins / Add New / Upload Plugin

Browse the file you downloaded before and click Install Now.

_images/woocommerce-install.png

The plugin will add GetFinancing in your checkout process, like in the following example:

_images/woocommerce-checkout.png

Once they select GetFinancing as a purchase the process will begin:

_images/woocommerce2.png

You will be able to specify your configuration parameters using the configuration area in your admin backoffice:

_images/woocommerce-config.png

We recommend that you add some banners and agreement description in your page besides this plugin to let the users know that they have the option of GetFinancing for their purchase.

Make sure to read the README file inside the plugin and to ask your provider to open outgoing ports 10000 and 10001 for your server (these are used by the GetFinancing plugin).

X-Cart Plugin

The following plugin was designed for X-Cart:

ZenCart Plugin

_images/banner-getfinancing-zencart.png

We recommend you to install our ZenCart Plugin.

To install the plugin into your ZenCart store:

  • Extract zencart-getfinancing-x.x.x.zip and copy the contents into Root folder of your ZenCart installation.
  • Access to your ZenCart Backoffice and go to: MODULES / PAYMENT
  • Select the GetFinancing Payment Module and press the +Install button.
_images/zencart1.png
  • You will be able to specify your configuration parameters using the configuration area in your admin backoffice:
_images/zencart2.png
  • Finally, save the changes.

Automatically you will be able to see the GetFinancing payment method in your Checkout process.

_images/zencart3.png

We recommend that you add some banners and agreement description in your page besides this plugin to let the users know that they have the option of GetFinancing for their purchase.

Make sure to read the README file inside the plugin and to ask your provider to open outgoing ports 10000 and 10001 for your server (these are used by the GetFinancing plugin).

Other shopping carts

We are constantly developing and adding new modules.

Would you like us to add a module for another platform? Do you have a module that can help others integrate?

Please let us know, at integrations@getfinancing.com