/*************************************************************** * * OCCSagePay.js - Sage Pay API integration * * Copyright (c) 2015 SellerDeck Limited * ****************************************************************/ /*********************************************************************** * * GetPSPHelper - Load and PSP specific files and display the form * ************************************************************************/ function GetPSPHelper() { var sLibUrl = document.getElementById("idLibUrl").value; RequireScript(sLibUrl, function () { ShowPSPForm(); } ); } /*********************************************************************** * * sagepayResponseHandler - Handles the response from Sage Pay * ************************************************************************/ 'use strict'; var sellerdeckResponseHandler = function (status, response) { console.log(status, response); var nIdPSP = 22; var $form = $('#payment'); // // Clear old errors // $('div.form-group', $form).removeClass('has-error'); $('span.error', $form).html(''); if (status === 200) { var cardIdentifier = response['cardIdentifier']; var sAuthoriseUrl = document.getElementById("idAuthoriseUrl").value; $('