Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- $(document).ready(function () {
- var stripe = Stripe('<?= $_STRIPE[$owner['STRIPEENABLED']]['publishable_key']; ?>');
- $('#confirm-action').click(function () {
- // This can be found on invoice.payment_intent.client_secret
- var paymentIntentSecret = '<?=$retrieveSUBSCRIPTION['latest_invoice']['payment_intent']['client_secret'];?>';
- stripe.handleCardPayment(paymentIntentSecret).then(function (result) {
- if (result.error) {
- // Display error.message in your UI.
- } else {
- console.log('AUTH SUCCESS');
- // The payment has succeeded. Display a success message.
- }
- });
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement