PHPackages                             sayed/payment-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. sayed/payment-laravel

ActiveLibrary[Payment Processing](/categories/payments)

sayed/payment-laravel
=====================

A comprehensive Laravel payment integration package supporting Stripe, PayPal, and Paddle with unified interface, webhooks, and invoice payments

v1.0.2(5mo ago)151MITPHPPHP ^8.0|^8.1|^8.2|^8.3

Since Nov 4Pushed 5mo agoCompare

[ Source](https://github.com/johirulalam/johirulalam-payment)[ Packagist](https://packagist.org/packages/sayed/payment-laravel)[ Docs](https://github.com/johirulalam/payment)[ RSS](/packages/sayed-payment-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (4)Used By (0)

User Guide - How to Use This Package in Your Laravel Application
================================================================

[](#user-guide---how-to-use-this-package-in-your-laravel-application)

This guide provides step-by-step instructions for integrating the Sayed Payment Laravel package into your application.

Table of Contents
-----------------

[](#table-of-contents)

1. [Installation](#installation)
2. [Configuration](#configuration)
3. [Basic Setup](#basic-setup)
4. [Creating Payments](#creating-payments)
5. [Handling Webhooks](#handling-webhooks)
6. [Advanced Features](#advanced-features)

---

Installation
------------

[](#installation)

### Step 1: Install the Package

[](#step-1-install-the-package)

Install via Composer:

```
composer require sayed/payment-laravel
```

### Step 2: Publish Configuration

[](#step-2-publish-configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag=payment-config
```

This creates `config/payment.php` in your application.

---

Configuration
-------------

[](#configuration)

### Step 3: Add Environment Variables

[](#step-3-add-environment-variables)

Add your payment provider credentials to `.env`:

```
# Choose your default provider
PAYMENT_PROVIDER=stripe

# Stripe Configuration
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=

# PayPal Configuration
PAYPAL_CLIENT_ID=
PAYPAL_CLIENT_SECRET=
PAYPAL_MODE=sandbox

# Paddle Configuration
PADDLE_VENDOR_ID=
PADDLE_VENDOR_AUTH_CODE=
PADDLE_PUBLIC_KEY=
PADDLE_ENVIRONMENT=
```

### Step 4: Verify Configuration

[](#step-4-verify-configuration)

Check `config/payment.php` to ensure providers are configured:

---

Basic Setup
-----------

[](#basic-setup)

### Step 5: Create Payment Controller

[](#step-5-create-payment-controller)

Create a controller to handle payments:

```
php artisan make:controller PaymentController
```

**app/Http/Controllers/PaymentController.php:**

```
