Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <script src="https://js.stripe.com/v3/">
  2. var stripe = Stripe('pk_test_TYooMQauvdEDq54NiTphI7jx');
  3. </script>
  4.  
  5. <button>
  6. <script>
  7. stripe.redirectToCheckout({
  8. // Make the id field from the Checkout Session creation API response
  9. // available to this file, so you can provide it as parameter here
  10. // instead of the {{CHECKOUT_SESSION_ID}} placeholder.
  11. sessionId: '{{$session}}'
  12. }).then(function (result) {
  13. // If `redirectToCheckout` fails due to a browser or network
  14. // error, display the localized error message to your customer
  15. // using `result.error.message`.
  16. });
  17. </script>
  18. </button>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement