{"id":15226384,"url":"https://github.com/ovac/hubtel-payment","last_synced_at":"2025-04-09T20:30:27.320Z","repository":{"id":57034193,"uuid":"99621196","full_name":"ovac/hubtel-payment","owner":"ovac","description":"🎉A comprehensive PHP Client Package for consuming the Hubtel Payment API","archived":false,"fork":false,"pushed_at":"2019-03-27T21:51:10.000Z","size":10624,"stargazers_count":14,"open_issues_count":0,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-14T10:08:00.888Z","etag":null,"topics":["ghana","hubtel","hubtel-payment","mess-detector","mobile-money","mtn","mtnmobilemoney","ovac","ovac4u","phpunit","tests","watchr"],"latest_commit_sha":null,"homepage":"https://www.ovac4u.com/hubtel-payment","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ovac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-07T21:16:18.000Z","updated_at":"2024-04-04T03:56:14.000Z","dependencies_parsed_at":"2022-08-24T14:10:28.971Z","dependency_job_id":null,"html_url":"https://github.com/ovac/hubtel-payment","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovac%2Fhubtel-payment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovac%2Fhubtel-payment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovac%2Fhubtel-payment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovac%2Fhubtel-payment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ovac","download_url":"https://codeload.github.com/ovac/hubtel-payment/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248107054,"owners_count":21048846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ghana","hubtel","hubtel-payment","mess-detector","mobile-money","mtn","mtnmobilemoney","ovac","ovac4u","phpunit","tests","watchr"],"created_at":"2024-09-28T20:04:54.748Z","updated_at":"2025-04-09T20:30:27.296Z","avatar_url":"https://github.com/ovac.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\" style=\"border: 5px solid #000000\"\u003e\n\u003ca href=\"https://developers.hubtel.com/documentations/merchant-account-api\" target=\"_blank\"\u003e\u003cimg src=\"http://res.cloudinary.com/ovac/image/upload/h_200/v1506824544/4a_Uw7r_ljybq3.jpg\"\u003e\u003c/a\u003e\n\u003ca href=\"#\" target=\"_blank\"\u003e\u003cimg src=\"http://res.cloudinary.com/ovac/image/upload/h_120/v1506828786/logo-composer-transparent_zjgal0.png\"\u003e\u003c/a\u003e\n\u003ca href=\"#\" target=\"_blank\"\u003e\u003cimg src=\"http://res.cloudinary.com/ovac/image/upload/h_200/v1506828063/brand_pbmsjk.gif\"\u003e\u003c/a\u003e\n\u003cbr\u003e\n\u003ca href=\"http://www.ovac4u.com/hubtel-payment\" target=\"_blank\"\u003e\u003cimg src=\"http://res.cloudinary.com/ovac/image/upload/v1506828380/logo_size_invert_jelh74.jpg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n# OVAC Hubtel Payment\nThe best and most comphrensive PHP Client for consuming the Hubtel Payment API and for sending and receiving Mobile Money Payment from a php application with an elegant **Write as it sounds** syntax.\n\n[![Build Status](https://travis-ci.org/ovac/hubtel-payment.svg?branch=master)](https://travis-ci.org/ovac/hubtel-payment) \n[![Coverage Status](https://coveralls.io/repos/github/ovac/hubtel-payment/badge.svg?branch=master)](https://coveralls.io/github/ovac/hubtel-payment?branch=master)\n[![Latest Stable Version](https://poser.pugx.org/ovac/hubtel-payment/v/stable)](https://packagist.org/packages/ovac/hubtel-payment)\n[![Total Downloads](https://poser.pugx.org/ovac/hubtel-payment/downloads)](https://packagist.org/packages/ovac/hubtel-payment)\n[![License](https://poser.pugx.org/ovac/hubtel-payment/license)](https://packagist.org/packages/ovac/hubtel-payment)\n[![Dependency Status](https://www.versioneye.com/user/projects/598fccd8368b081653c84e2e/badge.svg)](https://www.versioneye.com/user/projects/598fccd8368b081653c84e2e)\n\n```md\n Follow me anywhere @ovac4u                         | GitHub\n _________                          _________       | Twitter\n|   ___   |.-----.--.--.---.-.----.|  |  |.--.--.   | Facboook\n|  |  _   ||  _  |  |  |  _  |  __||__    |  |  |   | Instagram\n|  |______||_____|\\___/|___._|____|   |__||_____|   | Github + @ovac\n|_________|                        www.ovac4u.com   | Facebook + @ovacposts\n```\n\n## What is it?\n\nOVAC/Hubtel-Payment is a comphrensive PHP client for consuming the Hubtel Mobile Money Payment server API. It's a full-on PHP toolbet sugar-coated by an elegant syntax directly inspired by the [Laravel framework](http://www.laravel.com).\n\nIt features a good set of methods and tests for accessing the Hubtel Mobile Money Payment with a **Write as it sounds** syntax. Oh also it is growing all the time.\n\nWhat's the cherry on top? It wraps nicely around native Guzzlehttp client and uses most of PHP best practices in relation to usability and security. What does this mean? This means that `Pay::receiveMoney()-\u003efrom(0553577261)-\u003erun();` actually places a dynamic call behind the scene in a very secure manner using the phone number as the Customer's idn as required by the Hubtel's Mobile Money Receive Money api and prompts the owner of the phone number as an agent.\n\n## Install OVAC\\Hubtel-Payment\n\nTo install OVAC\\HubtelPayment library, simply run \n```\n$ composer require ovac/hubtel-payment\n```\n\n## OVAC\\Hubtel-Payment Basic Usage\n\nFirst Obtain a Hubtel Developer Account Number, ClientID and ClientSecret from https://unity.hubtel.com/account/api-accounts-add\n\n#### The ReceiveMoney class may be used to send a prompt to the customer's phone to receive money like a mobile-money agent as follows:\n\n```php\n\u003c?php\nrequire_once __DIR__ . '/vendor/autoload.php';\n\nuse OVAC\\HubtelPayment\\Config;\nuse OVAC\\HubtelPayment\\Api\\Transaction\\ReceiveMoney;\n\n// First Create configuration with your Hubtel Developer Credentials\n// The Account Number, ClientID and ClientSecret accordingly.\n$config = new Config(Account_Nnumber, ClientId, ClientSecret);\n\n$payment =  ReceiveMoney::from('0553577261')          //- The phone number to send the prompt to.\n                -\u003eamount(100.00)                    //- The exact amount value of the transaction\n                -\u003edescription('Online Purchase')    //- Description of the transaction.\n                -\u003ecustomerName('Ariama Victor')     //- Name of the person making the payment.\n                -\u003ecallback('http://ovac4u.com/pay') //- The URL to send callback after payment.\t\n                -\u003echannel('mtn-gh')                 //- The mobile network Channel.\n                -\u003einjectConfig($config)             //- Inject the configuration\n                -\u003erun();                            //- Run the transaction after required data.\n```\n\n\n#### The SendMoney class may also be used to send money to any mobile money customer as follows:\n\n```php\n\u003c?php\nrequire_once __DIR__ . '/vendor/autoload.php';\n\nuse OVAC\\HubtelPayment\\Config;\nuse OVAC\\HubtelPayment\\Api\\Transaction\\SendMoney;\n\n// First Create configuration with your Hubtel Developer Credentials\n// The Account Number, ClientID and ClientSecret accordingly.\n$config = new Config(Account_Nnumber, ClientId, ClientSecret);\n\n$payment = SendMoney::to('0553577261')                //- The phone number to send the prompt to.\n                -\u003eamount(100.00)                    //- The exact amount value of the transaction\n                -\u003edescription('Online Purchase')    //- Description of the transaction.\n                -\u003ecustomerEmail('admin@ovac4u.com') //- Name of the person making the payment.\n                -\u003ecallback('http://ovac4u.com/pay') //- The URL to send callback after payment.\t\n                -\u003echannel('mtn-gh')                 //- The mobile network Channel.\n                -\u003einjectConfig($config)             //- Inject the configuration\n                -\u003erun();                            //- Run the transaction after required data.\n```\n\n\n#### The Refund class may also refund money a customer paid in a previous transaction:\n\n```php\n\u003c?php\nrequire_once __DIR__ . '/vendor/autoload.php';\n\nuse OVAC\\HubtelPayment\\Config;\nuse OVAC\\HubtelPayment\\Api\\Transaction\\Refund;\n\n// First Create configuration with your Hubtel Developer Credentials\n// The Account Number, ClientID and ClientSecret accordingly.\n$config = new Config(Account_Nnumber, ClientId, ClientSecret);\n\n$payment = Refund::transactionId(1234)              //- The ID of the transaction to refund.\n                -\u003eamount(100.00)                    //- The exact amount value of the transaction\n                -\u003eclientReference('#11212')         //- A refeerence on your end.\n                -\u003edescription('Useless Purchase')   //- Description of the transaction.\n                -\u003ereason('No longer needs a pen')   //- Name of the person making the payment.\n                -\u003efull()                            //- Full or partial refund.\n                -\u003einjectConfig($config)             //- Inject the configuration\n                -\u003erun();                            //- Run the transaction after required data.\n```\n\n# Documentation\n\nYou can find a detailed summary of all classes and methods on the [official page](https://www.ovac4u.com/hubtel-payment). The changelog is available in the CHANGELOG file.\n\nYou can find a detailed summary of all classes and methods in the repo's wiki or the official page. The changelog is available in the CHANGELOG file.\n\n## Tests\n\nif you have phpunit installed globally\n\n```\n$ vendor/bin/phpunit\n```\n\nor use the composer script\n\n```\n$ composer phpunit\n```\n\n#### Code analysis tools\n\n***lint/checkstyle*** with phpcs:\n\n```\n$ composer phpcs\n```\n\n***mess detector*** with phpmd:\n\n```\n$ composer phpmd\n```\n\n***copy \u0026 paste detector*** with phpcpd:\n\n```\n$ composer phpcpd\n```\n\n***phpunit, lint, mess detector*** in one command:\n\n```\n$ composer test\n```\n\n\n\n## CI\n\nA simple ci bash script exists under bin folder\n\n```\n$ bin/ci.sh\n```\n\n## Contributing\n\nThank you for considering contributing to Laravel Hackathon Starter. The contribution guide can be found in the [Contribution File](https://github.com/ovac/hubtel-payment/blob/master/CONTRIBUTING.md)\n\n## Security\n\nIf you discover any security related issues, please email \ninstead of using the issue tracker.\n\n## Credits\n\n- [All contributors](https://github.com/ovac/hubtel-payment/graphs/contributors)\n\n## Licence\n* [Licence: MIT](https://github.com/ovac/hubtel-payment/licence)\n\n\n## Reference\n- [Official Page](https://www.ovac4u.com/hubtel-payment)\n- [Official Repo: Github](https://www.github.com/ovac/hubtel-payment)\n- [Hubtel Merchant Payment Reference](https://developers.hubtel.com/documentations/merchant-account-api)\n- [Laravel framework](http://laravel.com)\n- [LICENCE: MIT](https://github.com/ovac/hubtel-payment/blob/licence)\n- [CHANGELOG](https://github.com/ovac/hubtel-payment/blob/master/CHANGELOG.md)\n\n\n## How can I thank you?\n\nWhy not star the github repo? I'd love the attention! Why not share the link for this repository on Twitter or HackerNews? Spread the word!\n\nDon't forget to follow me on [instagram](http://www.instagram.com/ovac4u) and [twitter](http://www.twitter.com/ovac4u) \n\nThanks!\nAriama Victor (ovac4u).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovac%2Fhubtel-payment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fovac%2Fhubtel-payment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovac%2Fhubtel-payment/lists"}