{"id":15972131,"url":"https://github.com/darkghosthunter/transbank","last_synced_at":"2026-05-19T02:02:15.585Z","repository":{"id":45280553,"uuid":"354640637","full_name":"DarkGhostHunter/Transbank","owner":"DarkGhostHunter","description":"Easy-to-use Transbank SDK for PHP, supporting Webpay, Webpay Mall and Oneclick Mall.","archived":false,"fork":false,"pushed_at":"2021-12-28T18:36:25.000Z","size":118,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-12T05:03:37.238Z","etag":null,"topics":["payments","php","transbank","webpay"],"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/DarkGhostHunter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"ko_fi":"DarkGhostHunter","custom":["https://paypal.me/darkghosthunter"]}},"created_at":"2021-04-04T20:30:39.000Z","updated_at":"2021-12-28T18:36:28.000Z","dependencies_parsed_at":"2022-08-04T13:15:32.953Z","dependency_job_id":null,"html_url":"https://github.com/DarkGhostHunter/Transbank","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/DarkGhostHunter/Transbank","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarkGhostHunter%2FTransbank","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarkGhostHunter%2FTransbank/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarkGhostHunter%2FTransbank/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarkGhostHunter%2FTransbank/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DarkGhostHunter","download_url":"https://codeload.github.com/DarkGhostHunter/Transbank/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarkGhostHunter%2FTransbank/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266691580,"owners_count":23969182,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["payments","php","transbank","webpay"],"created_at":"2024-10-07T20:42:06.683Z","updated_at":"2026-05-19T02:02:10.532Z","avatar_url":"https://github.com/DarkGhostHunter.png","language":"PHP","funding_links":["https://ko-fi.com/DarkGhostHunter","https://paypal.me/darkghosthunter"],"categories":[],"sub_categories":[],"readme":"![rawpixel - Unsplash (UL) #SEDqvdbkDQw](https://images.unsplash.com/photo-1614267119077-51bdcbf9f77a?ixlib=rb-1.2.1\u0026ixid=eyJhcHBfaWQiOjEyMDd9\u0026auto=format\u0026fit=crop\u0026w=1280\u0026h=400\u0026q=80)\n\n[![Latest Stable Version](https://poser.pugx.org/darkghosthunter/transbank/v/stable)](https://packagist.org/packages/darkghosthunter/transbank) [![License](https://poser.pugx.org/darkghosthunter/transbank/license)](https://packagist.org/packages/darkghosthunter/transbank) ![](https://img.shields.io/packagist/php-v/darkghosthunter/transbank.svg) [![PHP Composer](https://github.com/DarkGhostHunter/TransbankApi/workflows/PHP%20Composer/badge.svg)](https://github.com/DarkGhostHunter/transbank/actions) [![Coverage Status](https://coveralls.io/repos/github/DarkGhostHunter/Transbank/badge.svg?branch=master)](https://coveralls.io/github/DarkGhostHunter/Transbank?branch=master)\n\n# Transbank\n\nEasy-to-use Transbank SDK for PHP.\n\nSupports Webpay, Webpay Mall and Webpay Oneclick Mall.\n\n## Requisites:\n\n* PHP 8.0 or later.\n* `ext-json`\n* [HTTP Client](#http-client)\n* [Logger](#logger-optional) (optional)\n* [Event dispatcher](#event-dispatcher-optional) (optional)\n\n# Installation\n\nRequire it with [Composer](https://getcomposer.org/):\n\n    composer require darkghosthunter/webpay\n\n## Usage\n\nThis SDK mimics all the Webpay, Webpay Mall and Oneclick Mall methods from the official Transbank SDK for PHP.\n\nYou can check the documentation of these services in Transbank Developer's site.\n\n- [Webpay](https://www.transbankdevelopers.cl/documentacion/webpay-plus#webpay-plus)\n- [Webpay Mall](https://www.transbankdevelopers.cl/documentacion/webpay-plus#webpay-plus-mall)\n- [Oneclick Mall](https://www.transbankdevelopers.cl/documentacion/oneclick)\n\n## Quickstart\n\nInstance the `Transbank` object. You can do it manually, or with `make()` which will use Guzzle o Symfony HTTP Clients if any of these is already installed.\n\n```php\nuse DarkGhostHunter\\Transbank\\Transbank;\n\n$transbank = Transbank::make();\n```\n\nIf your project doesn't manage single instances, you can use `getInstance()` to receive a static Transbank instance.\n\n```php\nuse DarkGhostHunter\\Transbank\\Transbank;\n\n$transbank = Transbank::getInstance();\n```\n\n### Environments and credentials\n\nBy default, this SDK starts up in **integration** environment, where all transactions made are fake by using Transbank's own _integration_ server.\n\nTo operate in production mode, where all transaction will be real, you will need to use `toProduction()` along an `array` with the name of the service and their production credentials issued by Transbank to you: `webpay`, `webpayMall` or `oneclickMall`.\n\n```php\n$transbank-\u003etoProduction([\n    'patpass' =\u003e ['555876543210','7a7b7d6cce5e...']\n]);\n```\n\n\u003e For Mall operations, the \"child\" commerce code is only needed when doing the transactions.\n\n### Using a Service\n\nTo use a Transbank service, just call the method on the `Transbank` instance: `webpay`, `webpayMall` and `oneclickMall`.\n\n```php\nuse DarkGhostHunter\\Transbank\\Transbank;\n\n$transaction = Transbank::singleton()\n        -\u003ewebpay()\n        -\u003ecreate('order#123', 9990, 'https://app.com/compra');\n```\n\n### HTTP Client\n\nThis package is compatible with any PSR-18 compliant HTTP Client. IF you don't have one, you can install [Guzzle](https://docs.guzzlephp.org/) or [Symfony](https://symfony.com/doc/current/http_client.html)\n\n    composer require guzzlehttp/guzzle:\u003e=7.0\n\nor\n\n    composer require symfony/http-client:\u003e=5.2\n\nSome PHP platforms already ship with their own HTTP Client, like [Amp](https://amphp.org/http-client/), [ReactPHP](https://reactphp.org/http/), or [Swoole](https://www.swoole.co.uk/docs/modules/swoole-coroutine-http-client).\n\n### Logger (optional)\n\nYou can use this package with any PSR-3 compliant Log system, allowing to debug transactions. You can use [Monolog](https://github.com/Seldaek/monolog) if you don't have one.\n\n    composer require monolog/monolog\n\nAll operations are sent to the logger using `debug`.\n\n### Event dispatcher (optional)\n\nYou can use this package with any PSR-14 compliant Event Dispatcher, so you will be able to hear transactions started and completed. You can use [Symfony](https://github.com/symfony/event-dispatcher) or [League](https://event.thephpleague.com/) if you don't have one.\n\n    composer require symfony/event-dispatcher\n\nor\n\n    composer require league/event\n\nThis package sends the following events:\n\n* `TransactionCreating` before a transaction is created in Transbank.\n* `TransactionCreated` after a transaction is created in Transbank, but pending payment.\n* `TransactionCompleted` after a transaction or refund is completed in Transbank, regardless of the success.\n\n### Excepciones\n\nAll exceptions implement `TransbankException`, so you can easily catch and check what happened.\n\n\u003e Transactions properly rejected by banks or credit card issuers do not throw exceptions.\n\nThere are 4 types of exceptions:\n\n* `ClientException`: Any error byproduct of bad transactions, bad configuration, abort, abandonment, timeout or invalid values.\n* `NetworkException`: Any communication error from Transbank Server, like network timeouts or wrong endpoints.\n* `ServerException`: Any internal Transbank error.\n* `UnknownException`: Any other error.\n\n\u003e Exceptions are **not** logged.\n\n## [Run examples locally](examples/README.md)\n\n# Licence\n\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\n\n`Redcompra`, `Webpay`, `Oneclick`, `Onepay`, `Patpass` and `Transbank` are trademarks of [Transbank S.A.](https://www.transbank.cl/). This package and its author are not associated with Transbank S.A.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkghosthunter%2Ftransbank","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarkghosthunter%2Ftransbank","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkghosthunter%2Ftransbank/lists"}