├── docs ├── _config.yml └── index.md ├── .styleci.yml ├── Tigopesa Secure API.jpeg ├── Tigopesa Laravel Library.jpeg ├── .phpunit.result.cache ├── CHANGELOG.md ├── push.sh ├── src ├── Configs │ └── v1 │ │ └── TigoConfigs.php ├── TigosecureFacade.php ├── TigosecureServiceProvider.php ├── Tigosecure.php └── TigoUtil.php ├── LICENSE.md ├── config └── config.php ├── .github └── workflows │ └── run-tests.yml ├── composer.json ├── CONTRIBUTING.md └── README.md /docs/_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /.styleci.yml: -------------------------------------------------------------------------------- 1 | preset: laravel 2 | 3 | disabled: 4 | - single_class_element_per_statement 5 | -------------------------------------------------------------------------------- /Tigopesa Secure API.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbrax/tigopesa-tanzania/HEAD/Tigopesa Secure API.jpeg -------------------------------------------------------------------------------- /Tigopesa Laravel Library.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dbrax/tigopesa-tanzania/HEAD/Tigopesa Laravel Library.jpeg -------------------------------------------------------------------------------- /.phpunit.result.cache: -------------------------------------------------------------------------------- 1 | C:37:"PHPUnit\Runner\DefaultTestResultCache":151:{a:2:{s:7:"defects";a:1:{s:7:"Warning";i:6;}s:5:"times";a:2:{s:51:"Epmnzava\Tigosecure\Tests\ExampleTest::true_is_true";d:0.273;s:7:"Warning";d:0.001;}}} -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to `tigosecure` will be documented in this file 4 | 5 | ## 1.0.0 - 201X-XX-XX 6 | 7 | - initial release 1.0.1 8 | Released on 13/11/2020 9 | No migrations on this version nor view a developer will create their own -------------------------------------------------------------------------------- /push.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | vendor/bin/phpunit 5 | 6 | (git push) || true 7 | 8 | git pull 9 | 10 | git add . 11 | 12 | 13 | read -p " Enter commit message: " message 14 | echo " Your commit message is $message !" 15 | 16 | git commit -m " $message " 17 | 18 | git push 19 | 20 | -------------------------------------------------------------------------------- /src/Configs/v1/TigoConfigs.php: -------------------------------------------------------------------------------- 1 | app->runningInConsole()) { 23 | $this->publishes([ 24 | __DIR__ . '/../config/config.php' => config_path('tigosecure.php'), 25 | ], 'config'); 26 | } 27 | } 28 | 29 | /** 30 | * Register the application services. 31 | */ 32 | public function register() 33 | { 34 | // Automatically apply the package configuration 35 | $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'tigosecure'); 36 | 37 | // Register the main class to use with the facade 38 | $this->app->singleton('tigosecure', function () { 39 | return new Tigosecure; 40 | }); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /config/config.php: -------------------------------------------------------------------------------- 1 | env("TIGO_CLIENT_ID"), 10 | 11 | /* 12 | * Tigosecure consumer secret 13 | */ 14 | 'secret' => env("TIGO_CLIENT_SECRET"), 15 | 16 | /* 17 | * Tigosecure api url 18 | */ 19 | 'api_url' => env("TIGO_API_URL"), 20 | 21 | /* 22 | * Tigosecure pin 23 | */ 24 | 'pin' => env("TIGO_PIN"), 25 | 26 | /* 27 | * Tigosecure account number 28 | */ 29 | 'account_number' => env("TIGO_ACCOUNT_NUMBER"), 30 | 31 | /* 32 | * Tigo secure account id 33 | */ 34 | 'account_id' => env("TIGO_ACCOUNT_ID"), 35 | 36 | 37 | /* 38 | * Your application url 39 | */ 40 | 'app_url' => env('APP_URL_LINK'), 41 | 42 | /* 43 | * Your application redirect url 44 | */ 45 | 'redirect_url' => env('TIGO_REDIRECT'), 46 | 47 | 48 | /* 49 | * Your application callback url 50 | */ 51 | 'callback_url' => env('TIGO_CALLBACK'), 52 | 53 | 54 | /* 55 | * Your application currency code ( TZS ) for Tanzania 56 | */ 57 | 'currency_code' => env('APP_CURRENCY_CODE'), 58 | 59 | 60 | /* 61 | * Your application language code en for english sw for swahili 62 | */ 63 | 'lang' => env('LANG') 64 | 65 | 66 | ]; 67 | 68 | 69 | -------------------------------------------------------------------------------- /.github/workflows/run-tests.yml: -------------------------------------------------------------------------------- 1 | name: run-tests 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | test: 7 | runs-on: ${{ matrix.os }} 8 | strategy: 9 | fail-fast: true 10 | matrix: 11 | os: [ubuntu-latest, windows-latest] 12 | php: [8.0] 13 | laravel: [8.*] 14 | stability: [prefer-lowest, prefer-stable] 15 | include: 16 | - laravel: 8.* 17 | testbench: 6.* 18 | 19 | name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} 20 | 21 | steps: 22 | - name: Checkout code 23 | uses: actions/checkout@v2 24 | 25 | - name: Setup PHP 26 | uses: shivammathur/setup-php@v2 27 | with: 28 | php-version: ${{ matrix.php }} 29 | extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo 30 | coverage: none 31 | 32 | - name: Setup problem matchers 33 | run: | 34 | echo "::add-matcher::${{ runner.tool_cache }}/php.json" 35 | echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" 36 | - name: Install dependencies 37 | run: | 38 | composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update 39 | composer update --${{ matrix.stability }} --prefer-dist --no-interaction 40 | - name: Execute tests 41 | run: vendor/bin/phpunit 42 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "epmnzava/tigosecure", 3 | "description": "This is a laravel package for integration with TigoPesa online API", 4 | "keywords": [ 5 | "epmnzava", 6 | "tigosecure", 7 | "tigo", 8 | "mobilemoney", 9 | "tanzania", 10 | "tigopesa tanzania" 11 | ], 12 | "homepage": "https://github.com/dbrax/tigopesa-tanzania.git", 13 | "license": "MIT", 14 | "type": "library", 15 | "authors": [ 16 | { 17 | "name": "Emmanuel Mnzava", 18 | "email": "epmnzava@gmail.com", 19 | "role": "Developer" 20 | } 21 | ], 22 | "autoload": { 23 | "psr-4": { 24 | "Epmnzava\\Tigosecure\\": "src" 25 | } 26 | }, 27 | "autoload-dev": { 28 | "psr-4": { 29 | "Epmnzava\\Tigosecure\\Tests\\": "tests" 30 | } 31 | }, 32 | "scripts": { 33 | "test": "vendor/bin/phpunit", 34 | "test-coverage": "vendor/bin/phpunit --coverage-html coverage" 35 | }, 36 | "config": { 37 | "sort-packages": true 38 | }, 39 | "extra": { 40 | "laravel": { 41 | "providers": [ 42 | "Epmnzava\\Tigosecure\\TigosecureServiceProvider" 43 | ], 44 | "aliases": { 45 | "Tigosecure": "Epmnzava\\Tigosecure\\TigosecureFacade" 46 | } 47 | } 48 | }, 49 | "require": { 50 | "ext-curl": "*", 51 | "ext-json": "*", 52 | "guzzlehttp/guzzle": "*", 53 | "illuminate/support": "^7.0|^8.0|^8.14|^9.0|^10.10|11.0|^11.1.1" 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Tigosecure.php: -------------------------------------------------------------------------------- 1 | get_access_token()); 42 | $this->issuedToken = $tokenArray->accessToken; 43 | } 44 | 45 | /** 46 | * make_payment 47 | * 48 | * @param $customer_firstname 49 | * @param $customer_lastname 50 | * @param $customer_email 51 | * @param $amount 52 | * @param $reference_id 53 | * @return mixed 54 | */ 55 | public function make_payment( 56 | $customer_firstname, 57 | $customer_lastname, 58 | $customer_email, 59 | $amount, 60 | $reference_id 61 | ) { 62 | 63 | $base_url = config('tigosecure.api_url'); 64 | $client_secret = config('tigosecure.secret'); 65 | $client_id = config('tigosecure.client_id'); 66 | $this->access_token(); 67 | 68 | $api = new TigoUtil($client_id, $client_secret, $base_url); 69 | 70 | 71 | 72 | $response = $api->makePaymentRequest( 73 | $this->issuedToken, 74 | $amount, 75 | $reference_id, 76 | $customer_firstname, 77 | $customer_lastname, 78 | $customer_email 79 | ); 80 | 81 | 82 | return json_decode($response); 83 | } 84 | 85 | /** 86 | * @param string $prefix 87 | * @param int $length 88 | * 89 | * @return string 90 | * @throws \Exception 91 | */ 92 | public function random_reference($prefix = 'TIGOPESA', $length = 15) 93 | { 94 | $keyspace = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; 95 | 96 | $str = ''; 97 | 98 | $max = mb_strlen($keyspace, '8bit') - 1; 99 | 100 | for ($i = 0; $i < $length; ++$i) { 101 | $str .= $keyspace[random_int(0, $max)]; 102 | } 103 | 104 | return $prefix . $str; 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Contributions are **welcome** and will be fully **credited**. 4 | 5 | Please read and understand the contribution guide before creating an issue or pull request. 6 | 7 | ## Etiquette 8 | 9 | This project is open source, and as such, the maintainers give their free time to build and maintain the source code 10 | held within. They make the code freely available in the hope that it will be of use to other developers. It would be 11 | extremely unfair for them to suffer abuse or anger for their hard work. 12 | 13 | Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the 14 | world that developers are civilized and selfless people. 15 | 16 | It's the duty of the maintainer to ensure that all submissions to the project are of sufficient 17 | quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used. 18 | 19 | ## Viability 20 | 21 | When requesting or submitting new features, first consider whether it might be useful to others. Open 22 | source projects are used by many developers, who may have entirely different needs to your own. Think about 23 | whether or not your feature is likely to be used by other users of the project. 24 | 25 | ## Procedure 26 | 27 | Before filing an issue: 28 | 29 | - Attempt to replicate the problem, to ensure that it wasn't a coincidental incident. 30 | - Check to make sure your feature suggestion isn't already present within the project. 31 | - Check the pull requests tab to ensure that the bug doesn't have a fix in progress. 32 | - Check the pull requests tab to ensure that the feature isn't already in progress. 33 | 34 | Before submitting a pull request: 35 | 36 | - Check the codebase to ensure that your feature doesn't already exist. 37 | - Check the pull requests to ensure that another person hasn't already submitted the feature or fix. 38 | 39 | ## Requirements 40 | 41 | If the project maintainer has any additional requirements, you will find them listed here. 42 | 43 | - **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://pear.php.net/package/PHP_CodeSniffer). 44 | 45 | - **Add tests!** - Your patch won't be accepted if it doesn't have tests. 46 | 47 | - **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. 48 | 49 | - **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option. 50 | 51 | - **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. 52 | 53 | - **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting. 54 | 55 | **Happy coding**! 56 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Tigopesa Secure API 4 | 5 | [![Latest Version on Packagist](https://img.shields.io/packagist/v/epmnzava/tigosecure.svg?style=flat-square)](https://packagist.org/packages/epmnzava/tigosecure) 6 | [![Total Downloads](https://img.shields.io/packagist/dt/epmnzava/tigosecure.svg?style=flat-square)](https://packagist.org/packages/epmnzava/tigosecure) 7 | [![Emmanuel Mnzava](https://img.shields.io/badge/Author-Emmanuel%20Mnzava-green)](mailto:epmnzava@gmail.com) 8 | 9 | This package is created to help developers intergrate with Tigopesa Tanzania secure online api 10 | 11 | ## Installation 12 | 13 | - Laravel Version: >= 8.* 14 | - PHP Version: >= 7.2 15 | 16 | You can install the package via composer: 17 | 18 | ```bash 19 | composer require epmnzava/tigosecure 20 | ``` 21 | 22 | ## Update your config (for Laravel 5.4 and below) 23 | 24 | Add the service provider to the providers array in config/app.php: 25 | 26 | ```php 27 | Epmnzava\Tigosecure\TigosecureServiceProvider::class, 28 | ``` 29 | Add the facade to the aliases array in config/app.php: 30 | 31 | ```php 32 | 'Tigosecure' =>\Epmnzava\Tigosecure\TigosecureFacade::class, 33 | ``` 34 | 35 | ## Publish the package configuration (for Laravel 5.4 and below) 36 | 37 | Publish the configuration file and migrations by running the provided console command: 38 | 39 | ```bash 40 | php artisan vendor:publish --provider="Epmnzava\Tigosecure\TigosecureServiceProvider" 41 | ``` 42 | ### Environmental Variables 43 | 44 | - TIGO_CLIENT_ID ` your provided tigopesa client id `
45 | 46 | - TIGO_CLIENT_SECRET ` your provided tigopesa client secret `
47 | 48 | - TIGO_API_URL ` your provided tigopesa api url `
49 | 50 | - TIGO_PIN ` your provided tigopesa pin number `
51 | 52 | - TIGO_ACCOUNT_NUMBER ` your provided tigopesa account number `
53 | 54 | - TIGO_ACCOUNT_ID ` your provided tigopesa account id `
55 | 56 | - TIGO_REDIRECT ` your redirect url `
57 | 58 | - TIGO_CALLBACK ` your callback url `
59 | 60 | - APP_CURRENCY_CODE ` currency put TZS for Tanzanian Shillings `
61 | 62 | - LANG ` language code en for english and sw for swalihi`
63 | 64 | ## Usage 65 | 66 | This release does not come with database tables for transaction or payments you need to create then After you have filled all necessary variables , providers and facades this is how the package can be used. 67 | 68 | On your controller 69 | 70 | ``` php 71 | redirectUrl); 89 | 90 | } 91 | 92 | ``` 93 | 94 | ### Testing 95 | 96 | ``` bash 97 | composer test 98 | ``` 99 | 100 | ### Changelog 101 | 102 | Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently. 103 | 104 | ## Contributing 105 | 106 | Please see [CONTRIBUTING](CONTRIBUTING.md) for details. 107 | 108 | ### Security 109 | 110 | If you discover any security related issues, please email epmnzava@gmail.com instead of using the issue tracker. 111 | 112 | ## Credits 113 | 114 | - [Emmanuel Mnzava](https://github.com/dbrax) 115 | - [Victor Deo Kapten](https://github.com/vdkapten) 116 | - [All Contributors](../../contributors) 117 | 118 | ## License 119 | 120 | The MIT License (MIT). Please see [License File](LICENSE.md) for more information. 121 | 122 | -------------------------------------------------------------------------------- /src/TigoUtil.php: -------------------------------------------------------------------------------- 1 | client_id = $client_id; 31 | $this->client_secret = $client_secret; 32 | $this->base_url = $base_url; 33 | } 34 | 35 | 36 | 37 | /** 38 | * @param $amount 39 | * @param $refersence_id 40 | * @param $customer_firstname 41 | * @param $custormer_lastname 42 | * @param $customer_email 43 | * @return string 44 | * 45 | * function that creates payment authentication json 46 | */ 47 | 48 | public function createPaymentAuthJson( 49 | $amount, 50 | $refecence_id, 51 | $customer_firstname, 52 | $custormer_lastname, 53 | $customer_email 54 | ): string { 55 | 56 | 57 | $paymentJson = '{ 58 | "MasterMerchant": { 59 | "account": "' . config('tigosecure.account_number') . '", 60 | "pin": "' . config('tigosecure.pin') . '", 61 | "id": "' . config('tigosecure.account_id') . '" 62 | }, 63 | "Merchant": { 64 | "reference": "", 65 | "fee": "0.00", 66 | "currencyCode": "" 67 | }, 68 | "Subscriber": { 69 | "account": "", 70 | "countryCode": "255", 71 | "country": "TZA", 72 | "firstName": "' . $customer_firstname . '", 73 | "lastName": "' . $custormer_lastname . '", 74 | "emailId": "' . $customer_email . '" 75 | }, 76 | "redirectUri":" ' . config('tigosecure.redirect_url') . '", 77 | "callbackUri": "' . config('tigosecure.callback_url') . '", 78 | "language": "' . config('tigosecure.lang') . '", 79 | "terminalId": "", 80 | "originPayment": { 81 | "amount": "' . $amount . '", 82 | "currencyCode": "' . config('tigosecure.currency_code') . '", 83 | "tax": "0.00", 84 | "fee": "0.00" 85 | }, 86 | "exchangeRate": "1", 87 | "LocalPayment": { 88 | "amount": "' . $amount . '", 89 | "currencyCode": "' . config('tigosecure.currency_code') . '" 90 | }, 91 | "transactionRefId": "' . $refecence_id . '" 92 | }'; 93 | 94 | 95 | 96 | 97 | return $paymentJson; 98 | } 99 | 100 | 101 | /** 102 | * Using Curl Request 103 | * @param string $base_url 104 | * @param $issuedToken 105 | * @param $amount 106 | * @param $refecence_id 107 | * @param $customer_firstname 108 | * @param $custormer_lastname 109 | * @param $customer_email 110 | * @return bool|string 111 | * 112 | */ 113 | 114 | public function makePaymentRequest($issuedToken, $amount, $refecence_id, $customer_firstname, $custormer_lastname, $customer_email) 115 | { 116 | 117 | $paymentAuthUrl = $this->base_url . self::PAYMENT_AUTHORIZATION_ENDPOINT; 118 | $ch = curl_init($paymentAuthUrl); 119 | curl_setopt_array($ch, array( 120 | CURLOPT_URL => $paymentAuthUrl, 121 | CURLOPT_RETURNTRANSFER => true, 122 | CURLOPT_ENCODING => "", 123 | CURLOPT_MAXREDIRS => 10, 124 | CURLOPT_TIMEOUT => 30, 125 | CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 126 | CURLOPT_CUSTOMREQUEST => "POST", 127 | CURLOPT_POSTFIELDS => $this->createPaymentAuthJson($amount, $refecence_id, $customer_firstname, $custormer_lastname, $customer_email), 128 | CURLOPT_HTTPHEADER => array( 129 | "accesstoken:" . $issuedToken, 130 | "cache-control: no-cache", 131 | "content-type: application/json", 132 | ), 133 | )); 134 | 135 | $response = curl_exec($ch); 136 | 137 | curl_close($ch); 138 | 139 | return $response; 140 | } 141 | 142 | public function get_access_token() 143 | { 144 | $access_token_url = $this->base_url . self::ACCESS_TOKEN_ENDPOINT; 145 | 146 | $data = [ 147 | 'client_id' => config('tigosecure.client_id'), 148 | 'client_secret' => config('tigosecure.secret') 149 | ]; 150 | //Will have to add try catch 151 | //try{ 152 | //} 153 | // catch(Throwable $e){ 154 | // report($e); 155 | // return json_encode(["message"=>"Error Found ".$e,"status"=>500]); 156 | // } 157 | 158 | $client = new Client; 159 | $response = $client->request('POST', $access_token_url, [ 160 | 'form_params' => $data 161 | ]); 162 | return $response->getBody(); 163 | 164 | 165 | } 166 | 167 | 168 | } 169 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Tigopesa Secure API 3 | 4 | [![Latest Version on Packagist](https://img.shields.io/packagist/v/epmnzava/tigosecure.svg?style=flat-square)](https://packagist.org/packages/epmnzava/tigosecure) 5 | [![Total Downloads](https://img.shields.io/packagist/dt/epmnzava/tigosecure.svg?style=flat-square)](https://packagist.org/packages/epmnzava/tigosecure) 6 | [![Emmanuel Mnzava](https://img.shields.io/badge/Author-Emmanuel%20Mnzava-green)](mailto:epmnzava@gmail.com) 7 | 8 | This package is created to help developers intergrate with Tigopesa Tanzania secure online api. More information of this can be found [here](https://epmnzava.medium.com/) 9 | 10 | ## Installation 11 | 12 | 13 | ## Version Matrix 14 | 15 | Version | Laravel | PHP Version 16 | ------- | --------- | ------------ 17 | 1.0.0 | 8.0 | >= 8.0 18 | 1.0.1 | 8.0 | >= 7.3 >= 8.0 19 | 1.0.2 | 8.0 | >= 7.2.5 >= 9.0 20 | 21 | You can install the package via composer: 22 | 23 | ```bash 24 | composer require epmnzava/tigosecure 25 | ``` 26 | 27 | ## Update your config (for Laravel 5.4 and below) 28 | 29 | Add the service provider to the providers array in config/app.php: 30 | 31 | ```php 32 | Epmnzava\Tigosecure\TigosecureServiceProvider::class, 33 | ``` 34 | Add the facade to the aliases array in config/app.php: 35 | 36 | ```php 37 | 'Tigosecure' =>\Epmnzava\Tigosecure\TigosecureFacade::class, 38 | ``` 39 | 40 | ## Publish the package configuration (for Laravel 5.4 and below) 41 | 42 | Publish the configuration file and migrations by running the provided console command: 43 | 44 | ```bash 45 | php artisan vendor:publish --provider="Epmnzava\Tigosecure\TigosecureServiceProvider" 46 | ``` 47 | ### Environmental Variables 48 | 49 | - TIGO_CLIENT_ID ` your provided tigopesa client id `
50 | 51 | - TIGO_CLIENT_SECRET ` your provided tigopesa client secret `
52 | 53 | - TIGO_API_URL ` your provided tigopesa api url `
54 | 55 | - TIGO_PIN ` your provided tigopesa pin number `
56 | 57 | - TIGO_ACCOUNT_NUMBER ` your provided tigopesa account number `
58 | 59 | - TIGO_ACCOUNT_ID ` your provided tigopesa account id `
60 | 61 | - TIGO_REDIRECT ` your redirect url `
62 | 63 | - TIGO_CALLBACK ` your callback url `
64 | 65 | - APP_CURRENCY_CODE ` currency put TZS for Tanzanian Shillings `
66 | 67 | - LANG ` language code en for english and sw for swalihi`
68 | 69 | ## Usage 70 | 71 | This release does not come with database tables for transaction or payments you need to create then After you have filled all necessary variables , providers and facades this is how the package can be used. 72 | 73 | On your controller 74 | 75 | ``` php 76 | redirectUrl); 94 | 95 | } 96 | 97 | ``` 98 | 99 | 100 | On your controller you can also call it through this way. 101 | ``` php 102 | make_payment("emmanuel","mnzava","epmnzava@gmail.com",4000,"48fhldplofhf".rand(5,100)); 124 | 125 | 126 | return redirect($response->redirectUrl); 127 | 128 | } 129 | 130 | ``` 131 | 132 | ### Testing 133 | 134 | ``` bash 135 | composer test 136 | ``` 137 | 138 | ### Changelog 139 | 140 | Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently. 141 | 142 | ## Contributing 143 | 144 | Please see [CONTRIBUTING](CONTRIBUTING.md) for details. 145 | 146 | ### Security 147 | 148 | If you discover any security related issues, please email epmnzava@gmail.com instead of using the issue tracker. 149 | 150 | ## Credits 151 | 152 | - [Emmanuel Mnzava](https://github.com/dbrax) 153 | - [All Contributors](../../contributors) 154 | 155 | ## License 156 | 157 | The MIT License (MIT). Please see [License File](LICENSE.md) for more information. 158 | 159 | --------------------------------------------------------------------------------