gregoriohc/moneta

A framework agnostic, multi-gateway payment processing library for PHP 7.0+

v1.0.1 2018-03-12 21:26 UTC

This package is auto-updated.

Last update: 2022-06-17 04:42:41 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

A framework agnostic, multi-gateway payment processing library for PHP 7.0+

Install

Via Composer

$ composer require gregoriohc/moneta

Install required gateways, for example:

$ composer require gregoriohc/moneta-stripe

Usage

$gateway = Moneta::create('Stripe', [
    'test_mode' => true',
    'api_key' => 'API_KEY',
]);

$response = $request = $gateway->capture([
    'card' => new Card([
        'full_name' => 'John Doe',
        'number' => '4111111111111111',
        'expiration_month' => '06',
        'expiration_year' => '2024',
        'verification_value' => '123',
    ]),
    'amount' => 100,
    'currency' => 'USD',
])->send();

if ($response->isSuccessful()) {
    // Do something with the $response->data()
}

Testing

$ composer test

Change log

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email gregoriohc@gmail.com instead of using the issue tracker.

Socialware

You're free to use this package, but if it makes it to your production environment I highly appreciate you sharing it on any social network.

Credits

License

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