Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…hips-pro into dev
  • Loading branch information
ideadude committed Mar 5, 2021
2 parents c4df6dc + 203fdc0 commit d0a252d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions js/pmpro-stripe.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,22 @@ jQuery( document ).ready( function( $ ) {
});
// Handle payment request button confirmation.
paymentRequest.on('paymentmethod', function( event ) {
$('#pmpro_btn-submit').attr('disabled', 'disabled');
$('#pmpro_processing_message').css('visibility', 'visible');
$('#payment-request-button').hide();
event.complete('success');
pmpro_stripeResponseHandler( event );
});
}
}
});

// Find ALL <form> tags on your page
jQuery('form').submit(function(){
// Hide payment request button on form submit to prevent double charges.
jQuery('#payment-request-button').hide();
});

function stripeUpdatePaymentRequestButton() {
jQuery.noConflict().ajax({
url: pmproStripe.restUrl + 'pmpro/v1/checkout_levels',
Expand Down

0 comments on commit d0a252d

Please sign in to comment.