sytxlabs/laravel-paypal

A Laravel package to interact with PayPal

Installs: 507

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 0

Forks: 1

Open Issues: 0

pkg:composer/sytxlabs/laravel-paypal

1.0.3 2025-09-25 11:15 UTC

This package is auto-updated.

Last update: 2025-09-25 11:16:03 UTC


README

MIT Licensed Check code style Latest Version on Packagist Total Downloads

This package adds a simple way to integrate PayPal payments into your Laravel application.

Prerequisites

  • A configured Laravel database connection
  • PHP 8.2 or higher
  • Laravel 10.0 or higher

Installation

composer require sytxlabs/laravel-paypal

Using

Configuration

php artisan vendor:publish --tag="sytxlabs-paypal-config"

the configuration file is located at config/paypal.php

Optional Database

php artisan vendor:publish --tag="sytxlabs-paypal-migrations"
php artisan migrate

Usage

Create a new PayPal Order

use SytxLabs\PayPal\PayPalOrder;

$paypalOrder = new PayPalOrder();

$paypalOrder->addProduct(new Product('Product 1', 10.00, 1));

$paypalOrder->createOrder();

Redirect to PayPal

$paypalOrder->approveOrderRedirect();

or get the approval link

$paypalOrder->getApprovalLink();

Capture the payment

$paypalOrder->captureOrder();

Check the payment status

$paypalOrder->captureOrder()->getOrderStatus();

License

The MIT License (MIT). Please see License File for more information.