Skip to content

Commit

Permalink
Merge pull request #7 from TransbankDevelopers/update-readme
Browse files Browse the repository at this point in the history
Update README
  • Loading branch information
eugenioLopezRamos authored Jul 31, 2018
2 parents 86a866e + 8b55ab6 commit 3c2a4cf
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ Luego, para usar el SDK en tu código:

# Crear una transacción
```php
use Transbank;
use Transbank\Onepay;
use Transbank\ShoppingCart;
use Transbank\Item;
use Transbank\Transaction;
use Transbank\Refund;
use Transbank\Onepay\OnepayBase;
use Transbank\Onepay\ShoppingCart;
use Transbank\Onepay\Item;
use Transbank\Onepay\Transaction;
use Transbank\Onepay\Refund;


OnepayBase::setApiKey('tu-api-key');
OnepayBase::setSharedSecret('tu-shared-secret');
Expand Down Expand Up @@ -184,7 +184,7 @@ json_encode($refund);
# Opciones
En caso de que lo requieras, puedes poner api key y shared secret alternativos en un request en particular:
```php
use Transbank\Options;
use Transbank\Onepay\Options;

$options = new Options('otro-api-key', 'otro-shared-secret');

Expand All @@ -202,7 +202,16 @@ $refund = Refund::create($amount, $occ, $externalUniqueNumber,
```

# Ambientes
El SDK incluye distintos ambientes (ej: TEST, LIVE), el cual se establece con:
El SDK incluye distintos ambientes (ej: TEST, LIVE, MOCK)

- LIVE: Producción.

- TEST: Servidor de pruebas de Transbank.

- MOCK: Servidor de pruebas que retorna respuestas predefinidas.


el cual se establece con:


```php
Expand All @@ -217,7 +226,7 @@ OnepayBase::integrationTypes();
```
lo cual devuelve:
```php
["TEST" => "https://test.url.com", "LIVE" => "https://live.url.com"]
["TEST" => "https://test.url.com", "LIVE" => "https://live.url.com", "MOCK" => "https://mock.url.com"]
```

También puedes obtener la URL de un ambiente directamente:
Expand Down

0 comments on commit 3c2a4cf

Please sign in to comment.