PayPal payment module for LiBilling
Find a file
Troy Siedsma 91fafe2eee Migrate to paypal/paypal-server-sdk, drop abandoned checkout SDK
paypal/paypal-checkout-sdk and paypal/paypalhttp were abandoned by
PayPal in 2024. Replace them with paypal/paypal-server-sdk 2.3.0:

- PayPalClient builds a PaypalServerSdkClient (client-credentials
  auth, environment from libilling-paypal.mode); test seams kept.
- PayPalPaymentDriver rewritten onto the Orders/Payments/Vault
  controllers with typed response models. Customer binding and the
  expected-amount gate still run before any capture; refunds still
  settle in the transaction currency from the persisted capture id.
- PayPalWebhookSignatureVerifier reimplemented on Laravel's Http
  facade (the new SDK has no Notifications controller): OAuth token
  then verify-webhook-signature, failing closed on missing webhook
  id, missing headers, missing token, non-SUCCESS verdicts, HTTP
  errors, and transport exceptions.
- Vault controller uses getVaultController()->createPaymentToken(),
  keeping its fail-with-error-redirect behavior.
- Package tests updated to mock the new controllers; no assertions
  weakened.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PT1fKRkFcUZp9izfHaqAcL
2026-07-02 19:08:37 +00:00
config Re-platform onto LiBilling/libilling-paypal Forgejo origin 2026-05-22 13:14:20 +00:00
resources/lang Re-platform onto LiBilling/libilling-paypal Forgejo origin 2026-05-22 13:14:20 +00:00
routes Webhook hardening: throttle endpoint, serialize refund cap check 2026-06-26 03:57:07 +00:00
src Migrate to paypal/paypal-server-sdk, drop abandoned checkout SDK 2026-07-02 19:08:37 +00:00
tests/Feature Migrate to paypal/paypal-server-sdk, drop abandoned checkout SDK 2026-07-02 19:08:37 +00:00
.gitattributes Re-platform onto LiBilling/libilling-paypal Forgejo origin 2026-05-22 13:14:20 +00:00
.gitignore Re-platform onto LiBilling/libilling-paypal Forgejo origin 2026-05-22 13:14:20 +00:00
CHANGELOG.md Re-platform onto LiBilling/libilling-paypal Forgejo origin 2026-05-22 13:14:20 +00:00
composer.json Migrate to paypal/paypal-server-sdk, drop abandoned checkout SDK 2026-07-02 19:08:37 +00:00
CONTRIBUTING.md Re-platform onto LiBilling/libilling-paypal Forgejo origin 2026-05-22 13:14:20 +00:00
LICENSE.md LICENSE: Copyright (c) Lithium Holdings, LLC 2026-05-22 15:13:49 +00:00
README.md Migrate to paypal/paypal-server-sdk, drop abandoned checkout SDK 2026-07-02 19:08:37 +00:00

LiBilling PayPal Payment Gateway Module

A LiBilling payment gateway module for PayPal. Provides checkout, one-time charges, and webhook event processing through the PayPal Checkout SDK.

Features

  • One-Time Charges: Single payment processing via PayPal
  • PayPal Checkout: Hosted checkout flow
  • Webhooks: PayPal webhook event processing

Installation

This package is loaded as a local Composer path repository. No separate installation is needed when developing within the LiBilling monorepo.

For standalone installation:

composer require libilling/libilling-paypal

Configuration

Add the following to your .env file:

PAYPAL_CLIENT_ID=your-client-id
PAYPAL_CLIENT_SECRET=your-client-secret
PAYPAL_SANDBOX=true

Publish the config file:

php artisan vendor:publish --tag=libilling-paypal

Capabilities

Declared via supports() using GatewayCapability constants:

  • charge: One-time PayPal charges
  • checkout: PayPal Checkout flow
  • webhooks: PayPal webhook event processing

Dependencies

  • paypal/paypal-server-sdk: PayPal Server SDK

Testing

vendor/bin/sail artisan test --filter=ModuleSystemTest

License

LiBilling is (C) Lithium Holdings, LLC. All components except for third-party modules and select packages with their own license are licensed under a Commercial License. Contact licensing@lithiumholdings.com for licensing enquiries. Any dissemination of material herein is prohibited without expressed written consent of Lithium Holdings.

This package, libilling-paypal is licensed under The MIT License (MIT). Please see License File for more information.

Is it any good?

Yes.

When people first hear about a new product, they frequently ask if it is any good. A Hacker News user remarked:

Note to self: Starting immediately, all raganwald projects will have a "Is it any good?" section in the readme, and the answer shall be "yes.".