Advertisement
Kappapastes

Untitled

Mar 6th, 2020
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.02 KB | None | 0 0
  1. ! function(e) {
  2. var t = {};
  3.  
  4. function n(a) {
  5. if (t[a]) return t[a].exports;
  6. var i = t[a] = {
  7. i: a,
  8. l: !1,
  9. exports: {}
  10. };
  11. return e[a].call(i.exports, i, i.exports, n), i.l = !0, i.exports
  12. }
  13. n.m = e, n.c = t, n.d = function(e, t, a) {
  14. n.o(e, t) || Object.defineProperty(e, t, {
  15. enumerable: !0,
  16. get: a
  17. })
  18. }, n.r = function(e) {
  19. "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
  20. value: "Module"
  21. }), Object.defineProperty(e, "__esModule", {
  22. value: !0
  23. })
  24. }, n.t = function(e, t) {
  25. if (1 & t && (e = n(e)), 8 & t) return e;
  26. if (4 & t && "object" == typeof e && e && e.__esModule) return e;
  27. var a = Object.create(null);
  28. if (n.r(a), Object.defineProperty(a, "default", {
  29. enumerable: !0,
  30. value: e
  31. }), 2 & t && "string" != typeof e)
  32. for (var i in e) n.d(a, i, function(t) {
  33. return e[t]
  34. }.bind(null, i));
  35. return a
  36. }, n.n = function(e) {
  37. var t = e && e.__esModule ? function() {
  38. return e.default
  39. } : function() {
  40. return e
  41. };
  42. return n.d(t, "a", t), t
  43. }, n.o = function(e, t) {
  44. return Object.prototype.hasOwnProperty.call(e, t)
  45. }, n.p = "", n(n.s = 76)
  46. }({
  47. 0: function(e, t, n) {
  48. "use strict";
  49.  
  50. function a(e) {
  51. return (a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
  52. return typeof e
  53. } : function(e) {
  54. return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
  55. })(e)
  56. }
  57. e.exports = function(e) {
  58. "function" == typeof e ? e() : "object" === a(e) && Object.keys(e).forEach(function(t) {
  59. "function" == typeof e[t] && e[t]()
  60. })
  61. }
  62. },
  63. 76: function(e, t, n) {
  64. "use strict";
  65. var a = n(0);
  66. $(document).ready(function() {
  67. a(n(77))
  68. })
  69. },
  70. 77: function(e, t) {
  71. function n(e) {
  72. var t = {};
  73. return e ? t.cvc = $(".selected-payment #saved-payment-security-code").val() : (t.number = $("#cardNumber").val(), t.holderName = $("#holderName").val(), t.expiryMonth = $("#expirationMonth").val(), t.expiryYear = $("#expirationYear").val(), t.cvc = $("#securityCode").val()), t
  74. }
  75.  
  76. function a(e, t) {
  77. var n, a = $("#adyenEncryptedData"),
  78. i = adyen.createEncryption(t),
  79. r = i.validate(e),
  80. o = $("#selectedCardID").val();
  81. return $("#invalidCardDetails").hide(), o && "" != o || e.expiryMonth && e.expiryYear || (r.valid = !1), r.valid ? (e.generationtime = $("#adyen_generationtime").val(), n = i.encrypt(e), a.val(n), !0) : (function(e) {
  82. for (var t in $("#holderName").removeClass("is-invalid"), $("#cardNumber").removeClass("is-invalid"), $("#expirationMonth").removeClass("is-invalid"), $("#expirationYear").removeClass("is-invalid"), $("#securityCode").removeClass("is-invalid"), e)
  83. if (!1 === e[t]) switch (t) {
  84. case "holderName":
  85. $("#holderName").addClass("is-invalid");
  86. break;
  87. case "number":
  88. $("#cardNumber").addClass("is-invalid");
  89. break;
  90. case "expiryMonth":
  91. $("#expirationMonth").addClass("is-invalid");
  92. break;
  93. case "expiryYear":
  94. $("#expirationYear").addClass("is-invalid");
  95. break;
  96. case "cvc":
  97. $("#securityCode").addClass("is-invalid")
  98. }
  99. $("#invalidCardDetails").show()
  100. }(r), !1)
  101. }
  102.  
  103. function i() {
  104. var e;
  105. $("#paymentMethodsUl").empty(), "true" == $("#directoryLookup").val() && (e = function(e) {
  106. jQuery.each(e.AdyenHppPaymentMethods, function(t, n) {
  107. ! function(e, t, n) {
  108. var a = $("<li>").addClass("paymentMethod");
  109. a.append($("<input>").attr("id", "rb_" + e.name).attr("type", "radio").attr("name", "brandCode").attr("value", e.brandCode)), a.append($("<img>").addClass("paymentMethod_img").attr("src", t + e.brandCode + ".png")), a.append($("<label>").text(e.name).attr("for", "rb_" + e.name)), a.append($("<p>").text(n));
  110. var i = $("<div>").addClass("hppAdditionalFields").attr("id", "extraFields_" + e.brandCode).attr("style", "display:none");
  111. if (e.issuers) {
  112. var r = $("<select>").attr("id", "issuerList").attr("name", "issuerId");
  113. jQuery.each(e.issuers, function(e, t) {
  114. var t = $("<option>").attr("label", t.name).attr("value", t.issuerId);
  115. r.append(t)
  116. }), i.append(r), a.append(i)
  117. } - 1 !== $("#OpenInvoiceWhiteList").val().indexOf(e.brandCode) && a.append(i);
  118. $("#paymentMethodsUl").append(a)
  119. }(n, e.ImagePath, e.AdyenDescriptions[t].description)
  120. }), $("input[type=radio][name=brandCode]").change(function() {
  121. $(".hppAdditionalFields").hide(), $("#extraFields_" + $(this).val()).show()
  122. })
  123. }, $.ajax({
  124. url: "Adyen-GetPaymentMethods",
  125. type: "get",
  126. success: function(t) {
  127. e(t)
  128. }
  129. }))
  130. }
  131. $(document).ready(function() {
  132. i(), $('button[value="submit-payment"]').on("click", function(e) {
  133. if ("CREDIT_CARD" == $("#selectedPaymentOption").val()) {
  134. var t, i = {},
  135. r = "";
  136. if ($(".payment-information").data("is-new-payment") ? ($("#selectedCardID").val(""), r = function(e) {
  137. if (e && e.length > 4) return e.replace(/\d(?=\d{4})/g, "*");
  138. return ""
  139. }((t = n(!1)).number.replace(/\s/g, ""))) : ($("#selectedCardID").val($(".selected-payment").data("uuid")), t = n(!0), i = {
  140. enableValidations: !1
  141. }), "" === $(".selected-payment .saved-payment-security-code:visible").val()) return $(".cvv-invalid-feedback").removeClass("d-none"), !1;
  142. if ($(".cvv-invalid-feedback").addClass("d-none"), !a(t, i)) return !1;
  143. var o = $("#check-privacy").is(":checked");
  144. if ("" != $("#email").val() && o) {
  145. $("#cardNumber").val(r);
  146. ! function(e, t, n) {
  147. if ((n = JSON.parse($("#gtm_checkout_products").val())).length > 0)
  148. for (var a = 0; a < n.length; a++) !n[a].dimension6 && sessionStorage.getItem(n[a].id) ? n[a].dimension6 = sessionStorage.getItem(n[a].id) : n[a].dimension6 = "no";
  149. dataLayer.push({
  150. event: "checkout",
  151. ecommerce: {
  152. checkout: {
  153. actionField: {
  154. step: e,
  155. option: t
  156. },
  157. products: n
  158. }
  159. }
  160. })
  161. }(4, "PLACE ORDER")
  162. }
  163. }
  164. if ("Adyen" == $("#selectedPaymentOption").val() && "true" == $("#directoryLookup").val() && !$("input[name='brandCode']:checked").val()) return $("#requiredBrandCode").show(), !1;
  165. "Adyen" == $("#selectedPaymentOption").val() && $("input[name='brandCode']:checked").val() && ($("#adyenPaymentMethod").val($("input[name='brandCode']:checked").closest(".paymentMethod").find("label").text()), $("input[name='brandCode']:checked").parent().find("#issuerList").length ? $("#adyenIssuerName").val($("#issuerList :selected").attr("label")) : ($("#issuerList").val(""), $("#adyenIssuerName").val("")))
  166. }), $('button[value="add-new-payment"]').on("click", function(e) {
  167. return a(n(!1), {
  168. enableValidations: !0
  169. })
  170. })
  171. }), $('button[value="submit-shipping"]').on("click", function(e) {
  172. i()
  173. })
  174. }
  175. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement