Version Upgrade FAQs

How to upgrade the Web SDK version for BlueSnap solution.

When you upgrade your Web SDK version to v5.0, you can take advantage of the latest BlueSnap updates and features.

What is Web SDK?

BlueSnap's Web SDK is a Javascript bundle that you can include it in your HTML files during implementation. Web SDK v5.0 includes application code for the following solutions:

How can I upgrade versions?

Your upgrade process depends on which solution you want to upgrade:

  • All solutions except Hosted Payment Fields — You can upgrade your BlueSnap version by simply updating the sandbox and production domain paths in your HTML script element. For details, see How do I update my domain path? below.
  • Hosted Payment Fields — You must update the domain path and make additional code changes to your implementation. For details, see How do I upgrade my Hosted Payment Fields version? below.

How do I update my domain path?

The domain path is a portion of the src attribute in the script element that you add to your HTML files during implementation. For all Web SDK solutions except Hosted Payment Fields, you can upgrade your BlueSnap version by simply changing the sandbox and production domain paths to the following:

Sandbox domain path

https://sandpay.bluesnap.com/web-sdk/5/

Production domain path

https://pay.bluesnap.com/web-sdk/5/

For example, if you want to upgrade your production BlueSnap Checkout version to v5.0, replace the HTML script element on your checkout form with the following:

<script type="text/javascript" src="https://pay.bluesnap.com/web-sdk/5/bluesnap.js"></script>

How do I upgrade my Hosted Payment Fields version?

The following sections detail how to upgrade specific version upgrades for your Hosted Payment Fields solution. For comprehensive instructions on how to implement Hosted Payment Fields with Web SDK v5.0, see Hosted Payment Fields.

v3.0 to v5.0

BlueSnap lets you upgrade the Web SDK from v3.0 directly to v5.0. Upgrading to v5.0 gives you the latest Hosted Payment Fields technology and keeps you in compliance with the most recent 3D Secure regulations implemented by the EU.

All of the following changes reference code samples provided in Hosted Payment Fields:

  • In the HTML script element that adds the BlueSnap Javascript file to your checkout form, change the src attribute to use the Web SDK v5.0 domain path:
    Sandbox script element
    <script type="text/javascript" src="sandpay.bluesnap.com/web-sdk/5/bluesnap.js"></script>
    
    Production script element
    <script type="text/javascript" src="pay.bluesnap.com/web-sdk/5/bluesnap.js"></script>
    
  • The following changes were made to the onError method in bsObj.onFieldEventHandler:
    • Errors 001, 002, and 003 to were replaced with error 10.
    • The errorDescription callback parameter is optional. It returns invalid or empty to describe why the field threw the error.
      To determine which input threw the error, you can use the tagId parameter.
    • The eventOrigin callback parameter is optional. It returns onBlur or onSubmit depending on the scenario.
    • You can include the optional updateAccessibilityError callback parameter. This is part of BlueSnap's accessibility feature customization. For implementation details, see Customizing the Hosted Payment Fields.
  • ThebsObj.expDropDownSelector property is no longer supported.
  • Replace bluesnap.hostedPaymentFieldsCreation(token, bsObj); with the following code:
    bsObj["token"] = token;
    bluesnap.hostedPaymentFieldsCreate(bsObj);
    
  • In the function that submits payment data to BlueSnap, change bluesnap.submitCredentials to bluesnap.hostedPaymentFieldsSubmitData. For example:
    function do_when_clicking_submit_button(){
        bluesnap.hostedPaymentFieldsSubmitData(function(callback){
            ...
    
  • For cardTypes, credit card names where changed to the following:
    • AmericanExpress is now AMEX
    • DinersClub is now DINERS
    • Discover is now DISCOVER
    • MasterCard is now MASTERCARD
    • Visa is now VISA
  • When a field fails client-side validation, BlueSnap activates only the onError function. BlueSnap does not call your merchant callback.

v4.0 to v5.0

Upgrading from Web SDK v4.0 to v5.0 gives you the latest Hosted Payment Fields technology and keeps you in compliance with the most recent 3D Secure regulations implemented by the EU.

All of the following changes reference code samples provided in Hosted Payment Fields:

  • In the HTML script element that adds the BlueSnap Javascript file to your checkout form, change the src attribute to use the Web SDK v5.0 domain path:
    Sandbox script element

    <script type="text/javascript" src="sandpay.bluesnap.com/web-sdk/5/bluesnap.js"></script>
    

    Production script element

    <script type="text/javascript" src="pay.bluesnap.com/web-sdk/5/bluesnap.js"></script>
    
  • In onFieldEventHandler:

    • onError function parameters are now tagId, errorCode, errorDescription, eventOrigin and updateAccessibilityError.

    • eventOrigin returns onBlur or onSubmit, depending on the scenario.

    • updateAccessibilityError is part of the BlueSnap's accessibility feature customization. For implementation details, see Customizing the Hosted Payment Fields.

    • In scenario errorCode: “10” description can be either invalid or empty depending on the scenario. For example:

      (errorCode: "10", errorDescription: "empty", eventOrigin: "onBlur", tagId: "ccn", updateAccessibilityError: Function)
      
      (errorCode: "10", errorDescription: "invalid", eventOrigin: "onSubmit", tagId: "ccn", updateAccessibilityError: Function)
      
    • errorDescription, eventOrigin, and updateAccessibilityError are all optional.

Back to Top