Jump to content

Εθνική simplify firefox bug


 Share

Recommended Posts

Πρέπει να έκαναν κάποιο update και στον firefox όταν είσαι στο checkout εξαφανίζετε το πλαϊνό scroll και δεν μπορεί ο πελάτης να ολοκληρώσει την παραγγελία. Σε chrome και safari παίζει κανονικά.

Τους έχω ενημερώσει.

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Επειδή στην Εθνική πέρα βρέχει .

Temporary Fix.

Το πρόβλημα είναι ότι εφαρμόζετε ο κανόνας

overflow: hidden !important;

στο body. Όπου εφαρμόζετε με το remote js που τρέχει από το 'www.simplify.com/commerce/simplify.pay.js'.

Μία λύση είναι να φιλοξενήσουμε το js στον server μας και να κάνουμε τις αλλαγές που θέλουμε.

Οπότε κατεβάζουμε το js, κάνουμε beautify τον κώδικα για να είναι human readable και στην function b() στην γραμμή 272 (εξαρτάτε από τον beautifier) αφαιρούμε ή κάνουμε comment το overflow: hidden !important; και αποθηκεύουμε το js στον server μας.

Μετά κάνουμε edit το modules/simplifycommerce/simplifycommerce.php και στην γραμμή 114 αλλάζουμε το path του js από

'https://www.simplify.com/commerce/simplify.pay.js',

σε

'https://www.example.gr/example/path/to/js/simplify.pay.js',

όπου θα βάλετε το path που βάλατε το js.

Φυσικά θα πρέπει να παρακολουθείτε πότε θα το διορθώσουν ή όταν κάνουν update ώστε να το ενημερώσετε ή να το γυρίσετε πάλι σε 'live'

Ακολουθεί το simplify.pay.js διορθωμένο.

/**
 * https://www.simplify.com/commerce/docs
 *
 * Copyright (c) 2013, MasterCard International Incorporated
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification, are
 * permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice, this list of
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list of
 * conditions and the following disclaimer in the documentation and/or other materials
 * provided with the distribution.
 * Neither the name of the MasterCard International Incorporated nor the names of its
 * contributors may be used to endorse or promote products derived from this software
 * without specific prior written permission.
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
 * SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */
! function()
{
	function t(t)
	{
		this.message = t
	}
	var r = "undefined" != typeof exports ? exports : this,
		e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
	t.prototype = new Error, t.prototype.name = "InvalidCharacterError", r.btoa || (r.btoa = function(r)
	{
		for (var o, n, a = String(r), i = 0, c = e, d = ""; a.charAt(0 | i) || (c = "=", i % 1); d += c.charAt(63 & o >> 8 - i % 1 * 8))
		{
			if (n = a.charCodeAt(i += .75), n > 255) throw new t("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");
			o = o << 8 | n
		}
		return d
	}), r.atob || (r.atob = function(r)
	{
		var o = String(r).replace(/=+$/, "");
		if (o.length % 4 == 1) throw new t("'atob' failed: The string to be decoded is not correctly encoded.");
		for (var n, a, i = 0, c = 0, d = ""; a = o.charAt(c++); ~a && (n = i % 4 ? 64 * n + a : a, i++ % 4) ? d += String.fromCharCode(255 & n >> (-2 * i & 6)) : 0) a = e.indexOf(a);
		return d
	})
}();
/* "simplify" - v1.0.0 - 2020-06-04 */
! function(a, b)
{
	function c(a)
	{
		if ("https://www.simplify.com" === a.origin)
		{
			var b = JSON.parse(a.data);
			if ("function" == typeof m) m(b), q && d();
			else if (b.redirectUrl)
			{
				var c = -1 === b.redirectUrl.indexOf("?") ? "?" : "&";
				window.location.href = b.redirectUrl + c + b.queryString
			}
			b.close && d()
		}
	}

	function d()
	{
		y.closeFrame(), x.destroy()
	}

	function e()
	{
		return r || "DEVELOPMENT" === o && !f()
	}

	function f()
	{
		return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
	}

	function g(a)
	{
		return a && -1 !== a.indexOf("sbpb_")
	}

	function h()
	{
		var a = this;
		a.initialized = !1, a.defaultOptions = {
			embed: !0
		}, h.prototype.init = function()
		{
			var b = k.findElementsByAttributeName("iframe", w);
			if (0 === b.length && a.defaultOptions.selector && (b = document.querySelectorAll(a.defaultOptions.selector)), !a.initialized && 1 === b.length)
			{
				a.initialized = !0;
				var c = b[0];
				k.mergeDataAttributes(c, a.defaultOptions), c.setAttribute("id", u), a.inject(c)
			}
		}, h.prototype.inject = function(b)
		{
			var c = k.extend(k.data(b), a.defaultOptions),
				d = g(c.scKey);
			y.validateDomain(c, function()
			{
				if (d || "DEVELOPMENT" === o || r && !d)
				{
					var e = a.getFormLauncher(b.getAttribute("name"), c);
					e.submit()
				}
			})
		}, h.prototype.getFormLauncher = function(a, b)
		{
			var c = "https://www.simplify.com/commerce/pay/",
				d = "post";
			b.id ? (c = "https://www.simplify.com/commerce/pay/" + b.scKey + "/" + b.id, d = "get") : b.store && (c = "https://www.simplify.com/commerce/store/" + b.store, d = "get");
			var f = k.createElement("form",
			{
				action: c,
				method: d
			});
			f.setAttribute("id", "simplify-checkout-form"), f.appendChild(k.createElement("input",
			{
				type: "hidden",
				name: "hostname",
				value: location.hostname
			})), f.appendChild(k.createElement("input",
			{
				type: "hidden",
				name: "callback",
				value: !!m
			})), f.appendChild(k.createElement("input",
			{
				type: "hidden",
				name: "requestToken",
				value: s
			})), (e(b.scKey) || b.embed || b.forcemodal) && f.setAttribute("target", a);
			for (var g in b)
				if (b.hasOwnProperty(g))
				{
					var h = "scKey" === g ? "publicKey" : g,
						i = "operation" === g ? b[g].replace(/\./, "_").toUpperCase() : b[g];
					f.appendChild(k.createElement("input",
					{
						type: "hidden",
						name: h,
						value: i
					}))
				} var j = document.body || document.getElementsByTagName("body")[0];
			return j.appendChild(f), f
		}
	}

	function i()
	{
		function a(a)
		{
			if (a && a.form)
			{
				var b = document.body || document.getElementsByTagName("body")[0];
				b.removeChild(a.form), a.form = void 0
			}
		}
		this.defaultOptions = {};
		var b = [];
		i.prototype.build = function(a)
		{
			this.destroy();
			var d = k.findElementsByAttributeName("button", w, a);
			0 === d.length && this.defaultOptions.selector && (d = document.querySelectorAll(this.defaultOptions.selector));
			for (var e = 0, f = d.length; f > e; e++) d[e].scButton || b.push(new c(d[e]));
			return b
		}, i.prototype.destroy = function()
		{
			for (var c = 0, d = b.length; d > c; c++) b[c] && b[c].button && b[c].button.scButton && a(b[c].button.scButton);
			return b
		}, i.prototype.hasButtons = function()
		{
			return b && b.length > 0
		}, i.prototype.getButtonKey = function()
		{
			var a = "";
			return b && b.length > 0 && (a = b[0].button.options.scKey), a
		};
		var c = function(a)
		{
			function b(a)
			{
				var b = a.options,
					c = z.getFormLauncher(t, b),
					d = document.body || document.getElementsByTagName("body")[0];
				return d.appendChild(c), c
			}

			function c(a, b)
			{
				var c = "sc-style-" + b;
				if (!document.getElementById(c))
				{
					var d = k.darkerColor(a),
						e = k.darkerColor(d),
						f = "button#" + b,
						g = f + "{font-size:14px !important;color:#FFF !important;background-color:" + a + " !important;border-radius:3px !important;-webkit-border-radius:3px !important;padding:9px 22px !important;margin:1px 6px !important;cursor:pointer !important;border:1px solid " + e + " !important;font-family:arial,sans-serif !important;letter-spacing:0.3px !important;}" + f + ":hover{background-color:" + d + " !important;}",
						h = document.head || document.getElementsByTagName("head")[0],
						i = document.createElement("style");
					i.type = "text/css", i.id = c, i.styleSheet ? i.styleSheet.cssText = g : i.appendChild(document.createTextNode(g)), h.appendChild(i)
				}
			}
			this.button = a, a.scButton = {};
			var d = a.getAttribute("id") || "sc_btn_" + (new Date).getTime();
			a.setAttribute("id", d);
			var f = k.extend(k.data(a), x.defaultOptions);
			a.options = f, a.setAttribute("type", "button"), f.color && !f.color.match(/^#[0-9a-fA-F]{6}$/) && k.warn('"' + f.color + '" is not a valid hex color code.'), f.unstyled || c(f.color || "#ED5F00", d), a.scButton.scClick = function()
			{
				f = k.extend(f, x.defaultOptions), y.validateDomain(f, function()
				{
					if (e(a.options.scKey)) a.scButton.form = b(a), a.scButton.form.submit(), y.showFrame();
					else
					{
						var c = document.getElementById(v);
						c.submit(), y.showFrame(), setTimeout(function()
						{
							a.scButton.form = b(a), a.scButton.form.submit()
						}, 1e3)
					}
				})
			}, k.attachEvent(a, "click", a.scButton.scClick)
		};
		return this
	}

	function j()
	{
		function a()
		{
			if (!d)
			{
				var a = f() ? "absolute" : "fixed";
				d = k.createElement("iframe",
				{
					id: "simplify-checkout-frame",
					name: t,
					frameborder: "0",
					allowtransparency: "true",
					style: "z-index: 9999; display: none; visibility: hidden; background: none repeat scroll 0% 0% transparent; border: 0px none transparent; overflow-x: hidden; overflow-y: auto; margin: 0px; padding: 0px; position: " + a + "; left: 0px; top: 0px; width: 100%; height: 100%;"
				}), document.body.insertBefore(d, document.body.firstChild), e(x.getButtonKey()) ? (h = k.createElement("img",
				{
					src: "https://www.simplify.com/commerce/static/images/ajax_loader_gray_64.gif",
					id: "simplify-loading",
					style: "position:fixed;top:50%;left:50%;width:64px;height:64px;margin-top:-32px;margin-left:-32px;z-index:99999!important;display:none;",
					alt: "Loading gif"
				}), document.body.insertBefore(h, document.body.firstChild)) : document.body.insertBefore(k.createElement("form",
				{
					id: v,
					method: "GET",
					action: "https://www.simplify.com/commerce/pay/loading",
					target: t
				}), document.body.firstChild), d.onload = function(a)
				{
					clearTimeout(i), e() && b(), k.setVisibility(d, !0), k.hide(h)
				}
			}
		}

		function b()
		{
			var a = "html, body { width: 100% !important; height: 100% !important; }",
				b = document.head || document.getElementsByTagName("head")[0],
				c = document.createElement("style");
			c.type = "text/css", c.id = "sc-style-modal", c.styleSheet ? c.styleSheet.cssText = a : c.appendChild(document.createTextNode(a)), b.appendChild(c)
		}

		function c()
		{
			var a = document.getElementById("sc-style-modal");
			a.parentNode.removeChild(a)
		}
		var d, h, i;
		return j.prototype.validateDomain = function(a, b)
		{
			if (g(a.scKey) || "create.token" === a.operation) return void(b && b());
			var c = k.createElement("iframe",
			{
				src: "https://www.simplify.com/commerce/checkout/validateDomain?key=" + a.scKey,
				allowtransparency: "true",
				style: "z-index: 0; display: none; visibility: hidden;"
			});
			document.body.insertBefore(c, document.body.firstChild), c.onload = function(a)
			{
				c.contentWindow.postMessage("validate", p)
			}, k.attachEvent(window, "message", function(a)
			{
				var c = JSON.parse(a.data);
				"undefined" != typeof c.requestToken && (s = c.requestToken), "undefined" != typeof c.hostedPaymentEnabled && b && b()
			})
		}, j.prototype.init = function()
		{
			x.hasButtons() && a()
		}, j.prototype.showFrame = function()
		{
			k.show(d), k.show(h), i || (i = setTimeout(function()
			{
				alert("Looks like something's not working.  Please try again"), d.closeFrame()
			}, 2e4))
		}, j.prototype.closeFrame = function()
		{
			k.hide(d), document.getElementById("sc-style-modal") && c(), k.setVisibility(d, !1), k.hide(h)
		}, j.prototype.postMessage = function(a)
		{
			document.getElementById(u).contentWindow.postMessage(JSON.stringify(a), "*")
		}, this
	}
	b["true"] = a,
		function(a)
		{
			"use strict";

			function b(a, b)
			{
				var c = (65535 & a) + (65535 & b),
					d = (a >> 16) + (b >> 16) + (c >> 16);
				return d << 16 | 65535 & c
			}

			function c(a, b)
			{
				return a << b | a >>> 32 - b
			}

			function d(a, d, e, f, g, h)
			{
				return b(c(b(b(d, a), b(f, h)), g), e)
			}

			function e(a, b, c, e, f, g, h)
			{
				return d(b & c | ~b & e, a, b, f, g, h)
			}

			function f(a, b, c, e, f, g, h)
			{
				return d(b & e | c & ~e, a, b, f, g, h)
			}

			function g(a, b, c, e, f, g, h)
			{
				return d(b ^ c ^ e, a, b, f, g, h)
			}

			function h(a, b, c, e, f, g, h)
			{
				return d(c ^ (b | ~e), a, b, f, g, h)
			}

			function i(a, c)
			{
				a[c >> 5] |= 128 << c % 32, a[(c + 64 >>> 9 << 4) + 14] = c;
				var d, i, j, k, l, m = 1732584193,
					n = -271733879,
					o = -1732584194,
					p = 271733878;
				for (d = 0; d < a.length; d += 16) i = m, j = n, k = o, l = p, m = e(m, n, o, p, a[d], 7, -680876936), p = e(p, m, n, o, a[d + 1], 12, -389564586), o = e(o, p, m, n, a[d + 2], 17, 606105819), n = e(n, o, p, m, a[d + 3], 22, -1044525330), m = e(m, n, o, p, a[d + 4], 7, -176418897), p = e(p, m, n, o, a[d + 5], 12, 1200080426), o = e(o, p, m, n, a[d + 6], 17, -1473231341), n = e(n, o, p, m, a[d + 7], 22, -45705983), m = e(m, n, o, p, a[d + 8], 7, 1770035416), p = e(p, m, n, o, a[d + 9], 12, -1958414417), o = e(o, p, m, n, a[d + 10], 17, -42063), n = e(n, o, p, m, a[d + 11], 22, -1990404162), m = e(m, n, o, p, a[d + 12], 7, 1804603682), p = e(p, m, n, o, a[d + 13], 12, -40341101), o = e(o, p, m, n, a[d + 14], 17, -1502002290), n = e(n, o, p, m, a[d + 15], 22, 1236535329), m = f(m, n, o, p, a[d + 1], 5, -165796510), p = f(p, m, n, o, a[d + 6], 9, -1069501632), o = f(o, p, m, n, a[d + 11], 14, 643717713), n = f(n, o, p, m, a[d], 20, -373897302), m = f(m, n, o, p, a[d + 5], 5, -701558691), p = f(p, m, n, o, a[d + 10], 9, 38016083), o = f(o, p, m, n, a[d + 15], 14, -660478335), n = f(n, o, p, m, a[d + 4], 20, -405537848), m = f(m, n, o, p, a[d + 9], 5, 568446438), p = f(p, m, n, o, a[d + 14], 9, -1019803690), o = f(o, p, m, n, a[d + 3], 14, -187363961), n = f(n, o, p, m, a[d + 8], 20, 1163531501), m = f(m, n, o, p, a[d + 13], 5, -1444681467), p = f(p, m, n, o, a[d + 2], 9, -51403784), o = f(o, p, m, n, a[d + 7], 14, 1735328473), n = f(n, o, p, m, a[d + 12], 20, -1926607734), m = g(m, n, o, p, a[d + 5], 4, -378558), p = g(p, m, n, o, a[d + 8], 11, -2022574463), o = g(o, p, m, n, a[d + 11], 16, 1839030562), n = g(n, o, p, m, a[d + 14], 23, -35309556), m = g(m, n, o, p, a[d + 1], 4, -1530992060), p = g(p, m, n, o, a[d + 4], 11, 1272893353), o = g(o, p, m, n, a[d + 7], 16, -155497632), n = g(n, o, p, m, a[d + 10], 23, -1094730640), m = g(m, n, o, p, a[d + 13], 4, 681279174), p = g(p, m, n, o, a[d], 11, -358537222), o = g(o, p, m, n, a[d + 3], 16, -722521979), n = g(n, o, p, m, a[d + 6], 23, 76029189), m = g(m, n, o, p, a[d + 9], 4, -640364487), p = g(p, m, n, o, a[d + 12], 11, -421815835), o = g(o, p, m, n, a[d + 15], 16, 530742520), n = g(n, o, p, m, a[d + 2], 23, -995338651), m = h(m, n, o, p, a[d], 6, -198630844), p = h(p, m, n, o, a[d + 7], 10, 1126891415), o = h(o, p, m, n, a[d + 14], 15, -1416354905), n = h(n, o, p, m, a[d + 5], 21, -57434055), m = h(m, n, o, p, a[d + 12], 6, 1700485571), p = h(p, m, n, o, a[d + 3], 10, -1894986606), o = h(o, p, m, n, a[d + 10], 15, -1051523), n = h(n, o, p, m, a[d + 1], 21, -2054922799), m = h(m, n, o, p, a[d + 8], 6, 1873313359), p = h(p, m, n, o, a[d + 15], 10, -30611744), o = h(o, p, m, n, a[d + 6], 15, -1560198380), n = h(n, o, p, m, a[d + 13], 21, 1309151649), m = h(m, n, o, p, a[d + 4], 6, -145523070), p = h(p, m, n, o, a[d + 11], 10, -1120210379), o = h(o, p, m, n, a[d + 2], 15, 718787259), n = h(n, o, p, m, a[d + 9], 21, -343485551), m = b(m, i), n = b(n, j), o = b(o, k), p = b(p, l);
				return [m, n, o, p]
			}

			function j(a)
			{
				var b, c = "";
				for (b = 0; b < 32 * a.length; b += 8) c += String.fromCharCode(a[b >> 5] >>> b % 32 & 255);
				return c
			}

			function k(a)
			{
				var b, c = [];
				for (c[(a.length >> 2) - 1] = void 0, b = 0; b < c.length; b += 1) c[b] = 0;
				for (b = 0; b < 8 * a.length; b += 8) c[b >> 5] |= (255 & a.charCodeAt(b / 8)) << b % 32;
				return c
			}

			function l(a)
			{
				return j(i(k(a), 8 * a.length))
			}

			function m(a, b)
			{
				var c, d, e = k(a),
					f = [],
					g = [];
				for (f[15] = g[15] = void 0, e.length > 16 && (e = i(e, 8 * a.length)), c = 0; 16 > c; c += 1) f[c] = 909522486 ^ e[c], g[c] = 1549556828 ^ e[c];
				return d = i(f.concat(k(b)), 512 + 8 * b.length), j(i(g.concat(d), 640))
			}

			function n(a)
			{
				var b, c, d = "0123456789abcdef",
					e = "";
				for (c = 0; c < a.length; c += 1) b = a.charCodeAt(c), e += d.charAt(b >>> 4 & 15) + d.charAt(15 & b);
				return e
			}

			function o(a)
			{
				return unescape(encodeURIComponent(a))
			}

			function p(a)
			{
				return l(o(a))
			}

			function q(a)
			{
				return n(p(a))
			}

			function r(a, b)
			{
				return m(o(a), o(b))
			}

			function s(a, b)
			{
				return n(r(a, b))
			}

			function t(a, b, c)
			{
				return b ? c ? r(b, a) : s(b, a) : c ? p(a) : q(a)
			}
			"function" == typeof define && define.amd ? define(function()
			{
				return t
			}) : a.md5 = t
		}(this);
	var k = {
		attachEvent: function(a, b, c)
		{
			a.addEventListener ? a.addEventListener(b, c, !1) : a.attachEvent && a.attachEvent("on" + b, c)
		},
		createElement: function(a, b)
		{
			var c = document.createElement(a);
			for (var d in b) b.hasOwnProperty(d) && ("text" === d ? c.appendChild(document.createTextNode(b[d])) : c.setAttribute(d, b[d]));
			return c
		},
		data: function(a)
		{
			for (var b = a.attributes, c = {}, d = 0, e = b.length; e > d; d++)
			{
				var f = b[d],
					g = f.name.match("^data-(.+)$");
				if (null !== g)
				{
					var h = k.camelCase(g[1]);
					c[h] = f.value
				}
			}
			return c
		},
		camelCase: function(a)
		{
			return a ? a.toLowerCase().replace(/-(.)/g, function(a, b)
			{
				return b.toUpperCase()
			}) : a
		},
		findElementsByAttributeName: function(a, b)
		{
			for (var c = [], d = document.getElementsByTagName(a), e = 0, f = d.length; f > e; e++) d[e].getAttribute(b) && c.push(d[e]);
			return c
		},
		mergeDataAttributes: function(a, b)
		{
			for (var c = 0, d = a.length; d > c; c++)
				for (var e in b) a[c].setAttribute("data-" + e.replace(/[A-Z]/g, "-$&").toLowerCase(), b[e])
		},
		extend: function(a, b)
		{
			a = a ||
			{};
			for (var c in b) "object" == typeof b[c] ? a[c] = extend(a[c], b[c]) : a[c] = b[c];
			return a
		},
		log: function(a)
		{
			window.console
		},
		warn: function(a)
		{
			window.console
		},
		tintedColor: function(a, b)
		{
			if ("undefined" == typeof a) return a;
			a.length > 6 && (a = a.substring(1, a.length));
			var c = parseInt(a, 16),
				d = Math.abs((c >> 16 & 255) + b);
			d > 255 && (d -= d - 255);
			var e = Math.abs((c >> 8 & 255) + b);
			e > 255 && (e -= e - 255);
			var f = Math.abs((255 & c) + b);
			return f > 255 && (f -= f - 255), d = Number(0 > d || isNaN(d)) ? 0 : (d > 255 ? 255 : d).toString(16), 1 == d.length && (d = "0" + d), e = Number(0 > e || isNaN(e)) ? 0 : (e > 255 ? 255 : e).toString(16), 1 == e.length && (e = "0" + e), f = Number(0 > f || isNaN(f)) ? 0 : (f > 255 ? 255 : f).toString(16), 1 == f.length && (f = "0" + f), "#" + d + e + f
		},
		darkerColor: function(a)
		{
			return k.tintedColor(a, -10)
		},
		hide: function(a)
		{
			a && (a.style.display = "none")
		},
		show: function(a)
		{
			a && (a.style.display = "block")
		},
		setVisibility: function(a, b)
		{
			a && (a.style.visibility = b ? "visible" : "hidden")
		},
		stripUrl: function(a)
		{
			var b = a ? a.replace(/^(https?):\/\//, "").replace("www.", "") : "";
			return b
		},
		isDomainFamily: function(a, b)
		{
			var c = k.stripUrl(a);
			return c === b || (a ? a.endsWith("." + b) : !1)
		}
	};
	String.prototype.endsWith || (String.prototype.endsWith = function(a, b)
	{
		var c = this.toString();
		("number" != typeof b || !isFinite(b) || Math.floor(b) !== b || b > c.length) && (b = c.length), b -= a.length;
		var d = c.lastIndexOf(a, b);
		return -1 !== d && d === b
	});
	var l = function()
	{
		function a()
		{
			if (!d)
			{
				d = !0;
				for (var a = 0; a < c.length; a++) c[a].fn.call(window, c[a].ctx);
				c = []
			}
		}

		function b()
		{
			"complete" === document.readyState && a()
		}
		var c = [],
			d = !1,
			e = !1;
		return function(f, g)
		{
			return d ? void setTimeout(function()
			{
				f(g)
			}, 1) : (c.push(
			{
				fn: f,
				ctx: g
			}), void("complete" === document.readyState ? setTimeout(a, 1) : e || (document.addEventListener ? (document.addEventListener("DOMContentLoaded", a, !1), window.addEventListener("load", a, !1)) : (document.attachEvent("onreadystatechange", b), window.attachEvent("onload", a)), e = !0)))
		}
	}();
	window.SimplifyCommerce = window.SimplifyCommerce ||
	{};
	var m, n = !1,
		o = "PRODUCTION",
		p = "https://www.simplify.com/commerce",
		q = !1,
		r = "https:" === document.location.protocol,
		s = "",
		t = "simplify-checkout",
		u = "simplify-checkout-embed-frame",
		v = "simplify-checkout-loading-form",
		w = "data-sc-key",
		x = new i,
		y = new j,
		z = new h;
	window.SimplifyCommerce.hostedPayments = window.SimplifyCommerce.pay = function(a, b, c)
	{
		if (m = a, k.extend(x.defaultOptions, b), k.extend(z.defaultOptions, b), z.init(), x.build(), y.init(), this.closeOnCompletion = function()
			{
				q = !0
			}, this.enablePayBtn = function()
			{
				y.postMessage(
				{
					name: "enableForm",
					value: "true"
				})
			}, c)
		{
			var d = "button" === c.tagName.toLowerCase() ? [c] : c.getElementsByTagName("button");
			d.length > 0 && (k.mergeDataAttributes(d, b), x.build(), y.init())
		}
		return this
	}, l(function()
	{
		n || (z.init(), x.build(), y.init(), k.attachEvent(window, "message", c), n = !0)
	})
}(
{}, function()
{
	return this
}());

 

Share this post


Link to post
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More