https://github.com/processwith/paywith-php
Easy PHP library to connect to multiple payment gateways in Africa.
https://github.com/processwith/paywith-php
flutterwave-php paystack paystack-api paystack-php processwith ravepay
Last synced: 15 days ago
JSON representation
Easy PHP library to connect to multiple payment gateways in Africa.
- Host: GitHub
- URL: https://github.com/processwith/paywith-php
- Owner: processwith
- License: mit
- Created: 2020-10-30T10:06:27.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-20T17:32:00.000Z (almost 5 years ago)
- Last Synced: 2025-11-27T16:25:07.419Z (about 2 months ago)
- Topics: flutterwave-php, paystack, paystack-api, paystack-php, processwith, ravepay
- Language: PHP
- Homepage:
- Size: 12.8 MB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
Paywith
[](https://packagist.org/packages/processwith/paywith)
[](https://github.com/processwith/paywith-php/blob/master/LICENSE)
[](https://travis-ci.com/github/processwith/paywith-php/)
Paywith makes it easy to use multiple payment gateways in your PHP application.
## Installation
You can install the package via composer:
```bash
composer require processwith/paywith-php
```
## Usage
### basic transaction
``` php
use ProcessWith\PayWith;
$paywith = new PayWith('Paystack', 'Your Paystack Secret');
$transaction->initialize([
'amount' => 5000,
'email' => 'jeremiahsucceed@gmail.com',
'callback_url' => 'http://localhost:3000/tests/verify',
'currency' => 'NGN'
]);
$transaction->checkout(); // redirect to checkout page
```
Love more examples, see the example page.
### verify a transaction
``` php
// Paywith must have be initialize with Paystack or Flutterwave
$transaction = $paywith->transaction();
$transaction->verify( $_GET['reference'] );
if( $transaction->status() )
{
// check the email and the amount
// before giving value
$amount = 5000;
$email = 'jeremiah@gmail.com';
if ( $amount == $transaction->getAmount() && $email == $transaction->getEmail() )
{
// give value
// echo 'thanks for making payment';
}
}
```
### webhook
``` php
// Paywith must have be initialize with Paystack or Flutterwave
$transaction = $paywith->transaction();
$transaction->webhook();
if( $transaction->status() )
{
// check the email and the amount
// before giving value
$amount = 5000;
$email = 'jeremiah@gmail.com';
if ( $amount == $transaction->getAmount() && $email == $transaction->getEmail() )
{
// give value
// echo 'thanks for making payment';
}
}
```
### Tutorials
We are making some plug and play tutorials. If you like to recieve one when it still HOT, click [here](#).
### Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
### Security
If you discover any security related issues, please email jeremiah@processwith.com instead of using the issue tracker.
## Credits
- [Jeremiah Ikwuje](https://github.com/ijsucceed)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.