Created
May 20, 2020 13:35
-
-
Save fhdalikhan/04461f8e7889a57ed4f17dfa7bb56c96 to your computer and use it in GitHub Desktop.
Stripe payment form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
/** | |
* The CSS shown here will not be introduced in the Quickstart guide, but shows | |
* how you can use CSS to style your Element's container. | |
*/ | |
.StripeElement { | |
box-sizing: border-box; | |
height: 40px; | |
padding: 10px 12px; | |
border: 1px solid transparent; | |
border-radius: 4px; | |
background-color: white; | |
box-shadow: 0 1px 3px 0 #e6ebf1; | |
-webkit-transition: box-shadow 150ms ease; | |
transition: box-shadow 150ms ease; | |
} | |
.StripeElement--focus { | |
box-shadow: 0 1px 3px 0 #cfd7df; | |
} | |
.StripeElement--invalid { | |
border-color: #fa755a; | |
} | |
.StripeElement--webkit-autofill { | |
background-color: #fefde5 !important; | |
} | |
</style> | |
<script src="https://js.stripe.com/v3/"></script> | |
<form action="{{url('create/stripe/subscription')}}" method="post" id="payment-form"> | |
@csrf | |
<br/> | |
<div class="form-row"> | |
<label for="card-element"> | |
Credit or debit card | |
</label> | |
<div id="card-element" class="form-control"> | |
<!-- A Stripe Element will be inserted here. --> | |
</div> | |
<!-- Used to display form errors. --> | |
<div id="card-errors" role="alert"></div> | |
</div> | |
<br/> | |
<button class="btn btn-primary">Submit Payment</button> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment