{"id":22410447,"url":"https://github.com/ferdhika31/ipaymu-php","last_synced_at":"2025-03-27T02:42:02.086Z","repository":{"id":56074214,"uuid":"315871520","full_name":"ferdhika31/iPaymu-php","owner":"ferdhika31","description":"iPaymu REST API Client for PHP","archived":false,"fork":false,"pushed_at":"2020-11-27T10:43:55.000Z","size":82,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-01T08:16:10.348Z","etag":null,"topics":["composer-package","ipaymu","ipaymu-api","library","payment-gateway","payment-gateway-indonesia","php-cli","php7"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ferdhika31.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":"2020-11-25T08:13:14.000Z","updated_at":"2024-11-23T09:30:47.000Z","dependencies_parsed_at":"2022-08-15T12:40:33.575Z","dependency_job_id":null,"html_url":"https://github.com/ferdhika31/iPaymu-php","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferdhika31%2FiPaymu-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferdhika31%2FiPaymu-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferdhika31%2FiPaymu-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferdhika31%2FiPaymu-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ferdhika31","download_url":"https://codeload.github.com/ferdhika31/iPaymu-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245772885,"owners_count":20669718,"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":["composer-package","ipaymu","ipaymu-api","library","payment-gateway","payment-gateway-indonesia","php-cli","php7"],"created_at":"2024-12-05T13:09:19.962Z","updated_at":"2025-03-27T02:42:02.066Z","avatar_url":"https://github.com/ferdhika31.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"iPaymu REST API Client PHP\n==============\n\n[iPaymu](https://ipaymu.com) API wrapper written in PHP for access from applications.\n\n[![Build Status](https://travis-ci.org/ferdhika31/iPaymu-php.svg?branch=main)](https://travis-ci.org/ferdhika31/iPaymu-php)\n[![StyleCI](https://github.styleci.io/repos/315871520/shield?branch=main)](https://github.styleci.io/repos/315871520)\n[![Coverage Status](https://coveralls.io/repos/ferdhika31/iPaymu-php/badge.svg?branch=main\u0026service=github)](https://coveralls.io/github/ferdhika31/iPaymu-php?branch=main)\n[![Latest Stable Version](https://poser.pugx.org/ferdhika31/iPaymu-php/v/stable)](https://packagist.org/packages/ferdhika31/iPaymu-php)\n[![Total Downloads](https://poser.pugx.org/ferdhika31/iPaymu-php/downloads)](https://packagist.org/packages/ferdhika31/iPaymu-php)\n[![Latest Unstable Version](https://poser.pugx.org/ferdhika31/iPaymu-php/v/unstable)](https://packagist.org/packages/ferdhika31/iPaymu-php)\n[![License](https://poser.pugx.org/ferdhika31/iPaymu-php/license)](https://packagist.org/packages/ferdhika31/iPaymu-php)\n\n## Documentation\n\nFor the API documentation, please check [iPaymu API Documentation](https://ipaymu.com/en/api-documentation/).\n\n## Installation\n\nInstall the package with [composer](https://getcomposer.org/) by following command:\n```\ncomposer require ferdhika31/ipaymu-php\n```\n\n## Usage\n\n### Initialization\nConfigure package with your account's secret key obtained from iPaymu Dashboard. You can use [production](https://my.ipaymu.com/) or [sandbox](https://sandbox.ipaymu.com/) environment.\n\n```php\n\u003c?php\nuse ferdhika31\\iPaymuPHP\\iPaymu;\n\n$config = [\n    'env'               =\u003e 'SANDBOX', // SANDBOX or PRODUCTION\n    'virtual_account'   =\u003e 'your_virtual_account',\n    'api_key'           =\u003e 'your_api_key',\n    'notify_uri'        =\u003e 'http://localhost:8000/notify',\n    // for redirect payment is required\n    'cancel_uri'        =\u003e 'http://localhost:8000/cancel',\n    'return_uri'        =\u003e 'http://localhost:8000/return'\n];\n\niPaymu::init($config);\n```\nSee [example codes](./examples) for more details.\n\n### Get Balance\n```php\n\u003c?php\nuse ferdhika31\\iPaymuPHP\\Balance;\n\n$getBalance = Balance::getBalance();\n```\n\n### Set Customer\n```php\n\u003c?php\n$customer = [\n    'name' =\u003e 'Dika',\n    'email' =\u003e 'fer@dika.web.id',\n    'phone' =\u003e '083213123332'\n];\niPaymu::setCustomer($customer);\n```\n\n### Add Product\n```php\n\u003c?php\niPaymu::addProduct([\n    'name'          =\u003e 'Mangga',\n    'qty'           =\u003e 2,\n    'price'         =\u003e 2500,\n    'description'   =\u003e 'Mangga cobian'\n]);\niPaymu::addProduct([\n    'name'          =\u003e 'Jeruk',\n    'qty'           =\u003e 1,\n    'price'         =\u003e 1500,\n    'description'   =\u003e 'Jeruk haseum'\n]);\n```\n\n### Create Redirect Payment\n```php\n\u003c?php\nuse ferdhika31\\iPaymuPHP\\PaymentRedirect;\n\n// optional\n$payloadTrx = [\n    'expired' =\u003e 1, // in hours\n    'comments' =\u003e 'Transaction comment here',\n    'referenceId' =\u003e 'TRX202008310001'\n];\n\n$redirectPayment = PaymentRedirect::create($payloadTrx);\n```\n\n### Create Redirect Payment with Payment Method\n```php\n\u003c?php\nuse ferdhika31\\iPaymuPHP\\PaymentRedirect;\n\n// optional\n$payloadTrx = [\n    'expired' =\u003e 1, // in hours\n    'comments' =\u003e 'Transaction comment here',\n    'referenceId' =\u003e 'TRX202008310001'\n];\n\n$redirectPayment = PaymentRedirect::mandiriVA()-\u003ecreate($payloadTrx);\n$redirectPayment = PaymentRedirect::niagaVA()-\u003ecreate($payloadTrx);\n$redirectPayment = PaymentRedirect::BNIVA()-\u003ecreate($payloadTrx);\n$redirectPayment = PaymentRedirect::BAGVA()-\u003ecreate($payloadTrx);\n$redirectPayment = PaymentRedirect::BCATransfer()-\u003ecreate($payloadTrx);\n$redirectPayment = PaymentRedirect::QRIS()-\u003ecreate($payloadTrx);\n$redirectPayment = PaymentRedirect::CStore()-\u003ecreate($payloadTrx);\n$redirectPayment = PaymentRedirect::creditCard()-\u003ecreate($payloadTrx);\n$redirectPayment = PaymentRedirect::COD()-\u003ecreate($payloadTrx);\n$redirectPayment = PaymentRedirect::akulaku()-\u003ecreate($payloadTrx);\n```\n\n### Create Direct Payment\n```php\n\u003c?php\nuse ferdhika31\\iPaymuPHP\\PaymentDirect;\n\n$payloadTrx = [\n    'amount' =\u003e 5000,\n    // optional\n    'expired' =\u003e 10,\n    'expiredType' =\u003e 'minutes', // in:seconds,minutes,hours,days\n    'comments' =\u003e 'Transaction comment here',\n    'referenceId' =\u003e 'TRX202008310001'\n];\n\n// Available channel Virtual Account : bag, bni, cimb (default), mandiri\n$channel = 'mandiri';\n$directPayment = PaymentDirect::VA($channel)-\u003ecreate($payloadTrx);\n\n// Available channel Transfer Bank : bca (default)\n$channel = 'bca';\n$directPayment = PaymentDirect::bankTransfer($channel)-\u003ecreate($payloadTrx);\n\n// Available channel Convenience Store : indomaret (default), alfamart\n$channel = 'alfamart';\n$directPayment = PaymentDirect::cStore($channel)-\u003ecreate($payloadTrx);\n\n// Available channel: linkaja (default)\n$channel = 'linkaja';\n$directPayment = PaymentDirect::QRIS($channel)-\u003ecreate($payloadTrx);\n```\n\n### Get Transaction Detail\n```php\n\u003c?php\nuse ferdhika31\\iPaymuPHP\\Transaction;\n\n$id = 27958;\n$getTrx = Transaction::getById($id);\n```\n\n## Running\n\n### Running test suite:\n\n```bash\nvendor\\bin\\phpunit tests\nvendor\\bin\\phpunit tests\\BalanceTest.php\n```\n\n### Running examples:\n\n```bash\nphp examples\\CheckBalanceExample.php\n```\n\n## Contributing\n\nFor any requests, bugs, or comments, please open an [issue](https://github.com/ferdhika31/iPaymu-php/issues) or [submit a pull request](https://github.com/ferdhika31/iPaymu-php/pulls).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferdhika31%2Fipaymu-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fferdhika31%2Fipaymu-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferdhika31%2Fipaymu-php/lists"}