musonza / paynow-sdk-php-laravel
A Laravel 5 service provider for the Paynow SDK for PHP
v1.0.1
2019-05-12 05:15 UTC
Requires
- illuminate/support: ~5.1
- paynow/php-sdk: *
Requires (Dev)
- laravel/framework: ^5.8
- phpunit/phpunit: ~4.0|~5.0
- vlucas/phpdotenv: ~2.0|~3.0
This package is auto-updated.
Last update: 2024-10-29 05:11:05 UTC
README
Introduction
A Laravel 5 service provider for the Paynow SDK for PHP
See https://github.com/paynow/Paynow-PHP-SDK
Installation
Composer install - from the command line, run:
composer require musonza/paynow-sdk-php-laravel
Publish config file:
php artisan vendor:publish
Configuration
Config file will be published on config path as paynow.php
<?php return [ 'integration_id' => env('PAYNOW_INTEGRATION_ID'), 'integration_key' => env('PAYNOW_INTEGRATION_KEY'), 'return_url' => env('PAYNOW_RETURN_URL', 'http://example.com/gateways/paynow/update'), 'result_url' => env('PAYNOW_RESULT_URL', 'http://example.com/return?gateway=paynow'), ];
Usage
You can use the Paynow facade as below:
<?php // Returns Paynow\Payments\FluentBuilder $payment = Paynow::createPayment('Invoice 35', 'user@example.com');