PHPackages                             artwl/laravel-paypal - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. artwl/laravel-paypal

ActiveLibrary[HTTP &amp; Networking](/categories/http)

artwl/laravel-paypal
====================

Laravel plugin For Processing Payments Through Paypal Express Checkout. Can Be Used Independently With Other Applications.

v4.0.0(4y ago)04MITPHP

Since Oct 16Pushed 4y agoCompare

[ Source](https://github.com/artwl/laravel-paypal)[ Packagist](https://packagist.org/packages/artwl/laravel-paypal)[ RSS](/packages/artwl-laravel-paypal/feed)WikiDiscussions v2.0 Synced 2d ago

READMEChangelog (3)Dependencies (5)Versions (76)Used By (0)

Laravel PayPal
==============

[](#laravel-paypal)

This plugin only supports Laravel 5.1 to 5.8.

- [Introduction](#introduction)
- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
- [Support](#support)

Introduction
------------

[](#introduction)

By using this plugin you can process or refund payments and handle IPN (Instant Payment Notification) from PayPal in your Laravel application.

**This plugin supports the new paypal rest api.**

This package uses the new paypal rest api. Refer to this link on how to create API credentials:

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

[](#installation)

### 1. Install:

[](#1-install)

```
composer require artwl/laravel-paypal:~4.0
```

### 2. \[Optional\] Add the service provider in `config/app.php`:

[](#2-optional-add-the-service-provider-in-configappphp)

```
Srmklive\PayPal\Providers\PayPalServiceProvider::class
```

### 3. \[Optional\] Add the alias in `config/app.php`:

[](#3-optional-add-the-alias-in-configappphp)

```
'PayPal' => Srmklive\PayPal\Facades\PayPal::class
```

### 4. Publish configuration:

[](#4-publish-configuration)

```
php artisan vendor:publish --provider "Srmklive\PayPal\Providers\PayPalServiceProvider"
```

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

[](#configuration)

- After installation, you will need to add your paypal settings. Following is the code you will find in **config/paypal.php**, which you should update accordingly.

```
return [
    'mode'    => env('PAYPAL_MODE', 'sandbox'), // Can only be 'sandbox' Or 'live'. If empty or invalid, 'live' will be used.
    'sandbox' => [
        'client_id'         => env('PAYPAL_SANDBOX_CLIENT_ID', ''),
        'client_secret'     => env('PAYPAL_SANDBOX_CLIENT_SECRET', ''),
        'app_id'            => 'APP-80W284485P519543T',
    ],
    'live' => [
        'client_id'         => env('PAYPAL_LIVE_CLIENT_ID', ''),
        'client_secret'     => env('PAYPAL_LIVE_CLIENT_SECRET', ''),
        'app_id'            => '',
    ],

    'payment_action' => env('PAYPAL_PAYMENT_ACTION', 'Sale'), // Can only be 'Sale', 'Authorization' or 'Order'
    'currency'       => env('PAYPAL_CURRENCY', 'USD'),
    'notify_url'     => env('PAYPAL_NOTIFY_URL', ''), // Change this accordingly for your application.
    'locale'         => env('PAYPAL_LOCALE', 'en_US'), // force gateway language  i.e. it_IT, es_ES, en_US ... (for express checkout only)
    'validate_ssl'   => env('PAYPAL_VALIDATE_SSL', true), // Validate SSL when creating api client.
];
```

- Add this to `.env`

```
#PayPal API Mode

# Values: sandbox or live (Default: live)
PAYPAL_MODE=live

#PayPal Setting & API Credentials - sandbox
PAYPAL_SANDBOX_CLIENT_ID=
PAYPAL_SANDBOX_CLIENT_SECRET=

#PayPal Setting & API Credentials - live
PAYPAL_LIVE_CLIENT_ID=
PAYPAL_LIVE_CLIENT_SECRET=

```

Usage
-----

[](#usage)

Following are some ways through which you can access the paypal provider:

```
// Import the class namespaces first, before using it directly
use Srmklive\PayPal\Services\PayPal as PayPalClient;

public function orderCreate(){
    $provider = new PayPalClient;
    $provider->setApiCredentials(config('paypal'));
    $provider->getAccessToken();

    $orderResponse = $provider->createOrder([
        "intent"=> "CAPTURE",
        "purchase_units"=> [
            0 => [
                "amount"=> [
                    "currency_code"=> "HKD",
                    "value"=> "12.00"
                ]
            ]
        ]
    ]);

    //order create success
    if ($orderResponse["status"] == "CREATED") {
        $orderId = $orderResponse["id"];
    }
}

//notify_url and webhook url, route need except csrf
public function payResult(Request $request) {
    $data = json_decode($request->getContent(), true);
    //pay success
    if ($data["event_type"] == "CHECKOUT.ORDER.APPROVED") {
        $orderId = $data["resource"]["id"];
    }
}
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 86.1% 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 ~29 days

Total

76

Last Release

1674d ago

Major Versions

1.7.0 → v2.0.0-beta-12020-08-31

1.8.0 → 3.0.02020-09-11

2.0.0 → 3.0.12020-12-11

1.9.0 → v2.0.12021-10-12

v2.0.2 → v4.0.02021-10-12

PHP version history (3 changes)3.0.0PHP &gt;=7.2

2.0.0PHP &lt;7.2

3.0.1PHP &gt;=7.2|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/f656d715727ef21723d1e89ec7630cfe5b90e5a8677b98b017dc36883a0ff84a?d=identicon)[artwl](/maintainers/artwl)

---

Top Contributors

[![srmklive](https://avatars.githubusercontent.com/u/839335?v=4)](https://github.com/srmklive "srmklive (68 commits)")[![artwl](https://avatars.githubusercontent.com/u/982563?v=4)](https://github.com/artwl "artwl (9 commits)")[![BGaeteAlvear](https://avatars.githubusercontent.com/u/26167958?v=4)](https://github.com/BGaeteAlvear "BGaeteAlvear (1 commits)")[![korkoshko](https://avatars.githubusercontent.com/u/11389652?v=4)](https://github.com/korkoshko "korkoshko (1 commits)")

---

Tags

httprestweb servicepaypallaravel paypal

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/artwl-laravel-paypal/health.svg)

```
[![Health](https://phpackages.com/badges/artwl-laravel-paypal/health.svg)](https://phpackages.com/packages/artwl-laravel-paypal)
```

###  Alternatives

[srmklive/paypal

Laravel plugin For Processing Payments Through Paypal Express Checkout. Can Be Used Independently With Other Applications.

1.1k3.8M26](/packages/srmklive-paypal)[zoonman/pixabay-php-api

PixabayClient is a PHP HTTP client library to access Pixabay's API

3354.7k](/packages/zoonman-pixabay-php-api)[e-moe/guzzle6-bundle

Integrates Guzzle 6 into your Symfony application

11259.2k](/packages/e-moe-guzzle6-bundle)[apoca/laravel-sibs-payments

Laravel library to communicate with SIBS - Open Payment Platform.

342.3k](/packages/apoca-laravel-sibs-payments)

PHPackages © 2026

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