Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function openCreditCard(){
- $("#token_payment").val("");
- $("#creditcard-container").slideUp(500);
- $.ajax({
- "type": "GET",
- "url": $("#url_card").val(),
- "data": { "APIKey" : $("#txtAPIKey").val() , "Token" : $("#txtToken").val() , "Culture" : $("#lang").val() },
- "success": function (jsonResponse) {
- const removeSpecificTagsRegex = /<link href="https:\/\/gateway\.merchantprocess\.net\/securecomponent\/v2\/content\/bootstrap\.min\.css" rel="stylesheet" \/>|<script src="https:\/\/ajax\.googleapis\.com\/ajax\/libs\/jquery\/1.8.3\/jquery\.min\.js"><\/script>/gi;
- const cleanResponse = jsonResponse.replace(removeSpecificTagsRegex, '');
- $("#creditcard-container").html(cleanResponse);
- $("#creditcard-container .col-lg-5.col-md-6").removeClass("col-lg-5 col-md-6").addClass("col-12");
- $("#creditcard-container").slideDown(500);
- $("#card-ui-component-txt-creditcard-holder").attr("placeholder", $("#cardHolderName").val());
- $("#card-ui-component-txt-creditcard-number").attr("placeholder", "XXXXXXXXXXXXXXXX");
- $("#card-ui-component-btn-confirm").text($("#btn_pay_text").val());
- setTimeout(function() {
- $(".jp-card-name").html($("#full_name").val());
- }, 1000);
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement