{"id":20051731,"url":"https://github.com/seerbit/seerbit-laravel","last_synced_at":"2025-03-02T08:42:22.787Z","repository":{"id":37901580,"uuid":"286240561","full_name":"seerbit/seerbit-laravel","owner":"seerbit","description":"Laravel SDK for SeerBit","archived":false,"fork":false,"pushed_at":"2024-08-05T05:24:15.000Z","size":1566,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-12T21:07:16.350Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/seerbit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-09T13:17:56.000Z","updated_at":"2024-08-05T05:23:56.000Z","dependencies_parsed_at":"2024-08-05T06:32:24.227Z","dependency_job_id":"12044eb3-d718-4c1b-9b4f-f3299cb6fb4a","html_url":"https://github.com/seerbit/seerbit-laravel","commit_stats":{"total_commits":12,"total_committers":4,"mean_commits":3.0,"dds":"0.41666666666666663","last_synced_commit":"6ef77ba606f6567e1b649e5ee09748bc92eefac1"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seerbit%2Fseerbit-laravel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seerbit%2Fseerbit-laravel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seerbit%2Fseerbit-laravel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seerbit%2Fseerbit-laravel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seerbit","download_url":"https://codeload.github.com/seerbit/seerbit-laravel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241482036,"owners_count":19969847,"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":[],"created_at":"2024-11-13T12:05:37.449Z","updated_at":"2025-03-02T08:42:22.750Z","avatar_url":"https://github.com/seerbit.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n\u003cdiv align=\"center\" \u003e\n \u003cimg width=\"200\"  valign=\"top\" src=\"https://assets.seerbitapi.com/images/seerbit_logo_type.png\"\u003e\n\u003c/div\u003e\n\n\n\u003ch1 align=\"center\"\u003e\n  \u003cimg width=\"60\" valign=\"bottom\" src=\"https://laravel.com/img/logomark.min.svg\"\u003e\n\u003c/h1\u003e\n\n\n# SeerBit's API SDK for Laravel \n\nSeerBit PHP SDK for easy integration with SeerBit's API.\n\n## Requirements\nThis package can be used with Laravel 5.8 or higher\nPHP 8.0 or higher\n\n## Installation\n\nThe preferred method is via [composer](https://getcomposer.org). Follow the composer\n[installation instructions](https://getcomposer.org/doc/00-intro.md) if you do not already have\ncomposer installed.\n\n\nOnce composer is installed, execute the following command in your project root to install this library:\n\n\n```bash\ncomposer require seerbit/seerbit-laravel\n```\n\nThe service provider will automatically register itself.\n\nYou can publish the config file with:\n```bash\n php artisan vendor:publish --provider=\"SeerbitLaravel\\SeerbitServiceProvider\" --tag=\"config\"\n```\n\nThis is the contents of the config file that will be published to your app's directory path `config/seerbit.php`:\n```php\nreturn [\n    'environment' =\u003e env('SEERBIT_ENVIRONMENT', \\Seerbit\\Environment::LIVE),\n    'public_key' =\u003e env('SEERBIT_PUBLIC_KEY'),\n    'secret_key' =\u003e env('SEERBIT_SECRET_KEY'),\n    'token' =\u003e env('SEERBIT_TOKEN'),\n];\n\n```\n\n####\nYou can find both public and secret keys from your merchant dashboard. \n\nThe token can be generated following the guides [here](https://doc.seerbit.com/getstarted/authentication)\n\nReplace them by changes the key values in your **.env** file.\n\nOpen your .env file and add your public key, secret key and token:\n\n```php\nSEERBIT_PUBLIC_KEY=xxxxxxxxxxxxx\nSEERBIT_SECRET_KEY=xxxxxxxxxxxxx\nSEERBIT_TOKEN=xxxxxxxxxxxxx\n```\n\n*If you are using a cloud hosting service such as lambda, etc, you may need to add the above details to your environment variables section.*\n\n```\nENSURE YOU DO NOT PUBLISH YOUR ENV FILE TO YOUR GIT REPOSITORY\n```\n \n## Usage\n\n### Standard checkout\n``` php\nnamespace App\\Http\\Controllers;\n\nuse SeerbitLaravel\\Facades\\Seerbit;\n\nclass Standard\n{\n        public function Checkout(){\n            try{\n            $uuid = bin2hex(random_bytes(6));\n            $transaction_ref = strtoupper(trim($uuid));\n            \n            $payload = [\n                \"amount\" =\u003e \"1000\",\n                \"callbackUrl\" =\u003e \"http:yourwebsite.com\",\n                \"country\" =\u003e \"NG\",\n                \"currency\" =\u003e \"NGN\",\n                \"email\" =\u003e \"customer@email.com\",\n                \"paymentReference\" =\u003e $transaction_ref,\n                \"productDescription\" =\u003e \"product_description\",\n                \"productId\" =\u003e \"64310880-2708933-427\",\n                \"tokenize\" =\u003e true //optional\n            ];\n\n            \n            // Initialize the payment with the Facade\n            // Or with Facade\n            $trans = SeerBit::Standard()-\u003eInitialize($payload);\n\n            // You can get your redirect link for customer payment from $tran\n            $redirectLink = $trans['data']['payments']['redirectLink'];\n\n            //  Redirect to this link in order to complete the transaction\n            if (!empty($redirectLink)) {\n                return redirect($redirectLink)-\u003ewith(\"status\", $trans['data']['message']);\n            } else {\n                //  Something went wrong while initiating the transaction\n                return redirect()-\u003eback()-\u003ewith('error', $trans['data']['message']);\n            }\n        \n        }catch (\\Exception $e){\n        //    Handle exception handling\n        }\n}\n```\n\nFull documentation can be found [**here**](https://seerbit.github.io/seerbit-laravel) \n\n\u003cbr\u003e\n\n## Configure Logger ##\n````php\n//Set Logger path in environment config file\nSEERBIT_LOGGER_PATH = \"\"\n````\n\u003cbr\u003e\n\n## API Documentation ##\n* https://doc.seerbit.com/\n\n### Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\nWe strongly encourage you to join us in contributing to this repository so everyone can benefit from:\n* New features and functionality\n* Resolved bug fixes and issues\n* Any general improvements\n\n### Security\n\nIf you discover any security related issues, please email developers@seerbit.com instead of using the issue tracker.\n\n## Credits\n\n- [Victor Osas Ighalo](https://github.com/victorighalo)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseerbit%2Fseerbit-laravel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseerbit%2Fseerbit-laravel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseerbit%2Fseerbit-laravel/lists"}