Server IP : 213.176.29.180  /  Your IP : 3.147.45.25
Web Server : Apache
System : Linux 213.176.29.180.hostiran.name 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
User : webtaragh ( 1001)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/webtaragh/public_html/whmcs/modules/addons/../gateways/stripe_sepa/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/webtaragh/public_html/whmcs/modules/addons/../gateways/stripe_sepa/stripe_sepa.min.js
function initStripeSEPA(){var e,t,n,i,a=jQuery("#frmPayment");a.length&&(jQuery("#inputBankAcctType").closest("div.form-group").slideUp().remove(),jQuery("#inputBankRoutingNum").closest("div.form-group").slideUp().remove(),jQuery("#inputBankName").closest("div.form-group").slideUp().remove(),jQuery("#inputBankAcctNum").closest("div.form-group").slideUp().remove(),jQuery("#inputDescriptionContainer").before('<div id="ibanElementContainer" class="form-group row bank-details">\n    <label for="ibanElement" class="col-sm-4 control-label">\n'+lang.iban+'    </label>\n<div class="col-sm-7">    <div class="input-inline form-control" id="ibanElement">\n</div>    </div>\n</div><div id="mandateAcceptanceContainer" class="form-group bank-details">\n    <div class="alert alert-info" id="mandateAcceptance">\n'+lang.mandate_acceptance+"    </div>\n</div>"),e=jQuery('input[name="paymethod"]:checked').val(),t=jQuery("#ibanElementContainer"),n=jQuery("#mandateAcceptanceContainer"),i=jQuery("#inputBankAcctHolderName").closest("div.form-group"),iban.mount("#ibanElement"),a.off("submit"),iban.off("change"),"new"===e?(t.not(":visible")&&(t.show("fast"),iban.on("change",stripe_sepa_iban_change_event),a.on("submit.stripe_sepa",stripe_sepa_form_submit)),n.not(":visible")&&n.show("fast"),i.not(":visible")&&i.show("fast")):(t.is(":visible")&&t.hide("fast"),n.is(":visible")&&n.hide("fast"),i.is(":visible")&&i.hide("fast")),jQuery('input[name="paymethod"]').on("ifChecked",function(){t=jQuery("#ibanElementContainer"),n=jQuery("#mandateAcceptanceContainer"),i=jQuery("#inputBankAcctHolderName").closest("div.form-group"),"new"===jQuery(this).val()?(t.not(":visible")&&(t.show("fast"),iban.on("change",stripe_sepa_iban_change_event),a.on("submit.stripe_sepa",stripe_sepa_form_submit)),n.not(":visible")&&n.show("fast"),i.not(":visible")&&i.show("fast")):(t.is(":visible")&&(t.hide("fast"),iban.off("change"),a.off("submit.stripe_sepa")),n.is(":visible")&&n.hide("fast"),i.is(":visible")&&i.hide("fast"))}))}function stripe_sepa_iban_change_event(e){var t=jQuery(".gateway-errors").first();e.error&&e.error.message.length?(t.html(e.error.message),t.not(":visible")&&t.slideDown(),scrollToGatewayInputError()):t.is(":visible")&&t.slideUp()}function stripe_sepa_form_submit(e){var n=jQuery("#btnSubmit").addClass("disabled").prop("disabled",!0);if(e.preventDefault(),!stripeSepaValidate())return n.prop("disabled",!1).removeClass("disabled"),scrollToGatewayInputError(),!1;e=stripeSepaGetSelectedBillingContact(),e={type:"sepa_debit",currency:"eur",owner:{name:jQuery("#inputBankAcctHolderName").val(),email:clientEmail,address:{country:e.country,line1:e.address1,line2:e.address2,postal_code:e.postcode,state:e.state,city:e.city}},mandate:{notification_method:"email"}};stripe.createSource(iban,e).then(function(e){var t=jQuery(".gateway-errors").first();e.error&&e.error.message.length?(t.html(e.error.message),t.not(":visible")&&t.slideDown(),n.removeClass("disabled").prop("disabled",!1)):(t.slideUp(),stripeSourceHandler(e.source))})}function stripeSepaValidate(){function e(e){var t=jQuery(".gateway-errors").first();t.html(e),t.not(":visible")&&t.slideDown()}var t=jQuery("#frmPayment");if(!t.find("#inputBankAcctHolderName").val())return e(lang.acctHolderError),!1;var n=jQuery("input[name=billingcontact]:checked").val();if("new"===n){var i=t.find("#newBillingAddress");if(!i.find("#inputAddress1").val())return e(lang.addressError),!1;if(!i.find("#country").val())return e(lang.countryError),!1}else{i=t.find(".billing-contact-"+n);if(!i.find(".address1").text())return e(lang.addressError),!1;if(!i.find(".country").text())return e(lang.countryError),!1}return!0}function stripeSepaGetSelectedBillingContact(){var e,t=jQuery("#frmPayment");let n=jQuery("input[name=billingcontact]:checked").val(),i={};return i="new"===n?{name:(e=t.find("#newBillingAddress")).find(".inputFirstName").text()+" "+e.find(".inputLastName").text(),country:e.find("#country").val(),address1:e.find("#inputAddress1").val(),address2:e.find("#inputAddress2").val(),postcode:e.find("#inputPostcode").val(),state:("none"===e.find("#stateinput").css("display")?e.find("#stateselect"):e.find("#stateinput")).val(),city:e.find("#inputCity").val()}:{name:(e=t.find(".billing-contact-"+n)).find(".name").text(),country:e.find(".country").text(),address1:e.find(".address1").text(),address2:e.find(".address2").text(),postcode:e.find(".postcode").text(),state:e.find(".state").text(),city:e.find(".city").text()}}function stripeSourceHandler(e){var t=document.getElementById("frmPayment"),n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name","remoteStorageToken"),n.setAttribute("value",e.id),t.appendChild(n),t.submit()}