PHPackages                             darkghosthunter/transbanker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. darkghosthunter/transbanker

AbandonedArchivedLibrary[API Development](/categories/api)

darkghosthunter/transbanker
===========================

Transbank API connector for Laravel

v3.1.0(5y ago)1256MITPHPPHP ^7.3||^7.4||^8.0

Since Jan 2Pushed 5y agoCompare

[ Source](https://github.com/DarkGhostHunter/Transbanker)[ Packagist](https://packagist.org/packages/darkghosthunter/transbanker)[ RSS](/packages/darkghosthunter-transbanker/feed)WikiDiscussions master Synced today

READMEChangelog (9)Dependencies (9)Versions (12)Used By (0)

Use [Larabanker](https://github.com/DarkGhostHunter/Larabanker)
===============================================================

[](#use-larabanker)

This package has been deprecated for a new version, which uses a REST and HTTP Client.

[![Sharon McCutcheon - Unsplash (UL) #-8a5eJ1-mmQ](https://camo.githubusercontent.com/75e262d6b924f5091b8ccc6fa3f8064f196146e6969f9f772868d565069db2ce/68747470733a2f2f696d616765732e756e73706c6173682e636f6d2f70686f746f2d313531383435383032383738352d3866626364313031656262393f69786c69623d72622d312e322e3126697869643d65794a6863484266615751694f6a45794d446439266175746f3d666f726d6174266669743d63726f7026773d3132383026683d34303026713d3830)](https://camo.githubusercontent.com/75e262d6b924f5091b8ccc6fa3f8064f196146e6969f9f772868d565069db2ce/68747470733a2f2f696d616765732e756e73706c6173682e636f6d2f70686f746f2d313531383435383032383738352d3866626364313031656262393f69786c69623d72622d312e322e3126697869643d65794a6863484266615751694f6a45794d446439266175746f3d666f726d6174266669743d63726f7026773d3132383026683d34303026713d3830)

[![Latest Stable Version](https://camo.githubusercontent.com/46c1fd0aefb1898cf7a0ef58a4324715f18353058d51300518501cb9361bcbc1/68747470733a2f2f706f7365722e707567782e6f72672f6461726b67686f737468756e7465722f7472616e7362616e6b65722f762f737461626c65)](https://packagist.org/packages/darkghosthunter/transbanker) [![License](https://camo.githubusercontent.com/ff4b94f87455db78733bb48efd8448a4aff2d5fbb70fefc57c149369da2b19dc/68747470733a2f2f706f7365722e707567782e6f72672f6461726b67686f737468756e7465722f7472616e7362616e6b65722f6c6963656e7365)](https://packagist.org/packages/darkghosthunter/transbanker)[![](https://camo.githubusercontent.com/5d2935246f199ded01689029df1ca10342cbeb3065446493573f3ad15f92809b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6461726b67686f737468756e7465722f7472616e7362616e6b65722e737667)](https://camo.githubusercontent.com/5d2935246f199ded01689029df1ca10342cbeb3065446493573f3ad15f92809b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6461726b67686f737468756e7465722f7472616e7362616e6b65722e737667)[![Build Status](https://camo.githubusercontent.com/f2fc6984708ea57959533312968be3a0d8a36380fd853efbb66e3aa49a84b5b3/68747470733a2f2f7472617669732d63692e636f6d2f4461726b47686f737448756e7465722f5472616e7362616e6b65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/DarkGhostHunter/Transbanker) [![Coverage Status](https://camo.githubusercontent.com/d6a23cf4255b1d937bf9e59895d5d567c6f35550ddffb7bfb24068e7499d12ba/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4461726b47686f737448756e7465722f5472616e7362616e6b65722f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/DarkGhostHunter/Transbanker?branch=master) [![Maintainability](https://camo.githubusercontent.com/e097e04ae371aac3b3925650f298e838820261d3e7d67cb92db8a4e50c8bb8b8/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f32306436396230343564336332373364326534642f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/DarkGhostHunter/Transbanker/maintainability) [![Test Coverage](https://camo.githubusercontent.com/ce2f649e61f406aeff43c1eb0804519ff3acc6a3a9af7affca0397c2944629b9/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f32306436396230343564336332373364326534642f746573745f636f766572616765)](https://codeclimate.com/github/DarkGhostHunter/Transbanker/test_coverage)

Laravel Transbanker
===================

[](#laravel-transbanker)

**Transbank API connector for Laravel**

This package connects the [Transbank API](https://github.com/DarkGhostHunter/TransbankApi/) package, which allows you to use Transbank payment gateway, to your Laravel Application.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.3
- Laravel 6.x, 7.x or 8.x

> Check older releases for older Laravel versions.

Installation
------------

[](#installation)

Call composer and require it into your application.

```
composer require darkghosthunter/transbanker
```

Configuration
-------------

[](#configuration)

### Environment

[](#environment)

By default, the package uses `integration` unless you explicitly set `production`, which will make all transactions real.

```
TRANSBANK_ENV=production
```

### Credentials

[](#credentials)

The `integration` environment sets testing credentials automatically, so you don't need to set them unless you want to overwrite one of them.

Otherwise, in `production` environment, you will need to add your Transbank credentials for your services.

For Webpay, **these must be located under `storage/transbank/webpay` as files**. You can overload the default `webpay.cert` that comes with this package with your own.

```
WEBPAY_COMMERCE_CODE=5000000001
WEBPAY_PRIVATE_KEY=private.key
WEBPAY_PUBLIC_CERT=public.cert
WEBPAY_CERT=webpay.cert
```

For Onepay, you can use the API key and Secret directly.

```
ONEPAY_API_KEY=dKVhq1WGt_XapIYirTXNyUKoWTDFfxaEV63-O5jcsdw
ONEPAY_SECRET="?XW#WOLG##FBAGEAYSNQ5APD#JF@$AYZ"
```

> If your secret has `#` characters, you may want to enclose it using double quotes `"`.

That is the basic configuration. If you need to fine tune this package, refer to the Advanced section.

Redirection
-----------

[](#redirection)

This package registers the `transbank::webpay-redirect` for instant redirection to Webpay. When creating a Webpay Plus or Webpay Oneclick transaction, you can redirect the user instantly to the payment gateway inside your controllers:

```
