jQuery(document).ready((function(a){"use strict";a(".learndash-payment-gateway-form-razorpay").on("submit.razorpay",(function(e){const t=a(this),n=a(this).find('input[type="submit"]');t.addClass("ld-loading"),n.attr("disabled",!0),a.ajax({type:"POST",url:learndash_payments.ajaxurl,dataType:"json",data:a(this).data()}).done((function(a){if(t.removeClass("ld-loading"),n.removeAttr("disabled"),a.success){const e=a.data.options;e.handler=function(){alert(learndash_payments.messages.successful_transaction),window.location.replace(a.data.redirect_url)};const t=new Razorpay(e);t.on("payment.failed",(function(a){alert(a.error.description)})),t.open()}else alert(a.data.message)})),e.preventDefault()}))}));