PageSourceSearch

https://www.obcgs.com/wp-content/plugins/restrict-content-pro/core…/stripe/js/register.min.js?ver=4.0.7

js obcgs.com collected 2026-10-02 13:37:01 UTC 4,481 bytes, 1 lines download raw bytes

1function rcpStripeHandlePaymentFailure(e,t){let r=jQuery;function a(a){r.ajax({type:"post",dataType:"json",url:rcp_script_options.ajaxurl,data:{action:"rcp_stripe_handle_initial_payment_failure",payment_id:e,message:t,nonce:a},success:function(e){}})}r.ajax({type:"post",dataType:"json",url:rcp_script_options.ajaxurl,data:{action:"rcp_stripe_generate_payment_nonce"},success:function(e){a(e&&e.success?e.data:rcp_script_options.stripe_payment_nonce)},error:function(){a(rcp_script_options.stripe_payment_nonce)}})}function rcpStripeCloseCheckoutModal(){if(rcp_processing)return;let e=jQuery,t=e(".rcp-modal-wrapper"),r=e(".rcp-modal");t.fadeOut(250),r.hide(),document.getElementById("rcp-card-element")&&rcpStripe.elements.card.unmount("#rcp-card-element")}function rcpStripeHandleIntent(e,t,r){return rcpStripe.Stripe[e](t,r)}jQuery((function(e){var t={hasPaymentMethod:!1,paymentMethodID:!1,init:function(){e("body").on("rcp_gateway_loaded",t.mountElements),e("#rcp_submit").on("click",t.maybeBlockSubmit),e("body").on("rcp_registration_form_processed",t.handlePayment),e("body").on("click",".rcp-stripe-register-submit-button",t.launchModal)},mountElements:function(e,r){document.getElementById("rcp-card-element")&&(rcpStripeUpdateElementStyles(rcpStripe.elements.card,".rcp_card_name"),rcpStripe.elements.card.mount("#rcp-card-element"),rcpStripe.elements.card.addEventListener("change",(function(e){e.complete&&(t.hasPaymentMethod=!0)})),t.setPaymentMethodID(),rcpStripe.elements.card.addEventListener("change",rcpStripeToggleElementErrors))},setPaymentMethodID:function(){let r=e('input[name="rcp_gateway_existing_payment_method"]');r.on("change",(function(r){rcpStripeToggleElementErrors(r);let a=e('input[name="rcp_gateway_existing_payment_method"]:checked').val();e(".rcp-gateway-saved-payment-method, .rcp-gateway-add-payment-method-wrap").removeClass("rcp-gateway-selected-payment-method"),"new"===a?(e(".rcp-gateway-new-card-fields").show(),e(".rcp-gateway-add-payment-method-wrap").addClass("rcp-gateway-selected-payment-method"),t.paymentMethodID=!1):(e(".rcp-gateway-new-card-fields").hide(),e(this).parents(".rcp-gateway-saved-payment-method").addClass("rcp-gateway-selected-payment-method"),t.paymentMethodID=a)})),r.trigger("change")},maybeBlockSubmit:function(e){if("stripe"===rcp_get_gateway().val()&&document.getElementById("rcp-card-element")&&!t.hasPaymentMethod&&!t.paymentMethodID)return e.stopPropagation(),rcpStripeHandleError(rcp_script_options.enter_card_details),!1},handlePayment:function(r,a,n){if("stripe"!==n.gateway.slug)return;if(!(n.total||n.recurring_total&&n.auto_renew))return;if(e(".rcp_gateway_fields").hasClass("rcp_discounted_100"))return;if(!n.gateway.data.stripe_client_secret)return rcpStripeHandleError(rcp_script_options.error_occurred),void rcpStripeHandlePaymentFailure(n.payment_id,rcp_script_options.error_occurred);let c=e(".card-name").val(),p="payment_intent"===n.gateway.data.stripe_intent_type?"confirmCardPayment":"confirmCardSetup",o={payment_method:{card:rcpStripe.elements.card,billing_details:{name:c}}};t.paymentMethodID&&(o={payment_method:t.paymentMethodID}),rcpStripeHandleIntent(p,n.gateway.data.stripe_client_secret,o).then((function(e){e.error?(rcpStripeHandleError(e.error.message,e.error.code),rcpStripeHandlePaymentFailure(n.payment_id,e.error.message)):rcp_submit_registration_form(a,n)}))},launchModal:function(r){r.preventDefault();let a=e(".rcp-modal-wrapper"),n=e(".rcp-modal"),c=e(this).parents(".rcp-stripe-register");if(!document.getElementById("rcp-card-element"))return;a.fadeIn(250),rcpStripe.elements.card.mount("#rcp-card-element");let p=n.find("input.rcp-modal-submit");rcpStripe.elements.card.addEventListener("change",(function(e){e.complete&&(t.hasPaymentMethod=!0)})),rcpStripe.elements.card.addEventListener("change",rcpStripeToggleElementErrors),t.setPaymentMethodID(),c.data("name")&&e(".rcp-modal-membership-name").text(c.data("name")).show(),c.data("description")&&e(".rcp-modal-membership-description").text(c.data("description")).show(),c.data("panel-label")&&p.val(c.data("panel-label")),c.data("level-id")&&n.find("#rcp-stripe-checkout-level-id").val(c.data("level-id")),n.fadeIn(250),a.find(".rcp-modal-close").on("click",(function(){rcpStripeCloseCheckoutModal()}
1)),e(document).on("keydown",(function(e){27===e.keyCode&&rcpStripeCloseCheckoutModal()})),e(document).mouseup((function(e){n.is(e.target)||0!==n.has(e.target).length||rcpStripeCloseCheckoutModal()}))}};t.init()}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.