Shoperti / Payme by joecohens

A multi-gateway payment platform for PHP
11,941
49
8
Package Data
Maintainer Username: joecohens
Package Create Date: 2014-09-22
Package Last Update: 2023-06-01
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-12-22 03:01:05
Package Statistics
Total Downloads: 11,941
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 49
Total Watchers: 8
Total Forks: 5
Total Open Issues: 0

Shoperti PayMe

Build Status StyleCI

Supported Gateways:

  • Bogus
  • ComproPago
  • Conekta
  • Manual
  • MercadoPago
  • OpenPay
  • Paypal Express / Plus
  • Sr Pago
  • Stripe

Installation

Begin by installing this package through Composer. Edit your project's composer.json file to require shoperti/payme.

"require": {
  "shoperti/payme": "2.0-dev"
}

Next, update Composer from the Terminal:

composer update

Examples

// Create a new PayMe instance choosing the driver
$config = [
    'driver'      => 'stripe',
    'private_key' => 'secret_key',
    'public_key'  => 'public_key',
];

$payme = new Shoperti\PayMe\PayMe($config);
// or
$payme = PayMe::make($config);

// Make a charge
$response = $payme->charges()->create('100', 'tok_test', []);

if (!$response->success()) {
    return ':(';
}

return 'Hurray!';

You can also use our factory.

$payme = new Shoperti\PayMe\PayMeFactory();

// Make a charge
$response = $payme->make($config)->charges()->create('100', 'tok_test', []);

if (!$response->success()) {
    return ':(';
}

return 'Hurray!';

See the tests for more examples.

If you are looking for the old API we still have branch 1.0

Todo

  • [ ] Add Missing Gateways tests
  • [ ] Add Credit Card object
  • [ ] Create a Laravel Bridge
  • [ ] Add more gateways

License

PayMe is licensed under The MIT License (MIT).