From 9345717b2fc60de4b9325a47d7377187102a6439 Mon Sep 17 00:00:00 2001 From: Andrei Stelian Humulescu Date: Tue, 20 Feb 2024 11:37:29 +0200 Subject: [PATCH 1/3] Allow digital wallets payments when the mode is set to lightbox --- dist/rxp-js.js | 14 +++++++++++++- dist/rxp-js.min.js | Bin 52326 -> 48954 bytes 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/dist/rxp-js.js b/dist/rxp-js.js index 25b768c..7adbbf5 100644 --- a/dist/rxp-js.js +++ b/dist/rxp-js.js @@ -1,4 +1,4 @@ -/*! rxp-js - v1.5.2 - 2023-06-08 +/*! rxp-js - v1.5.3 - 2024-02-22 * The official Realex Payments JS Library * https://github.com/realexpayments/rxp-js * Licensed MIT @@ -423,6 +423,7 @@ var RealexHpp = (function () { iFrame.setAttribute("frameBorder", "0"); iFrame.setAttribute("width", "360px"); iFrame.setAttribute("seamless", "seamless"); + iFrame.setAttribute("allow", "payment " + internal.getBaseUrl(hppUrl)); iFrame.style.zIndex = "10001"; iFrame.style.position = "absolute"; @@ -554,6 +555,17 @@ var RealexHpp = (function () { return internal.getUrlParser(url).hostname; }, + /** + * Gets the base URL from a URL. Used to set the 'allow payment' attribute. + * + * @param {string} url + * @returns the base URL of the provided URL + */ + getBaseUrl: function (url) { + var urlParser = internal.getUrlParser(url); + return urlParser.protocol + '//' + urlParser.hostname; + }, + /** * Checks if the origin is HPP. * diff --git a/dist/rxp-js.min.js b/dist/rxp-js.min.js index 601348c39627b7bbaa073057a42e25fa4921ce06..484eca66f21e0a4f63359f1b2848eba92c01b820 100644 GIT binary patch delta 5761 zcmbtY3s6+&6}~GVBFio;k7XB@eeu|Z1(t^pSP-zrXE3JKq-sbc_#6>X0R=&k8XqKp zaMT)2h$JR4Hj0$^$cu>4#Mm^AX(yA;G?t{Dq|-+d(o7$jHtl!*dlz=mPCL`txp)8j zKhA&t@0|0UbML1|0$%=h%7Ns#9LXZ3h_;>ZPS~)@x^^JEfWUWsk4O z<`F3eDppDB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subject: [PATCH 2/3] Allow digital wallets payments when the mode is set to lightbox --- examples/hpp/json/process-a-payment.json | 5 ++--- lib/rxp-hpp.js | 12 ++++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/examples/hpp/json/process-a-payment.json b/examples/hpp/json/process-a-payment.json index 65f9409..ab7c127 100644 --- a/examples/hpp/json/process-a-payment.json +++ b/examples/hpp/json/process-a-payment.json @@ -1,10 +1,9 @@ { "MERCHANT_ID": "heartlandgpsandbox", - "ACCOUNT": "3dsecure", - "AMOUNT": "1001", + "ACCOUNT": "hpp", + "AMOUNT": "1000", "CURRENCY": "EUR", "AUTO_SETTLE_FLAG": "1", - "PM_METHODS": "cards", "HPP_CUSTOMER_EMAIL": "test@example.com", "HPP_CUSTOMER_PHONENUMBER_MOBILE": "44|789456123", diff --git a/lib/rxp-hpp.js b/lib/rxp-hpp.js index c658b82..1e470f5 100644 --- a/lib/rxp-hpp.js +++ b/lib/rxp-hpp.js @@ -419,6 +419,7 @@ var RealexHpp = (function () { iFrame.setAttribute("frameBorder", "0"); iFrame.setAttribute("width", "360px"); iFrame.setAttribute("seamless", "seamless"); + iFrame.setAttribute("allow", "payment " + internal.getBaseUrl(hppUrl)); iFrame.style.zIndex = "10001"; iFrame.style.position = "absolute"; @@ -550,6 +551,17 @@ var RealexHpp = (function () { return internal.getUrlParser(url).hostname; }, + /** + * Gets the base URL from a URL. Used to set the 'allow payment' attribute. + * + * @param {string} url + * @returns the base URL of the provided URL + */ + getBaseUrl: function (url) { + var urlParser = internal.getUrlParser(url); + return urlParser.protocol + '//' + urlParser.hostname; + }, + /** * Checks if the origin is HPP. * From 02a6b7953dddc2279ff157c088d47c0d26eda5da Mon Sep 17 00:00:00 2001 From: Andrei Stelian Humulescu Date: Mon, 4 Mar 2024 18:36:41 +0200 Subject: [PATCH 3/3] Version bump --- CHANGELOG.md | 9 ++++++--- dist/rxp-js.js | 2 +- dist/rxp-js.min.js | Bin 48954 -> 48954 bytes 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5a91c9..784e207 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,15 @@ - Global Payments logo + Global Payments logo # Changelog -## Latest Version +## Latest Version - v1.5.3 (03/04/24) +#### Enhancements: +- Allow digital wallets payments when the mode is set to lightbox + +## v1.5.2 (06/08/23) #### Enhancements: - Allow the communication from Unified Payments - Update for the code examples - --- diff --git a/dist/rxp-js.js b/dist/rxp-js.js index 7adbbf5..243961e 100644 --- a/dist/rxp-js.js +++ b/dist/rxp-js.js @@ -1,4 +1,4 @@ -/*! rxp-js - v1.5.3 - 2024-02-22 +/*! rxp-js - v1.5.3 - 2024-03-04 * The official Realex Payments JS Library * https://github.com/realexpayments/rxp-js * Licensed MIT diff --git a/dist/rxp-js.min.js b/dist/rxp-js.min.js index 484eca66f21e0a4f63359f1b2848eba92c01b820..772ed57f7117b08029fa5589741a61df790394b4 100644 GIT binary patch delta 20 ccmdn>k7?IGrU_Q;#tga)1`H+}9e?fv099!Rvj6}9 delta 20 ccmdn>k7?IGrU_Q;Mhv