Skip to content

Card payment method for Laravel webshop package using Stripe

Notifications You must be signed in to change notification settings

dv5150/shop-stripe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Webshop Stripe Support


The goal of the project:

To provide Stripe payment integration for the Laravel Webshop package.


Requirements

  • Laravel 8+
  • PHP >=8.1

Setup

  1. $ composer require dv5150/shop-stripe
  2. Set up config/shop-stripe.php config file with your Stripe access keys.
  3. Set the active status of your newly created Stripe PaymentMode entity to true. Do not change the value of the provider field.
  4. Attach the Stripe PaymentMode entity to the desired ShippingMode entities.
  5. Register the Stripe payment mode in your application:
namespace App\Providers;

use DV5150\Shop\Facades\Shop;
use DV5150\Shop\Stripe\StripeProvider;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    public function register()
    {
        Shop::registerPaymentProviders([
            StripeProvider::class,
        ]);
    }
}

Development helpers

Listen to the successful payment webhooks locally:

docker run --network="host" --rm -it stripe/stripe-cli listen --forward-to https://webshop.test/api/shop/payment/stripe/webhook --skip-verify --api-key <secret_key> --events=checkout.session.completed

Trigger successful payment events:

docker run --rm -it stripe/stripe-cli trigger checkout.session.completed --api-key <secret_key>

About

Card payment method for Laravel webshop package using Stripe

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages