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:
- 3D Secure with Plain Text Cards
- 3D Secure with Returning Shoppers
- BlueSnap Checkout
- Hosted Payment Fields
- Payment Request Button
- Secured Payment Collector
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 elementProduction script element<script type="text/javascript" src="sandpay.bluesnap.com/web-sdk/5/bluesnap.js"></script>
<script type="text/javascript" src="pay.bluesnap.com/web-sdk/5/bluesnap.js"></script>
- The following changes were made to the
onError
method inbsObj.onFieldEventHandler
:- Errors
001
,002
, and003
to were replaced with error10
. - The
errorDescription
callback parameter is optional. It returnsinvalid
orempty
to describe why the field threw the error.
To determine which input threw the error, you can use thetagId
parameter. - The
eventOrigin
callback parameter is optional. It returnsonBlur
oronSubmit
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.
- Errors
- The
bsObj.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
tobluesnap.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 nowAMEX
DinersClub
is nowDINERS
Discover
is nowDISCOVER
MasterCard
is nowMASTERCARD
Visa
is nowVISA
- 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>
-
-
onError
function parameters are nowtagId
,errorCode
,errorDescription
,eventOrigin
andupdateAccessibilityError
. -
eventOrigin
returnsonBlur
oronSubmit
, 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 eitherinvalid
orempty
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
, andupdateAccessibilityError
are all optional.
-
Updated about 2 months ago