Skip to content

Repository files navigation

Openpay PHP SDK (Nowo)

CI Packagist Version License PHP

Found this useful? Install from Packagist · Star on GitHub.

Clean-room PHP SDK for the public Openpay REST API. Namespace Nowo\Openpay\. License MIT. Release 1.0.0.

Independent implementation from public docs — not a redistribution of openpay/sdk. No process-wide static merchant credentials (FrankenPHP worker-safe).

FrankenPHP Friendly Worker Mode

Documentation

Quick start

use Nowo\Openpay\Client;
use Nowo\Openpay\Country;
use Nowo\Openpay\Credentials;
use Nowo\Openpay\Session;

$credentials = new Credentials(
    merchantId: getenv('OPENPAY_MERCHANT_ID') ?: '',
    privateKey: getenv('OPENPAY_PRIVATE_KEY') ?: '',
    country: Country::Mx,
    sandbox: true,
);

$session = new Session($credentials);
$customer = $session->run(static fn (Client $client) => $client->customers->create([
    'name' => 'Demo',
    'email' => 'demo@example.test',
]));

Install

composer require nowo-tech/openpay-php:^1.0

Tests

composer test
composer test-coverage
make qa

License

MIT — see LICENSE.

Independent clean-room client for the public Openpay REST API. Not a redistribution of openpay/sdk. “Openpay” is a trademark of its owners.

About

Clean-room PHP SDK for the Openpay API (MIT). Request-scoped credentials, FrankenPHP-friendly. Not a fork of openpay/sdk.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages