0

I am use stripe embedded form for checkout

<script  src="https://checkout.stripe.com/checkout.js" class="stripe-button"
         data-key="{!! env('STRIPE_PK') !!}"
         data-amount="{{$total*100}}"
         data-name="LaravelShop.IO"
         data-description="Products"
         data-image="/128x128.png"
         data-locale="auto">
 </script>

My question is how I can display error returned from https://api.stripe.com/v1/tokens after clicking Blue Payment Button. Any link or code snippet. Thanks

Faisal Ahsan
  • 928
  • 1
  • 12
  • 22

1 Answers1

0

You can't. If the token creation fails, the Checkout form itself will handle the error and the form will not be submitted.

Depending on the reason for the failure, a message will be displayed and certain fields will be highlighted in red.

Ywain
  • 16,854
  • 4
  • 51
  • 67