sparkosis / laravelmercanet
dev-master
2020-09-02 18:54 UTC
Requires
- php: ^7.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- orchestra/testbench: ^5.0
- phpunit/phpunit: ^9.0
- psalm/plugin-laravel: ^1.2
- vimeo/psalm: ^3.11
This package is not auto-updated.
Last update: 2025-03-28 14:46:07 UTC
README
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
Installation
You can install the package via composer:
composer require sparkosis/laravel-mercanet
You can publish the config file with:
php artisan vendor:publish --provider="Sparkosis\LaravelMercanet\LaravelMercanetServiceProvider" --tag="config"
This is the contents of the published config file:
return [
"merchantId" => "211000021310001",
"isProd" => false,
"keyVersion" => 1,
"secretKey" => 'S9i8qClCnb2CZU3y3Vn0toIOgz3z_aBi79akR30vM9o',
"returnRoute" => 'mercanet.normalReturn',
];
Usage
Send a payment
$transaction = new Sparkosis\LaravelMercanet\LaravelMercanet();
$transaction->process("trans-001", 5000); //TransactionReference and amount in cents
Check payment
$checkShaIsOk = \Sparkosis\LaravelMercanet\LaravelMercanet::checkSha($request->input("Seal"), $request->input("Data"));
Testing
composer test
Changelog
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 freek@spatie.be instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.