PHPackages                             leafwrap/payment-deals - 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. leafwrap/payment-deals

ActiveLibrary[Payment Processing](/categories/payments)

leafwrap/payment-deals
======================

A Laravel-based online payment gateway solution featuring popular payment gateways like PayPal, Stripe, Razorpay, bKash, and more. Seamlessly integrate secure and diverse payment options into your web applications with ease.

2.0.0(7mo ago)1598MITBladePHP ^8.1

Since Sep 7Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/ashrafemon/payment-deals)[ Packagist](https://packagist.org/packages/leafwrap/payment-deals)[ RSS](/packages/leafwrap-payment-deals/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (12)Used By (0)

Payment Deal Library: Empowering Seamless Online Payments with Laravel
----------------------------------------------------------------------

[](#payment-deal-library-empowering-seamless-online-payments-with-laravel)

The Payment Deal Library is a powerful and versatile Laravel package designed to simplify and enhance online payment processing. Whether you're a business owner, developer, or entrepreneur, this library provides you with a comprehensive toolkit for integrating popular payment gateways seamlessly into your web applications.

### Key Features:

[](#key-features)

Gateway Diversity: Payment Deal offers support for an array of popular payment gateways, including PayPal, Stripe, Razorpay, bKash, and more. This versatility allows you to cater to a global audience and adapt to various payment preferences.

Laravel Integration: Built specifically for Laravel, this library integrates effortlessly with Laravel-based projects. It leverages Laravel's elegance and robustness to provide a reliable and consistent payment experience.

Simple Configuration: Payment Deal simplifies the setup process with an intuitive configuration system. With just a few lines of code, you can start accepting payments through your chosen gateway.

Security: Security is a top priority, and Payment Deal incorporates the latest security standards to protect sensitive customer data. It ensures PCI compliance and safeguards your transactions.

Extensive Documentation: The library comes with comprehensive documentation and examples, making it easy for developers of all levels to get started and effectively implement payment gateways within their applications.

Customization: Tailor the payment experience to match your brand by customizing payment forms and user interactions. Payment Deal provides flexibility for design and user experience customization.

Error Handling: Robust error handling mechanisms ensure that you can easily troubleshoot and resolve issues, enhancing the reliability of your payment processing.

Ongoing Updates: The Payment Deal Library is actively maintained, meaning you'll receive updates, bug fixes, and support to keep your payment systems running smoothly.

### Requirements:

[](#requirements)

You should ensure that your web server has the following minimum PHP version and extensions:

- PHP &gt;= 8.0

### Installation:

[](#installation)

First, install the PaymentDeal package using the Composer package manager:

```
composer require leafwrap/payment-deals
```

#### Database Migrations

[](#database-migrations)

PaymentDeal service provider registers its own database migration directory, so remember to migrate your database after installing the package.

```
php artisan migrate
```

### Configuration

[](#configuration)

#### Gateway Credentials or API Keys

[](#gateway-credentials-or-api-keys)

PaymentDeal provide payment gateway configuration api to store credentials in database. Please click the below link to show api documentation.

### Usages

[](#usages)

- Create a payment request

```
use Leafwrap\PaymentDeals\Facades\PaymentDeal;

Route::post('payment', function () {
    // Fetch your pricing plan
    $plan = PricingPlan::where(['id' => 1])->first()->toArray();

    /*
      Initialize required value to create a payment request
      Parameters:
        1. Pricing Package // an array
        2. Amount // float or int
        3. User ID // string
        4. Gateway Name // string (ex: paypal, stripe, razorpay, bkash, paystack)
        5. Credentials Condition // [tenant_id = 1]
        6. Currency // string (ex: USD, INR, BDT)
        7. Exchange Rate // float (if currency is not usd)
    */

    PaymentDeal::init($plan, $amount, $userId, $gateway, $credentialCondition, $currency, $exchangeRate);

    // Pay provides you to request a payment
    PaymentDeal::checkout();

    // Feedback provides you payment url link & payment response
    return PaymentDeal::getResponse();
});
```

- Query your payment (Optional)

```
use Leafwrap\PaymentDeals\Facades\PaymentDeal;

Route::post('payment-query', function () {
    $transactionId = 'TRANS-XXXXXXXXXXXXX'

    // Query for payment status
    PaymentDeal::query($transactionId);

    // Feedback provides you payment response
    return PaymentDeal::getResponse();
});
```

- Assign to your plan (Required)

```
use Leafwrap\PaymentDeals\Models\PaymentTransaction;

Route::post('/api/v1/assign-plan', function () {
    $transactionId = request()->input('transaction_id');

    if($payment = PaymentTransaction::where(['transaction_id' => $transactionId])->first()){
        // PaymentTransaction have some data attribute
        // id, transaction_id, user_id, gateway, amount, plan_data, request_payload, response_payload, status

        if($payment->status === 'completed'){
            // Assign code (your business logic)
        }
    }
});
```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance65

Regular maintenance activity

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~85 days

Recently: every ~175 days

Total

10

Last Release

211d ago

Major Versions

1.0.8 → 2.0.02025-10-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/046373c26c047b6ba63d32c2c9f04264b38470f23a89e72171c62243a3cf059d?d=identicon)[ashrafemon](/maintainers/ashrafemon)

---

Top Contributors

[![ashrafemon](https://avatars.githubusercontent.com/u/43260899?v=4)](https://github.com/ashrafemon "ashrafemon (70 commits)")

### Embed Badge

![Health badge](/badges/leafwrap-payment-deals/health.svg)

```
[![Health](https://phpackages.com/badges/leafwrap-payment-deals/health.svg)](https://phpackages.com/packages/leafwrap-payment-deals)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
