Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release/1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecancinof committed Feb 6, 2016
2 parents 8d7be07 + cb8e102 commit 10b4d1f
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 36 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Laravel Flow Package

A Laravel Package to use [Flow](https://www.flow.cl)
Laravel Package para la integración de pagos con [Flow](https://www.flow.cl)

## Installation
## Instalación

### Step 1: Install through Composer
### Paso 1: Instalar a través de Composer

```
composer require cokecancino/laravel-flow
```

### Step 2: Add the Service Provider
### Paso 2: Agregar el Service Provider

In the `app/config/app.php` file, add the following to the `providers` array:
En el archivo `app/config/app.php`, agregar la siguiente línea al array `providers`:
```php
'providers' => array(
Expand All @@ -21,9 +21,9 @@ In the `app/config/app.php` file, add the following to the `providers` array:
),
```

### Step 3: Add the alias
### Paso 3: Agregar el alias

In the `app/config/app.php` file, add the following to the `aliases` array:
En el archivo `app/config/app.php`, agregar la siguiente línea al array `aliases`:
```php
'aliases' => array(
Expand All @@ -32,14 +32,14 @@ In the `app/config/app.php` file, add the following to the `aliases` array:
),
```

### Step 3: Publish the configuration
### Paso 3: Publicar el archivo de configuración


```sh
$ php artisan vendor:publish --provider="CokeCancino\LaravelFlow\FlowServiceProvider"
```

### Step 4: Configure your .env or edit your brand new `config/flow.php`
### Paso 4: Configura tu .env o modifica tu `config/flow.php`
```
...
FLOW_URL_PAGO=http://flow.tuxpan.com/app/kpf/pago.php
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "cokecancino/laravel-flow",
"description": "A Laravel Package to use Flow (https://www.flow.cl)",
"description": "Laravel Package para la integración de pagos con Flow (https://www.flow.cl)",
"keywords": ["laravel", "flow", "pagos", "webpay", "transbank", "servipag", "chile"],
"homepage": "https://github.com/cokecancino/laravel-flow",
"license": "MIT",
"authors": [
{
Expand Down
1 change: 0 additions & 1 deletion src/Flow.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ public function read_result() {
$this->flow_log("firma invalida", "read_result");
throw new Exception('Invalid signature from Flow');
}
$this->order["Comision"] = config('flow.tasa_default');
$this->order["Status"] = "";
$this->order["Error"] = "";
$this->order['OrdenNumero'] = $params['kpf_orden'];
Expand Down
9 changes: 8 additions & 1 deletion src/FlowServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class FlowServiceProvider extends ServiceProvider
*
* @var bool
*/
protected $defer = true;

/**
* Bootstrap the application services.
Expand All @@ -25,7 +26,7 @@ public function boot()
}

/**
* Register the application services.
* Register the service provider.
*
* @return void
*/
Expand All @@ -38,10 +39,16 @@ private function bindFlowClass()
{
$this->app->bind(Flow::class, function ($app) {
$flow = new Flow();

return $flow;
});
}

/**
* Get the services provided by the provider.
*
* @return array
*/
public function provides()
{
return [Flow::class];
Expand Down
36 changes: 12 additions & 24 deletions src/config/config.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
<?php

/*
* Página de configuración del comercio
*
* Version: 1.2
* Date: 2015-05-28
* Author: flow.cl
*/

return [

/*
Expand All @@ -21,6 +13,7 @@
| ['action' => 'FlowController@exito'],
|
*/

'url_exito' => ['route' => 'flow.exito'],

/*
Expand All @@ -34,6 +27,7 @@
| ['action' => 'FlowController@fracaso'],
|
*/

'url_fracaso' => ['route' => 'flow.fracaso'],

/*
Expand All @@ -47,6 +41,7 @@
| ['action' => 'FlowController@confirmacion'],
|
*/

'url_confirmacion' => ['route' => 'flow.confirmacion'],

/*
Expand All @@ -56,30 +51,34 @@
|
| Ejemplo:
| Sitio de pruebas = http://flow.tuxpan.com/app/kpf/pago.php
| Sitio de produccion = https://www.flow.cl/app/kpf/pago.php
| Sitio de producción = https://www.flow.cl/app/kpf/pago.php
|
*/

'url_pago' => env('FLOW_URL_PAGO', 'http://flow.tuxpan.com/app/kpf/pago.php'),

/*
|--------------------------------------------------------------------------
| Ingrese aquí la ruta (path) en su sitio donde estará la llave privada
| Ingrese aquí la ruta (path) de su sitio en donde estará la llave privada
|--------------------------------------------------------------------------
*/

'keys' => base_path('keys'),

/*
|--------------------------------------------------------------------------
| Ingrese aquí la ruta (path) en su sitio donde estarán los archivos de logs
| Ingrese aquí la ruta (path) de su sitio en donde estarán los archivos de logs
|--------------------------------------------------------------------------
*/

'logPath' => storage_path('logs'),

/*
|--------------------------------------------------------------------------
| Ingrese aquí el email con el que está registrado en Flow
|--------------------------------------------------------------------------
*/

'comercio' => env('FLOW_COMERCIO', 'emailFlow@comercio.com'),

/*
Expand All @@ -93,6 +92,7 @@
| Todos los medios de pago = 9
|
*/

'medioPago' => '9',

/*
Expand All @@ -105,19 +105,7 @@
| Ingresar directamente a Webpay = d
|
*/
'tipo_integracion' => 'f',

/*
|--------------------------------------------------------------------------
| Ingrese aquí la tasa de comisión de Flow que usará
|--------------------------------------------------------------------------
|
| Valores posibles:
| Pago siguiente día hábil = 1 (Expreso)
| Pago a tres días hábiles = 2 (Veloz)
| Pago a cinco días hábiles = 3 (Normal)
|
*/
'tasa_default' => env('FLOW_TASA_DEFAULT', 3),
'tipo_integracion' => 'f',

];

0 comments on commit 10b4d1f

Please sign in to comment.