Looking to hire Laravel developers? Try LaraJobs

laravelmercanet maintained by sparkosis

Author
Last update
2020/09/02 22:54 (dev-master)
License
Downloads
7

Comments
comments powered by Disqus

Latest Version on Packagist GitHub Tests Action Status Total Downloads

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.