{"id":20051730,"url":"https://github.com/seerbit/seerbit-php-sdk","last_synced_at":"2025-05-05T11:31:52.517Z","repository":{"id":37901682,"uuid":"235055282","full_name":"seerbit/seerbit-php-sdk","owner":"seerbit","description":"SeerBit PHP Library","archived":false,"fork":false,"pushed_at":"2023-04-05T15:29:25.000Z","size":4340,"stargazers_count":1,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-28T06:09:14.765Z","etag":null,"topics":["payment-gateway","payment-integration","php","php-library","seerbit"],"latest_commit_sha":null,"homepage":"https://seerbit.com","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/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}},"created_at":"2020-01-20T08:41:30.000Z","updated_at":"2023-02-28T15:40:00.000Z","dependencies_parsed_at":"2022-08-19T21:50:25.705Z","dependency_job_id":null,"html_url":"https://github.com/seerbit/seerbit-php-sdk","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seerbit%2Fseerbit-php-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seerbit%2Fseerbit-php-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seerbit%2Fseerbit-php-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seerbit%2Fseerbit-php-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seerbit","download_url":"https://codeload.github.com/seerbit/seerbit-php-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224443947,"owners_count":17312127,"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":["payment-gateway","payment-integration","php","php-library","seerbit"],"created_at":"2024-11-13T12:05:37.236Z","updated_at":"2024-11-13T12:05:37.764Z","avatar_url":"https://github.com/seerbit.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\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# SeerBit PHP Library\n\nThis library provides convenient access to the SeerBit API from PHP based applications. It provides Utility classses to access API resources on SeerBit.\n\n## Integration\nThe Library supports all APIs under the following services:\n\n* Standard Checkout\n* Payment via Card and Bank Account\n* Recurrent transactions\n* Card Tokenization\n* Pre-authorized payment\n* Order Payments\n* Mobile Money Payments\n* Transaction Validation\n\n## Requirements\nPHP 8\n\n## Installation ##\nYou can use Composer or simply Download the Release\n\n### Composer ###\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```sh\ncomposer require seerbit/seerbit-php-sdk\n```\n\n### Find examples [**here**](./src/Examples) \n\n#### Example 1 : Start a Standard transaction ###\n\n```php\n\ntry{\n    $token = \"YOUR MERCHANT TOKEN\";\n    //Instantiate SeerBit Client\n    $client = new Client();\n\n    //Configure SeerBit Client\n    $client-\u003esetToken($token);\n\n    //SETUP CREDENTIALS\n    $client-\u003esetPublicKey(\"MERCHANT_PUBLIC_KEY\"); //REQUIRED\n    $client-\u003esetSecretKey(\"MERCHANT_SECRET_KEY\"); //OPTIONAL\n\n    //Instantiate Resource Service\n    $standard_service =  New StandardService($client);\n    $uuid = bin2hex(random_bytes(6));\n    $transaction_ref = strtoupper(trim($uuid));\n\n    //the order of placement is important\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    $transaction = $standard_service-\u003eInitialize($payload);\n\n    echo($transaction-\u003etoJson());\n\n}catch (\\Exception $exception){\n    echo $exception-\u003egetMessage();\n}\n```\n### Find more examples [**here**](./src/Examples)\n\n\n\u003cu\u003eHow to Generate a Token?\u003c/u\u003e\n```\ncurl --location 'https://seerbitapi.com/api/v2/encrypt/keys' \\\n--header 'Content-Type: application/json' \\\n--data '{\n\t\"key\": \"merchantSecretKey.merchantPublicKey\"\n}'\n```\n\n\u003cu\u003eGenerate Token Response\u003c/u\u003e\n\n```\n{\n\t\"status\": \"SUCCESS\",\n\t\"data\": {\n\t\t\t\"code\": \"00\",\n\t\t\t\"EncryptedSecKey\": {\n\t\t\t\t\t\"encryptedKey\": \"SNt8kjeVjsdTG4lPlwg6sTvpVAay2RA7hoCEzHPkIQa+MNfDepx4VBr5JMgLb5Q5anq9XoN2pXU850bumqBWFVw1T1ZW5w8N+Sq/\"\n\t\t\t},\n\t\t\t\"message\": \"Successful\"\n\t}\n}\n```\n\n\n## Configure Logger ##\n````php\n//Set Logger path\n$client-\u003esetLoggerPath(dirname(__FILE__));\n\n//Set custom Logger\n$client-\u003esetLogger = $-\u003eCustomLoggerService();\n````\n\n## Documentation ##\n* https://doc.seerbit.com/\n\n## Examples ##\n[**Examples**](./src/Examples) \n\n### Changelog\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n\n## Support\nIf you have any problems, questions or suggestions, create an issue here or send your inquiry to developers@seerbit.com.\n\n## Contributing\nWe 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\nRead our [**contribution guidelines**](CONTRIBUTING.md) to find out how.\n\n## Licence\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseerbit%2Fseerbit-php-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseerbit%2Fseerbit-php-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseerbit%2Fseerbit-php-sdk/lists"}