How to integrate Stripe Payment Gateway with Laravel 5.6

Are you looking for an easy, reliable and powerful way of integrating a payment system for your website? If you are, you’ve come to the right place. Yes, we are going to learn how to integrate stripe to our Laravel 5.6 application and don’t you worry, it’s as easy as anything can be.

What is Stripe?

Stripe is a payment gateway, which allows people to accept payments for their business through web and mobile apps easily. Stripe is the 2nd largest payment gateway in the world after PayPal. Stripe is getting popular each day because of it’s easy to integrate payment API’s. Lots of developers are starting to use Stripe because of that.

Let’s get started!

Before I start, I’ll be assuming that you already have installed the Laravel 5.6 application.

Step 1: Create a Stripe developers account

Go to Stripe and create an account and then login to your dashboard.

Step 2: Integrate Payment Button

I’m also assuming that you already have a view page where you want to integrate the payment button.

Copy the code below and paste it into the view page where you want to integrate the button

<form action="/your-server-side-code" method="POST">
  <script
    src="https://checkout.stripe.com/checkout.js" class="stripe-button"
    data-key="your_publishable_key"
    data-amount="999"
    data-name="Test Account"
    data-description="Widget"
    data-image="https://stripe.com/img/documentation/checkout/marketplace.png"
    data-locale="auto">
  </script>
</form>

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Pin It on Pinterest