From c1c5e52df5b9ef54ee7ed4cc5973d7760c67932d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=C3=A1n=20MacDomhnall?= Date: Wed, 7 Dec 2016 16:27:35 +0000 Subject: [PATCH 1/3] Updated default endpoint for TLS 1.2 and version number. --- README.md | 10 +++++----- dist/rxp-js.js | 4 ++-- dist/rxp-js.min.js | 4 ++-- lib/rxp-hpp.js | 2 +- package.json | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index f93d83a..815f34f 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# Realex JS SDK -You can sign up for a Realex account at https://www.realexpayments.com. +# Realex JS Library +You can sign up for a Realex account at https://developer.realexpayments.com -## Hosted Payment Page (HPP) JS SDK +## Hosted Payment Page (HPP) JS Library ### Usage -The Javascript required to initialise the SDK is below. This code must only be executed when the DOM is fully loaded. +The Javascript required to initialise the library is below. This code must only be executed when the DOM is fully loaded. ```javascript RealexHpp.init(payButtonId, merchantUrl, jsonFromServerSdk); ``` @@ -15,7 +15,7 @@ RealexHpp.init(payButtonId, merchantUrl, jsonFromServerSdk); ### Consuming the resulting POST Once the payment has completed the Realex JSON response will be posted within to the supplied merchantUrl. The name of the field containing the JSON response is hppResponse. -## Remote JS SDK +## Remote JS Library ### Validation functions * validateCardNumber - validates card number format and performs a Luhn check diff --git a/dist/rxp-js.js b/dist/rxp-js.js index 7b28370..93bd803 100644 --- a/dist/rxp-js.js +++ b/dist/rxp-js.js @@ -1,4 +1,4 @@ -/*! rxp-js - v1.2.0 - 2015-10-28 +/*! rxp-js - v1.2.1 * The official Realex Payments JS SDK * https://github.com/realexpayments/rxp-js * Licensed MIT @@ -7,7 +7,7 @@ var RealexHpp = (function() { 'use strict'; - var hppUrl = "https://hpp.realexpayments.com/pay"; + var hppUrl = "https://pay.realexpayments.com/pay"; var randomId = randomId || Math.random().toString(16).substr(2,8); diff --git a/dist/rxp-js.min.js b/dist/rxp-js.min.js index 977bfa7..daef223 100644 --- a/dist/rxp-js.min.js +++ b/dist/rxp-js.min.js @@ -1,6 +1,6 @@ -/*! rxp-js - v1.2.0 - 2015-10-28 +/*! rxp-js - v1.2.1 * The official Realex Payments JS SDK * https://github.com/realexpayments/rxp-js * Licensed MIT */ -var RealexHpp=function(){"use strict";function a(a){var b=document.createElement("a");return b.href=a,b.hostname}var b,c="https://hpp.realexpayments.com/pay",d=d||Math.random().toString(16).substr(2,8),e=function(a){c=a},f=/Windows Phone|IEMobile/.test(navigator.userAgent),g=/Android|iPad|iPhone|iPod/.test(navigator.userAgent),h=!(((window.innerWidth>0?window.innerWidth:screen.width)<=360?0:1)&&((window.innerHeight>0?window.innerHeight:screen.Height)<=360?0:1)),i=f,j=!f&&(g||h),k=function(){function a(){function a(){return 90===window.orientation||-90===window.orientation?!0:!1}function e(){var a=document.createElement("div");a.setAttribute("id","rxp-overlay-"+d),a.style.position="fixed",a.style.width="100%",a.style.height="100%",a.style.top="0",a.style.left="0",a.style.transition="all 0.3s ease-in-out",a.style.zIndex="100",i&&(a.style.position="absolute !important",a.style.WebkitOverflowScrolling="touch",a.style.overflowX="hidden",a.style.overflowY="scroll"),document.body.appendChild(a),setTimeout(function(){a.style.background="rgba(0, 0, 0, 0.7)"},1),m=a}function f(){null===document.getElementById("rxp-frame-close-"+d)&&(p=document.createElement("img"),p.setAttribute("id","rxp-frame-close-"+d),p.setAttribute("src","data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0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LarVnWdZ9AmQ8Hncc17UvymVdBMB/MgPQm+cFFcuy6/V6lzqDf57ntWGwYdBIVx0TfkBD6I9M35iRJgfIoAVjBLDZbA4CiJ5+9AdQi/EahibqDTkQx6fRSIHcPwA8Uy9A9Gcc47Xv+w2wzhRDYzqdVihLIbsIiCvP1NNOoX/29FQx3vgOgtt4FyRdCgPRarX4+goB9vkyAMh443cOEsIAAcjncuoI4TXWMAmCIGFhCQLAdZ8jym/cRJ+Y5nC5XCYAhINKpZLgSISZgoqh5iiLQrojAFICVwGS7tCfe5DbZzkP56XS4NVxwvTI/vXVVYIDnqmnnX70ZxzjNS8THHooK5hMpxHQIREA+tEfA9djfHR3MHkdx3Hspe9r3B+VzWaj2RESyR2mlCUE4MoGQDdxiwHURq2t94+PO9bMIYyTyDNLwMoM7g8+BfKeYGniyw2MdfSehF3Qmk1IvCc/AgwAaS86Etp38bUAAAAASUVORK5CYII="),p.setAttribute("style","transition: all 0.5s ease-in-out; opacity: 0; float: left; position: absolute; left: 50%; margin-left: 173px; z-index: 99999999; top: 30px;"),setTimeout(function(){p.style.opacity="1"},500),i&&(p.style.position="absolute",p.style["float"]="right",p.style.top="20px",p.style.left="initial",p.style.marginLeft="0px",p.style.right="20px"),p.addEventListener("click",l,!0),m.appendChild(p))}function g(a){var b=document.createElement("form");b.setAttribute("method","POST"),b.setAttribute("action",c);for(var d in q){var e=document.createElement("input");e.setAttribute("type","hidden"),e.setAttribute("name",d),e.setAttribute("value",q[d]),b.appendChild(e)}var f=document.createElement("input");f.setAttribute("type","hidden"),f.setAttribute("name","HPP_TEMPLATE_TYPE"),f.setAttribute("value","LIGHTBOX"),b.appendChild(f);var g=document.createElement("a");g.href=window.location.href;var h=g.protocol+"//"+g.host,i=document.createElement("input");return i.setAttribute("type","hidden"),i.setAttribute("name","HPP_ORIGIN"),i.setAttribute("value",h),b.appendChild(i),b}function h(){if(n=document.createElement("img"),n.setAttribute("src","data:image/gif;base64,R0lGODlhHAAcAPYAAP////OQHv338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DyLRUUKAFRYVI1HMZAALgJIAg8KGDwKGlinAEkKLoU1Tnt1BABVAtOEKb4PBhIMR4c+cU5OaymILiYlCwtHmIcxQU4fjAYMDFjdiApQSGBU5QgGRjOmEFgQCUMKZf8AKLgBAgiZNvkaURkSo8aUI+wAYJDSYcyONloibexIoYQwQS6oEPgxpOGMXPQOPdjCMFESCgcZHdFiYUROQ0dChCgRkRCFOg4cRMCCiIcGAjhCUDgq6AiHDhWyxShAhJACKFweJJHAAgoFQ1dfrAwQlKRMhAwpfnCZMkXEihqCHmAwUIXRkAgRoLiQgsIHABsrVDRl1OPMDQAPZIzAAcAEjRVzOT2gI+XTjREMBF0RUZMThhyyAGyYYGCQhtaoCJVQMjk3ISQafAtHFAgAIfkECQoAAAAsAAAAABwAHAAAB/+AAIKDhIWGh4iGD4mMh1UCjYkNXlWDSQKVgo+Rgkl3HZkCSEmdMwqcgnNOWoI8SDwAD0VFSKgAP05ONgACPLApKUUujAsesABIek46CkmuAjNFp4IPPIuEQ3p2dDgAJBEmhdAuLikDGljDhTY6OjtZM4guAlRYWFSZhmB9cF3Xhxg0aBjw75ABNVYaGcDACEkDA+EaVUmSJJ8gF2AmgDgRBkWkGQwWlJBA5ViSG3PqOHiTIFIDDwtESkhBqAqRKTgoROJRJAUmRlA8MHoggSEjA16yQKiFiEqMGFgSXaETQcsEKoiSYIlRI0YJdYRMuIkgxYcLCSs0gEVyxcq8K1NhhpQwxCDEgEE3WrQggsPHFCpQcGCNlYKIRUNXyrTA4aIHAigArOAYUrDRhgk0yF1YQQBAChwhGqB6IEbJNCMIpggaAOYKKgwXjAJggSAiAANHbBW6kgMsAN+6q7jWTfxQIAA7AAAAAAAAAAAA"),n.setAttribute("id","rxp-loader-"+d),n.style.left="50%",n.style.position="fixed",n.style.background="#FFFFFF",n.style.borderRadius="50%",n.style.width="30px",n.style.marginLeft="-15px",n.style.zIndex="200",n.style.marginLeft="-15px",n.style.top="120px",document.body.appendChild(n),o=document.createElement("iframe"),o.setAttribute("name","rxp-frame-"+d),o.setAttribute("id","rxp-frame-"+d),o.setAttribute("height","85%"),o.setAttribute("frameBorder","0"),o.setAttribute("width","360px"),o.setAttribute("seamless","seamless"),o.style.zIndex="10001",o.style.position="absolute",o.style.transition="transform 0.5s ease-in-out",o.style.transform="scale(0.7)",o.style.opacity="0",m.appendChild(o),i){o.style.top="0px",o.style.bottom="0px",o.style.left="0px",o.style.marginLeft="0px;",o.style.width="100%",o.style.height="100%",o.style.minHeight="100%",o.style.WebkitTransform="translate3d(0,0,0)",o.style.transform="translate3d(0, 0, 0)";var a=document.createElement("meta");a.name="viewport",a.content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0",document.getElementsByTagName("head")[0].appendChild(a)}else o.style.top="40px",o.style.left="50%",o.style.marginLeft="-180px";o.onload=function(){o.style.opacity="1",o.style.transform="scale(1)",n.parentNode&&n.parentNode.removeChild(n),f()};var b=g(document);o.contentWindow.document.body?o.contentWindow.document.body.appendChild(b):o.contentWindow.document.appendChild(b),b.submit()}function k(){b=window.open();var a=b.document,c=a.createElement("meta"),d=a.createAttribute("name");d.value="viewport",c.setAttributeNode(d);var e=a.createAttribute("content");e.value="width=device-width",c.setAttributeNode(e),a.head.appendChild(c);var f=g(a);a.body.appendChild(f),f.submit()}function l(){p.parentNode&&p.parentNode.removeChild(p),o.parentNode&&o.parentNode.removeChild(o),n.parentNode&&n.parentNode.removeChild(n),m.className="",setTimeout(function(){m.parentNode&&m.parentNode.removeChild(m)},300)}var m,n,o,p,q,r=a();return i&&window.addEventListener&&window.addEventListener("orientationchange",function(){r=a()},!1),{lightbox:function(){j?k():(e(),h())},close:function(){l()},setToken:function(a){q=a}}}var e;return{getInstance:function(b){return e||(e=a()),e.setToken(b),e}}}(),l=function(e,f,g){function h(e){if(a(e.origin)===a(c))if(e.data&&JSON.parse(e.data).iframe){if(!j){var g=JSON.parse(e.data).iframe.width,h=JSON.parse(e.data).iframe.height,k=document.getElementById("rxp-frame-"+d);if(k.setAttribute("width",g),k.setAttribute("height",h),k.style.backgroundColor="#ffffff",i){var m=document.getElementById("rxp-overlay-"+d);k.style.marginLeft="0px",k.style.WebkitOverflowScrolling="touch",k.style.overflowX="scroll",k.style.overflowY="scroll",m.style.overflowX="scroll",m.style.overflowY="scroll"}else k.style.marginLeft=parseInt(g.replace("px",""),10)/2*-1+"px";var n=document.getElementById("rxp-frame-close-"+d);n.style.marginLeft=parseInt(g.replace("px",""),10)/2-7+"px"}}else{j?b&&b.close():l.close();var o=e.data,p=document.createElement("form");p.setAttribute("method","POST"),p.setAttribute("action",f);var q=document.createElement("input");q.setAttribute("type","hidden"),q.setAttribute("name","hppResponse"),q.setAttribute("value",o),p.appendChild(q),document.body.appendChild(p),p.submit()}}var l=k.getInstance(g);document.getElementById(e).addEventListener?document.getElementById(e).addEventListener("click",l.lightbox,!0):document.getElementById(e).attachEvent("onclick",l.lightbox),window.addEventListener?window.addEventListener("message",h,!1):window.attachEvent("message",h)};return{init:l,setHppUrl:e}}(),RealexRemote=function(){"use strict";var a=function(a){if(!/^\d{12,19}$/.test(a))return!1;for(var b=0,c=0,d=0,e=!1,f=a.length-1;f>=0;f--)c=parseInt(a.substring(f,f+1),10),e?(d=2*c,d>9&&(d-=9)):d=c,b+=d,e=!e;var g=b%10;return 0!==g?!1:!0},b=function(a){return a&&a.trim()&&/^[\u0020-\u007E\u00A0-\u00FF]{1,100}$/.test(a)?!0:!1},c=function(a){return/^\d{3}$/.test(a)?!0:!1},d=function(a){return/^\d{4}$/.test(a)?!0:!1},e=function(a){if(!/^\d{4}$/.test(a))return!1;var b=parseInt(a.substring(0,2),10);parseInt(a.substring(2,4),10);return 1>b||b>12?!1:!0},f=function(a){if(!e(a))return!1;var b=parseInt(a.substring(0,2),10),c=parseInt(a.substring(2,4),10),d=new Date,f=d.getMonth()+1,g=d.getFullYear();return g%100>c?!1:c===g%100&&f>b?!1:!0};return{validateCardNumber:a,validateCardHolderName:b,validateCvn:c,validateAmexCvn:d,validateExpiryDateFormat:e,validateExpiryDateNotInPast:f}}(); \ No newline at end of file +var RealexHpp=function(){"use strict";function a(a){var b=document.createElement("a");return b.href=a,b.hostname}var b,c="https://pay.realexpayments.com/pay",d=d||Math.random().toString(16).substr(2,8),e=function(a){c=a},f=/Windows Phone|IEMobile/.test(navigator.userAgent),g=/Android|iPad|iPhone|iPod/.test(navigator.userAgent),h=!(((window.innerWidth>0?window.innerWidth:screen.width)<=360?0:1)&&((window.innerHeight>0?window.innerHeight:screen.Height)<=360?0:1)),i=f,j=!f&&(g||h),k=function(){function a(){function a(){return 90===window.orientation||-90===window.orientation?!0:!1}function e(){var a=document.createElement("div");a.setAttribute("id","rxp-overlay-"+d),a.style.position="fixed",a.style.width="100%",a.style.height="100%",a.style.top="0",a.style.left="0",a.style.transition="all 0.3s ease-in-out",a.style.zIndex="100",i&&(a.style.position="absolute !important",a.style.WebkitOverflowScrolling="touch",a.style.overflowX="hidden",a.style.overflowY="scroll"),document.body.appendChild(a),setTimeout(function(){a.style.background="rgba(0, 0, 0, 0.7)"},1),m=a}function f(){null===document.getElementById("rxp-frame-close-"+d)&&(p=document.createElement("img"),p.setAttribute("id","rxp-frame-close-"+d),p.setAttribute("src","data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzI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TkQx6fRSIHcPwA8Uy9A9Gcc47Xv+w2wzhRDYzqdVihLIbsIiCvP1NNOoX/29FQx3vgOgtt4FyRdCgPRarX4+goB9vkyAMh443cOEsIAAcjncuoI4TXWMAmCIGFhCQLAdZ8jym/cRJ+Y5nC5XCYAhINKpZLgSISZgoqh5iiLQrojAFICVwGS7tCfe5DbZzkP56XS4NVxwvTI/vXVVYIDnqmnnX70ZxzjNS8THHooK5hMpxHQIREA+tEfA9djfHR3MHkdx3Hspe9r3B+VzWaj2RESyR2mlCUE4MoGQDdxiwHURq2t94+PO9bMIYyTyDNLwMoM7g8+BfKeYGniyw2MdfSehF3Qmk1IvCc/AgwAaS86Etp38bUAAAAASUVORK5CYII="),p.setAttribute("style","transition: all 0.5s ease-in-out; opacity: 0; float: left; position: absolute; left: 50%; margin-left: 173px; z-index: 99999999; top: 30px;"),setTimeout(function(){p.style.opacity="1"},500),i&&(p.style.position="absolute",p.style["float"]="right",p.style.top="20px",p.style.left="initial",p.style.marginLeft="0px",p.style.right="20px"),p.addEventListener("click",l,!0),m.appendChild(p))}function g(a){var b=document.createElement("form");b.setAttribute("method","POST"),b.setAttribute("action",c);for(var d in q){var e=document.createElement("input");e.setAttribute("type","hidden"),e.setAttribute("name",d),e.setAttribute("value",q[d]),b.appendChild(e)}var f=document.createElement("input");f.setAttribute("type","hidden"),f.setAttribute("name","HPP_TEMPLATE_TYPE"),f.setAttribute("value","LIGHTBOX"),b.appendChild(f);var g=document.createElement("a");g.href=window.location.href;var h=g.protocol+"//"+g.host,i=document.createElement("input");return i.setAttribute("type","hidden"),i.setAttribute("name","HPP_ORIGIN"),i.setAttribute("value",h),b.appendChild(i),b}function h(){if(n=document.createElement("img"),n.setAttribute("src","data:image/gif;base64,R0lGODlhHAAcAPYAAP////OQHv338fzw4frfwPjIkPzx4/nVq/jKlfe7dv337/vo0fvn0Pzy5/WrVv38+vjDhva2bfzq1fe/f/vkyve8d/WoT/nRpP327ve9e/zs2vrWrPWqVPWtWfvmzve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RjOmEFgQCUMKZf8AKLgBAgiZNvkaURkSo8aUI+wAYJDSYcyONloibexIoYQwQS6oEPgxpOGMXPQOPdjCMFESCgcZHdFiYUROQ0dChCgRkRCFOg4cRMCCiIcGAjhCUDgq6AiHDhWyxShAhJACKFweJJHAAgoFQ1dfrAwQlKRMhAwpfnCZMkXEihqCHmAwUIXRkAgRoLiQgsIHABsrVDRl1OPMDQAPZIzAAcAEjRVzOT2gI+XTjREMBF0RUZMThhyyAGyYYGCQhtaoCJVQMjk3ISQafAtHFAgAIfkECQoAAAAsAAAAABwAHAAAB/+AAIKDhIWGh4iGD4mMh1UCjYkNXlWDSQKVgo+Rgkl3HZkCSEmdMwqcgnNOWoI8SDwAD0VFSKgAP05ONgACPLApKUUujAsesABIek46CkmuAjNFp4IPPIuEQ3p2dDgAJBEmhdAuLikDGljDhTY6OjtZM4guAlRYWFSZhmB9cF3Xhxg0aBjw75ABNVYaGcDACEkDA+EaVUmSJJ8gF2AmgDgRBkWkGQwWlJBA5ViSG3PqOHiTIFIDDwtESkhBqAqRKTgoROJRJAUmRlA8MHoggSEjA16yQKiFiEqMGFgSXaETQcsEKoiSYIlRI0YJdYRMuIkgxYcLCSs0gEVyxcq8K1NhhpQwxCDEgEE3WrQggsPHFCpQcGCNlYKIRUNXyrTA4aIHAigArOAYUrDRhgk0yF1YQQBAChwhGqB6IEbJNCMIpggaAOYKKgwXjAJggSAiAANHbBW6kgMsAN+6q7jWTfxQIAA7AAAAAAAAAAAA"),n.setAttribute("id","rxp-loader-"+d),n.style.left="50%",n.style.position="fixed",n.style.background="#FFFFFF",n.style.borderRadius="50%",n.style.width="30px",n.style.marginLeft="-15px",n.style.zIndex="200",n.style.marginLeft="-15px",n.style.top="120px",document.body.appendChild(n),o=document.createElement("iframe"),o.setAttribute("name","rxp-frame-"+d),o.setAttribute("id","rxp-frame-"+d),o.setAttribute("height","85%"),o.setAttribute("frameBorder","0"),o.setAttribute("width","360px"),o.setAttribute("seamless","seamless"),o.style.zIndex="10001",o.style.position="absolute",o.style.transition="transform 0.5s ease-in-out",o.style.transform="scale(0.7)",o.style.opacity="0",m.appendChild(o),i){o.style.top="0px",o.style.bottom="0px",o.style.left="0px",o.style.marginLeft="0px;",o.style.width="100%",o.style.height="100%",o.style.minHeight="100%",o.style.WebkitTransform="translate3d(0,0,0)",o.style.transform="translate3d(0, 0, 0)";var a=document.createElement("meta");a.name="viewport",a.content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0",document.getElementsByTagName("head")[0].appendChild(a)}else o.style.top="40px",o.style.left="50%",o.style.marginLeft="-180px";o.onload=function(){o.style.opacity="1",o.style.transform="scale(1)",n.parentNode&&n.parentNode.removeChild(n),f()};var b=g(document);o.contentWindow.document.body?o.contentWindow.document.body.appendChild(b):o.contentWindow.document.appendChild(b),b.submit()}function k(){b=window.open();var a=b.document,c=a.createElement("meta"),d=a.createAttribute("name");d.value="viewport",c.setAttributeNode(d);var e=a.createAttribute("content");e.value="width=device-width",c.setAttributeNode(e),a.head.appendChild(c);var f=g(a);a.body.appendChild(f),f.submit()}function l(){p.parentNode&&p.parentNode.removeChild(p),o.parentNode&&o.parentNode.removeChild(o),n.parentNode&&n.parentNode.removeChild(n),m.className="",setTimeout(function(){m.parentNode&&m.parentNode.removeChild(m)},300)}var m,n,o,p,q,r=a();return i&&window.addEventListener&&window.addEventListener("orientationchange",function(){r=a()},!1),{lightbox:function(){j?k():(e(),h())},close:function(){l()},setToken:function(a){q=a}}}var e;return{getInstance:function(b){return e||(e=a()),e.setToken(b),e}}}(),l=function(e,f,g){function h(e){if(a(e.origin)===a(c))if(e.data&&JSON.parse(e.data).iframe){if(!j){var g=JSON.parse(e.data).iframe.width,h=JSON.parse(e.data).iframe.height,k=document.getElementById("rxp-frame-"+d);if(k.setAttribute("width",g),k.setAttribute("height",h),k.style.backgroundColor="#ffffff",i){var m=document.getElementById("rxp-overlay-"+d);k.style.marginLeft="0px",k.style.WebkitOverflowScrolling="touch",k.style.overflowX="scroll",k.style.overflowY="scroll",m.style.overflowX="scroll",m.style.overflowY="scroll"}else k.style.marginLeft=parseInt(g.replace("px",""),10)/2*-1+"px";var n=document.getElementById("rxp-frame-close-"+d);n.style.marginLeft=parseInt(g.replace("px",""),10)/2-7+"px"}}else{j?b&&b.close():l.close();var o=e.data,p=document.createElement("form");p.setAttribute("method","POST"),p.setAttribute("action",f);var q=document.createElement("input");q.setAttribute("type","hidden"),q.setAttribute("name","hppResponse"),q.setAttribute("value",o),p.appendChild(q),document.body.appendChild(p),p.submit()}}var l=k.getInstance(g);document.getElementById(e).addEventListener?document.getElementById(e).addEventListener("click",l.lightbox,!0):document.getElementById(e).attachEvent("onclick",l.lightbox),window.addEventListener?window.addEventListener("message",h,!1):window.attachEvent("message",h)};return{init:l,setHppUrl:e}}(),RealexRemote=function(){"use strict";var a=function(a){if(!/^\d{12,19}$/.test(a))return!1;for(var b=0,c=0,d=0,e=!1,f=a.length-1;f>=0;f--)c=parseInt(a.substring(f,f+1),10),e?(d=2*c,d>9&&(d-=9)):d=c,b+=d,e=!e;var g=b%10;return 0!==g?!1:!0},b=function(a){return a&&a.trim()&&/^[\u0020-\u007E\u00A0-\u00FF]{1,100}$/.test(a)?!0:!1},c=function(a){return/^\d{3}$/.test(a)?!0:!1},d=function(a){return/^\d{4}$/.test(a)?!0:!1},e=function(a){if(!/^\d{4}$/.test(a))return!1;var b=parseInt(a.substring(0,2),10);parseInt(a.substring(2,4),10);return 1>b||b>12?!1:!0},f=function(a){if(!e(a))return!1;var b=parseInt(a.substring(0,2),10),c=parseInt(a.substring(2,4),10),d=new Date,f=d.getMonth()+1,g=d.getFullYear();return g%100>c?!1:c===g%100&&f>b?!1:!0};return{validateCardNumber:a,validateCardHolderName:b,validateCvn:c,validateAmexCvn:d,validateExpiryDateFormat:e,validateExpiryDateNotInPast:f}}(); \ No newline at end of file diff --git a/lib/rxp-hpp.js b/lib/rxp-hpp.js index f6bd7e1..e8dd7b6 100644 --- a/lib/rxp-hpp.js +++ b/lib/rxp-hpp.js @@ -3,7 +3,7 @@ var RealexHpp = (function() { 'use strict'; - var hppUrl = "https://hpp.realexpayments.com/pay"; + var hppUrl = "https://pay.realexpayments.com/pay"; var randomId = randomId || Math.random().toString(16).substr(2,8); diff --git a/package.json b/package.json index 88b38d3..27ffac3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "rxp-js", "description": "The official Realex Payments JS SDK", - "version": "1.2.0", + "version": "1.2.1", "homepage": "https://github.com/realexpayments/rxp-js", "author": { "name": "Realex Developer", From 13b9cccf3d2d0e17c45e20b58b26b87217f9ea04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=C3=A1n=20MacDomhnall?= Date: Wed, 7 Dec 2016 16:57:46 +0000 Subject: [PATCH 2/3] Updated license. --- LICENSE-MIT | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE-MIT b/LICENSE-MIT index a6632e9..7465ffc 100644 --- a/LICENSE-MIT +++ b/LICENSE-MIT @@ -1,4 +1,4 @@ -Copyright (c) 2015 Realex Developer +Copyright (c) 2016 Realex Developer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation From 5acff9f3f5abac8f6003e0b58ddc614872f243a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=C3=A1n=20MacDomhnall?= Date: Fri, 9 Dec 2016 08:36:34 +0000 Subject: [PATCH 3/3] Updated license. --- LICENSE-MIT | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE-MIT b/LICENSE-MIT index 7465ffc..7343e97 100644 --- a/LICENSE-MIT +++ b/LICENSE-MIT @@ -1,4 +1,4 @@ -Copyright (c) 2016 Realex Developer +Copyright (c) 2017 Realex Payments Developer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation