Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. <script>
  2. $(document).ready(function () {
  3. var stripe = Stripe('<?= $_STRIPE[$owner['STRIPEENABLED']]['publishable_key']; ?>');
  4.  
  5. $('#confirm-action').click(function () {
  6. // This can be found on invoice.payment_intent.client_secret
  7. var paymentIntentSecret = '<?=$retrieveSUBSCRIPTION['latest_invoice']['payment_intent']['client_secret'];?>';
  8.  
  9. stripe.handleCardPayment(paymentIntentSecret).then(function (result) {
  10. if (result.error) {
  11. // Display error.message in your UI.
  12. } else {
  13. console.log('AUTH SUCCESS');
  14. // The payment has succeeded. Display a success message.
  15. }
  16. });
  17. });
  18. });
  19. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement