{"id":15627086,"url":"https://github.com/adelowo/gbowo-paystack","last_synced_at":"2025-04-28T18:33:32.740Z","repository":{"id":54894097,"uuid":"83103494","full_name":"adelowo/gbowo-paystack","owner":"adelowo","description":"Add-ons for Gbowo's paystack adapter","archived":false,"fork":false,"pushed_at":"2022-05-05T12:39:17.000Z","size":51,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-20T11:16:17.860Z","etag":null,"topics":["gbowo","paystack","php7"],"latest_commit_sha":null,"homepage":"","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/adelowo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-25T03:35:22.000Z","updated_at":"2017-04-17T05:36:21.000Z","dependencies_parsed_at":"2022-08-14T06:00:40.246Z","dependency_job_id":null,"html_url":"https://github.com/adelowo/gbowo-paystack","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adelowo%2Fgbowo-paystack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adelowo%2Fgbowo-paystack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adelowo%2Fgbowo-paystack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adelowo%2Fgbowo-paystack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adelowo","download_url":"https://codeload.github.com/adelowo/gbowo-paystack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251366321,"owners_count":21578104,"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":["gbowo","paystack","php7"],"created_at":"2024-10-03T10:15:19.027Z","updated_at":"2025-04-28T18:33:32.717Z","avatar_url":"https://github.com/adelowo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Gbowo-Paystack - An extra set of plugins for Gbowo's Paystack adapter\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/adelowo/gbowo-paystack.svg?style=flat-square)](https://packagist.org/packages/adelowo/gbowo-paystack)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)\n[![Build Status](https://img.shields.io/travis/adelowo/gbowo-paystack/master.svg?style=flat-square)](https://travis-ci.org/adelowo/gbowo-paystack)\n[![Scrutinizer Coverage](https://img.shields.io/scrutinizer/coverage/g/adelowo/gbowo-paystack.svg?style=flat-square)](https://scrutinizer-ci.com/g/adelowo/gbowo-paystack/?branch=master)\n[![Quality Score](https://img.shields.io/scrutinizer/g/adelowo/gbowo-paystack.svg?style=flat-square)](https://scrutinizer-ci.com/g/adelowo/gbowo-paystack)\n[![Total Downloads](https://img.shields.io/packagist/dt/adelowo/gbowo-paystack.svg?style=flat-square)](https://packagist.org/packages/adelowo/gbowo-paystack)\n\n\u003e This package is an add-on to the Paystack Adapter provided by [Gbowo][gbowo] and is therefore not guaranteed to have the same API as that of an add-on package of any alternative payment adapter supported by [Gbowo][gbowo]\n\n- [Installation](#install)\n- [Available Plugins](#plugins)\n\n\n\u003ch2 id=\"install\"\u003e\u003c/h2\u003e\n\n```bash\n$ composer require adelowo/gbowo-paystack\n```\n### Usage\n\n[Gbowo's doc][gbowo] is highly recommended and is a good place to start.\n\nDepending on what you are trying to accomplish, you'd ideally want to take a look at all available plugins here:\n\n\u003ch2 id=\"plugins\"\u003e\u003c/h2\u003e\n\n\u003e Only add plugins you need. There isn't a reason to add everything into the adapter.\n\n- `Paystack\\Customer\\CreateCustomer` : Create a new customer\n\n```php\n\n$paystack-\u003eaddPlugin(new Paystack\\Customer\\CreateCustomer(PaystackAdapter::API_LINK));\n\n$data = $paystack-\u003ecreateCustomer([\"email\" =\u003e \"me@lanreadelowo.com\", \"first_name\" =\u003e \"Lanre\", \"last_name\" =\u003e \"Adelowo\"]);\n\n//$data contains the details of the newly created customer\n\n```\n\n- `Paystack\\Customer\\UpdateCustomer` : Update a customer's data\n\n```php\n\n$paystack-\u003eaddPlugin(new Paystack\\Customer\\UpdateCustomer(PaystackAdapter::API_LINK));\n\n$data = $paystack-\u003eupdateCustomer(\"customerCode\", [\"email\" =\u003e \"lanre@coolstartup.com\"]);\n\n//$data contains the details of the updated customer\n\n```\n\n- `Paystack\\Customer\\DeactivateAuthorization` : Deactivate the authorization code for a user. If you do this, you are essentially ___forgetting___ a user's card and would lose the ability to charge that card.\n \n\u003e Example usecase =\u003e When a user is deleting his account or deletes a card.\n\n```php\n\n$paystack-\u003eaddPlugin(new Paystack\\Transaction\\DeactivateAuthorization(PaystackAdapter::API_LINK));\n\n$isDeactivated = $paystack-\u003edeactivateAuthorization(\"AUTH_cod3_h3r3\");\n\n//$isDeactivated is a boolean which truthiness determines if the authorization code was succesffuly deactivated\n```\n\n- `Paystack\\Transaction\\ExportTransactions` : Export all of your transactions with Paystack\n\n```php\n\n$paystack-\u003eaddPlugin(new Paystack\\Transaction\\ExportTransactions(PaystackAdapter::API_LINK));\n\n//can also pass in an array into the method call,\n//e.g [\"settled\" =\u003e true, \"currency\" =\u003e \"NGN\", \"status\" =\u003e \"Some status\"]\n//The dictionary would be converted to a query string which is sent alongside the request. \n//Do review the docs for valid params.\n$pathToFile = $paystack-\u003eexportTransactions();\n\n//$pathToFile would contain a link to a csv file which you then have to download\n```\n\n- `Paystack\\Transaction\\GetTransaction` : Fetch the details of a specific transaction\n\n```php\n\n$paystack-\u003eaddPlugin(new Paystack\\Transaction\\GetTransaction(PaystackAdapter::API_LINK));\n\n$data = $paystack-\u003egetTransaction(\"20911\");\n\n//$data would contain everything paystack knows about that transaction\n```\n\n- `Paystack\\Subscription\\CreateSubscription` - Add a new subscription to the dashboard\n\n```php\n$paystack-\u003eaddPlugin(new Paystack\\Subscription\\CreateSubscription(PaystackAdapter::API_LINK));\n\n$data = $paystack-\u003ecreateSubscription(string $customerCode, string $planCode, string $customerAuthCode = \"\");\n//The customer auth code can be excluded as it is only useful for customers with multiple authorizations.\n//Please check the docs.\n\n```\n\n- `Paystack\\Subscription\\GetAllSubscriptions` - Retrieve all subscriptions in the dashboard\n\n```php\n$paystack-\u003eaddPlugin(new Paystack\\Subscription\\GetAllSubscriptions(PaystackAdapter::API_LINK));\n\n$data = $paystack-\u003egetAllSubscriptions();\n\n```\n\n- `Paystack\\Subscription\\GetSubscription` - Retrieve a certain subscription from the dashboard\n\n```php\n$paystack-\u003eaddPlugin(new Paystack\\Subscription\\GetSubscription(PaystackAdapter::API_LINK));\n\n$data = $paystack-\u003egetSubscription(\"SUB_code\");\n\n```\n\n- `Paystack\\Plan\\CreatePlan` - Adds a new plan to the dashboard\n\n```php\n$paystack-\u003eaddPlugin(new Paystack\\Plan\\CreatePlan(PaystackAdapter::API_LINK));\n\n$params = [\"name\" =\u003e \"some plan\", \"amount\" =\u003e 1000, \"interval\" =\u003e \"hourly\"];\n//visit the api docs to see all possible data that can be sent\n\n$data = $paystack-\u003ecreatePlan($params);\n\n```\n\n- `Paystack\\Plan\\UpdatePlan` - Updates a plan in the dashboard\n\n```php\n$paystack-\u003eaddPlugin(new Paystack\\Plan\\UpdatePlan(PaystackAdapter::API_LINK));\n\n$params = [\"name\" =\u003e \"renaming this plan\", \"amount\" =\u003e 2000, \"interval\" =\u003e \"weekly\"];\n//visit the api docs to see all possible data that can be sent\n\n$status = $paystack-\u003eupdatePlan(\n\t\"PLN_gx2wn530m0i3w3m\",\n         [\"name\" =\u003e \"renaming this plan yet again\", \"amount\" =\u003e \\Gbowo\\toKobo(200000), \"interval\" =\u003e \"weekly\"]);\n\n\t\n```\n\n- `Paystack\\Bank\\ListBanks` - Fetch a list of all banks known to Paystack\n\n```php\n\n$paystack-\u003eaddPlugin(new ListBanks(PaystackAdapter::API_LINK));\n\n$banks = $paystack-\u003elistBanks();\n// $paystack-\u003elistBanks([\"perPage\" =\u003e 20, \"page\" =\u003e 2]); //show 20 banks and show results from the second page (the results are paginated) \n\n```\n\n\n- `Paystack\\Bank\\GetBVN` - Fetch the details of a user's BVN (Bank Verification Number)\n\n```php\n$paystack-\u003eaddPlugin(new GetBVN(PaystackAdapter::API_LINK));\n$data = $paystack-\u003egetBVN(\"12345678901\"); //Must be 11 digits, else an exception is thrown\n```\n\n\n- `Paystack\\Bank\\GetAccountDetails` - Fetch the details of a user's account number.\n\n```php\n\n$paystack-\u003eaddPlugin(new GetAccountDetails(PaystackAdapter::API_LINK));\n\n//Yeah, that's a valid account number. Run the code to get my bank details and throw me some cash :)\n$data = $paystack-\u003egetAccountDetails([\"account_number\" =\u003e \"0115544526\", \"bank_code\" =\u003e \"058\"]));\n```\n\n- `Paystack\\Bank\\GetCardBIN` - Fetch the details of a card via it's BIN (Bank Identification number)\n\n```php\n$paystack-\u003eaddPlugin(new GetCardBIN(PaystackAdapter::API_LINK));\n$data = $paystack-\u003egetCardBIN(\"123456\");\n```\n\n\n- `Paystack\\Customer\\CheckPending` - Check the status of a previously pending transaction.\n\n```php\n\n$paystack-\u003eaddPlugin(new CheckPending(PaystackAdapter::API_LINK));\n$data = $paystack-\u003echeckPending($transactionRef);\n```\n\n### Contributing\n\nAwesome, I'd love that. Fork, send PR. But hey, unit testing is one honking great idea. Let's have more of that.\n\n### Bug Reports, Issue tracking and Security Vulnerabilities\n\nPlease make use of the [issue tracker](https://github.com/adelowo/gbowo-paystack/issues) for bug reports, feature request and others except Security issues. If you do discover a vulnerability, please send a mail to `me@lanreadelowo.com`.\n\n### License\n[MIT](http://opensource.org/licenses/MIT)\n\n[gbowo]: https://github.com/adelowo/gbowo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadelowo%2Fgbowo-paystack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadelowo%2Fgbowo-paystack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadelowo%2Fgbowo-paystack/lists"}