PHPackages                             ewertondaniel/standard-paypal-php-sdk - 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. ewertondaniel/standard-paypal-php-sdk

ActiveLibrary[Payment Processing](/categories/payments)

ewertondaniel/standard-paypal-php-sdk
=====================================

PayPal Standard PHP SDK

581PHP

Since Dec 7Pushed 2y ago1 watchersCompare

[ Source](https://github.com/EwertonDaniel/standard-paypal-php-sdk)[ Packagist](https://packagist.org/packages/ewertondaniel/standard-paypal-php-sdk)[ RSS](/packages/ewertondaniel-standard-paypal-php-sdk/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (3)Used By (0)

[![Generic badge](https://camo.githubusercontent.com/962da2a023bcfef4bb75c843fd84d032dac57e0ebcd53b93d37d5f3221afba0e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f65776572746f6e64616e69656c2f7374616e646172642d70617970616c2d7068702d73646b)](https://github.com/EwertonDaniel/standard-paypal-php-sdk.git)[![Generic badge](https://camo.githubusercontent.com/bfefce7068adcf1bf93300ea070f46ce227ea631cf473b1cacb763da280e1846/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f737461626c652d76312e302e322d626c75652e737667)](https://github.com/EwertonDaniel/standard-paypal-php-sdk)[![Twitter](https://camo.githubusercontent.com/65786765fa722863eefe78fb4345408b1b430428a7a6333459d16d8c079d24cc/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f64737265776572746f6e3f7374796c653d736f6369616c)](https://twitter.com/dsrewerton)

PayPal Standard PHP SDK
=======================

[](#paypal-standard-php-sdk)

*This library provides developers with a simple set of bindings to help you integrate [PayPal Standard](https://developer.paypal.com/home) to a website and start receiving payments.*

🛠 Requirements
--------------

[](#-requirements)

`php >= 8.1`

`guzzlehttp/guzzle >= 7.0.1`

`echosistema/simple-http-request" >= 1.0.1`

📢 **Coming soon package to `PHP versions < 8.1`.**

💻 Installation
--------------

[](#-installation)

First time using PayPal? Create your PayPal account in [PayPal](https://www.paypal.com/br/webapps/mpp/account-selection), if you don’t have one already.

Download [Composer](https://getcomposer.org/) if not already installed

On your project directory run on the command line `"composer require ewertondaniel/paypal-standard-php-sdk"`for `PHP 8.1`;

That's it! **PayPal Standard PHP SDK** has been successfully installed!

🧑‍💻 Examples
------------

[](#‍-examples)

### 🔓 Getting authorization

[](#-getting-authorization)

```
use EwertonDaniel\PayPal\Auth;

        $authentication = new Auth($client_id, $client_secret, $is_production);
        $authentication->getScopes();
        $authentication->getAccessToken();
        $authentication->getTokenType();
        $authentication->getAppId();
        $authentication->getExpiresIn();
        $authentication->getNonce();
```

### 💲 Create an Order

[](#-create-an-order)

```
use EwertonDaniel\PayPal\Order;

        $order = new Order($authentication);

        //Set Purchase Unit
        $order->setPaypalRequestId()
            ->setIntent('CAPTURE')
            ->purchaseUnit()
            ->setCurrencyCode('BRL')
            ->addItemWithBasicData('Blacksaber Mandalore', 1, 29900) // string $name, int $quantity, int $value
            ->setReferenceId()
            ->setDescription('I can write up to one hundred and twenty seven characters as a description...');

        // Set Payment Source
        $order->pushPurchaseUnit()
            ->paymentSource()
            ->paypal()
            ->experienceContext()
            ->setPaymentMethodPreference('IMMEDIATE_PAYMENT_REQUIRED')
            ->setBrandName('Bounty Hunters Guild (BHG)') // Company name
            ->setLocale('pt-BR')
            ->setLandingPage('LOGIN')
            ->setShippingPreference('NO_SHIPPING')
            ->setUserAction('PAY_NOW')
            ->setReturnUrl('https://example.com/returnUrl')
            ->setNotificationUrl('https://example.com/notifyUrl')
            ->setCancelUrl('https://example.com/cancelUrl');

        $response = $order->create();
```

### ℹ Order Details

[](#ℹ-order-details)

```
use EwertonDaniel\PayPal\Order;
        $order_id = $_POST['token'];
        $detail = $order->setOrderId($order_id)->detail();
```

📖 Documentation
---------------

[](#-documentation)

### 🔗 Visit the PayPal for further information regarding:

[](#-visit-the-paypal-for-further-information-regarding)

[PayPal REST APIs Documentation](https://developer.paypal.com/api/rest/)

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/735b1ba4cf3c6a19b0e75524cd090d21f13a8936799387c579933d2b99789f26?d=identicon)[ewertondaniel](/maintainers/ewertondaniel)

---

Top Contributors

[![EwertonDaniel](https://avatars.githubusercontent.com/u/42904786?v=4)](https://github.com/EwertonDaniel "EwertonDaniel (29 commits)")

### Embed Badge

![Health badge](/badges/ewertondaniel-standard-paypal-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/ewertondaniel-standard-paypal-php-sdk/health.svg)](https://phpackages.com/packages/ewertondaniel-standard-paypal-php-sdk)
```

###  Alternatives

[msilabs/bkash

bKash Payment Gateway API for Laravel Framework.

181.2k](/packages/msilabs-bkash)

PHPackages © 2026

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