Back to Top

Laravel eCommerce Stripe Payment Gateway

Updated 6 September 2024

Laravel eCommerce Stripe Payment Gateway module allows the customer to integrate Stripe payment gateway to their Laravel eCommerce Store. The customers can make payments through the card.

The admin can easily link the Bagisto store with the Stripe payment gateway.

Users can enter their credit card details during the checkout process and never leave your site, resulting in a better experience for the user, and more successful conversions for you.

Please Note – Before buying this module, you have to check whether this payment gateway is available for your country and currencies or not.

Check a brief overview of the plugin –  

Start your headless eCommerce
now.
Find out More
1MpuYQtPAyI

Features

  • The admin can Enable or Disable the extension.
  • The admin can set the Custom Description and Title for the payment method.
  • Select the Stripe payment method on the checkout page.
  • Provide a Secure payment method for the customer.
  • Admin can set the test key which will be used to test the payment gateway.
  • Admin can make a partial or a full refund.
  • Refund can also be created through stripe dashboard.
  • Accepts all the cards that stripe supports.
  • 3-D Secure.
  • PCI compliance.
  • Supports Refund for all product types.

Requirements

  • Bagisto: v2.1.2
  • Stripe: v13.0
  • Cashier: v14.12

Installation – Laravel eCommerce Stripe Payment Gateway

Unzip the respective extension zip and then merge “packages” and “public” folder into project root directory.

stripe module installation

Goto config/app.php file and add following line under ‘providers’.

Webkul\Stripe\Providers\StripeConnectServiceProvider::class,

Goto composer.json file and add following line under ‘psr-4’

"Webkul\\Stripe\\": "packages/Webkul/Stripe/src"

In the config/bagisto-vite.php file, add the following line under the ‘viters‘ section:

'stripe' => [
        'hot_file'                 => 'stripe-vite.hot',
        'build_directory'          => 'themes/stripe/build',
        'package_assets_directory' => 'src/Resources/assets',
    ],

Goto app/Http/Middleware/VerifyCsrfToken.php file and add following line under ‘$except‘ variables

$except = [
    'stripe/*',
];

For Ipn Goto Stripe Dashboard add the api webhook.

Domain\stripe\webhook

select charged.refunded

To install the Stripe php library run the command below:

composer require stripe/stripe-php:13.0

Run the command below to install the laravel cashier:

composer require laravel/cashier

Run these commands below to complete the setup:

composer dump-autoload
php artisan migrate
php artisan route:cache
php artisan vendor:publish --force

-> Enter the number before Webkul\Stripe\Providers\StripeConnectServiceProvider and then press enter to publish all assets and configurations.

Initial Configuration – Settings

Once you successfully execute the commands, you will see the Stripe Payment by navigating through Configure->Payment Methods->Stripe Payment.

stripe configuration bagisto payment gateway
additional settings bagisto stripe module

Here, the store admin will be able to configure the initial settings –

  • Status:- Enable or disable this module by using the toggle button.
  • Title:- Set the title which will be displayed on the front end for the payment method at checkout.
  • Description:- Enter the description which they want to show on the checkout page for the stripe payment method.
  • Choose Logo :- Add logo for the stripe payment gateway.
  • Debug:- Choose the debug mode as – Sandbox or production for testing purposes.
  • API Secret Key:- Set the API Secret key(production) which is provided by the stripe payment gateway(testing or production in their respective places).
  • API Publishable Key:- Set the API Publishable key(production) which is provided by the stripe payment gateway.
  • Test Publishable Key:- Set the API Test Publishable(development) key so that this module will be used for Testing.
  • API Test Secret Key:- Set the API Test Secret key(development) so that this module will be used for Testing.
  • Sort Order:- Set the sort order so that the payment method will appear on the payment page according to the entered sort order.

After setting all configuration, click on Save button.

Storefront Workflow – Laravel eCommerce Stripe Payment Gateway

Once you have successfully added the product in your cart, tap the Continue to Checkout button.

cart with products

Now, select the shipping address and tap Confirm button.

products in shopping cart

After that, select the Stripe payment method under the payment methods section, and tap the confirm button.

select payment method

After selecting the Stripe payment method, the customer can click on the Placed Order button.

Then the customer will be redirected to the stripe payment page, here they have to fill in their card detail and click on Pay Now.

corrected image

On the other hand, customers save the card details for future payments with the saved cards.

pay with saved card

After successful payment, they will get the order ID.

order placed using stripe payment gateway

Also, If you want to display a personalized checkout message with their Order ID on the checkout page to your customers then you can check Larvel Order Checkout AI Message.

The customers can check order status and the selected payment gateway in their order history.

payment method details

Customers can also check the selected payment method in their order invoice.

invoice details

Order Details – Admin Backend

The admin can view the respective orders and can see the chosen payment method for the orders.

order history bagisto stripe payment gateway

Apart from that, the admin can see the selected payment gateway for an order by opening the same.

stripe payment gateway bagisto order selected payment method check

Refund Process

From the Bagisto admin panel the admin can navigate to the respective order and tap the Refund button at the top.

refund for order via bagisto stripe payment gateway

After that, the admin will have to select the quantity for each product in order for return, and tap Refund button thereafter.

refund option bagisto stripe payment gateway

The refund gets created successfully.

refund created successfully

After the refund is done by the admin, customer can view the refund details for the respective order.

customer view refund details

The admin can also log in to the stripe dashboard and view the refund details.

refund details on stripe dashboard.

The admin can also, view the payments for the orders done via stripe payment gateway on the Strip dashboard.

new payment details

Here, on the stripe dashboard, the admin can also generate a refund for the order payment.

stripe dashboard payment refund

Support

That’s all for the Laravel eCommerce Stripe Payment Gateway, still, have any issue feel free to add a ticket and let us know your views to make the module better at bagisto.uvdesk.com

Current Product Version - 2.1.2

Supported Framework Version - Bagisto 2.1.2

. . .

Leave a Comment

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


3 comments

  • Jaswinder Singh
    • saurav pathak (Moderator)
    • saurav pathak (Moderator)
  • Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home

    Table of Content