Commit fbab40f4 by Angel MAS

readme updated and vars changes

parent 19a2a137
# Package shop OneStartup # Package shop OneStartup
**onestartup/shop** is a module store for websites **onestartup/shop** is a module e-commerce
# Installation # Installation
...@@ -10,6 +10,12 @@ ...@@ -10,6 +10,12 @@
composer require onestartup/shop composer require onestartup/shop
``` ```
- if wish config payments paypal, run this:
```
composer require paypal/rest-api-sdk-php:*
```
- after add the ServiceProvider to the providers array in config/app.php - after add the ServiceProvider to the providers array in config/app.php
```php ```php
...@@ -53,4 +59,18 @@ http://localhost:8000/admin/shop/product ...@@ -53,4 +59,18 @@ http://localhost:8000/admin/shop/product
```php ```php
http://localhost:8000/productos http://localhost:8000/productos
``` ```
\ No newline at end of file
- add to .env file de keys
```
PK_MERCADO_PAGO=Public key
AC_MERCADO_PAGO=Access token
CLIENT_ID_PAYPAL=cliente id
SECRET_PAYPAL=secret id
```
...@@ -260,7 +260,7 @@ class CartController extends Controller ...@@ -260,7 +260,7 @@ class CartController extends Controller
$detail = $detail." Envio ". $addres->shipping_price->name ." $". $addres->shipping_price->cost .".00"; $detail = $detail." Envio ". $addres->shipping_price->name ." $". $addres->shipping_price->cost .".00";
$mp = new MP('TEST-7957752184054483-101318-9bbc7ef53f975318d2521f05257cb66a__LB_LC__-60150825'); $mp = new MP(env('AC_MERCADO_PAGO'));
$payment_data = array( $payment_data = array(
"transaction_amount" => $this->total() + $addres->shipping_price->cost, "transaction_amount" => $this->total() + $addres->shipping_price->cost,
"token" => $request->card_token_id, "token" => $request->card_token_id,
...@@ -354,7 +354,7 @@ class CartController extends Controller ...@@ -354,7 +354,7 @@ class CartController extends Controller
$detail = $detail." Envio ". $addres->shipping_price->name ." $". $addres->shipping_price->cost .".00"; $detail = $detail." Envio ". $addres->shipping_price->name ." $". $addres->shipping_price->cost .".00";
$mp = new MP('TEST-7957752184054483-101318-9bbc7ef53f975318d2521f05257cb66a__LB_LC__-60150825'); $mp = new MP(env('AC_MERCADO_PAGO'));
$payment_data = array( $payment_data = array(
"transaction_amount" => $this->total() + $addres->shipping_price->cost, "transaction_amount" => $this->total() + $addres->shipping_price->cost,
...@@ -462,8 +462,8 @@ class CartController extends Controller ...@@ -462,8 +462,8 @@ class CartController extends Controller
$apiContext = new ApiContext( $apiContext = new ApiContext(
new OAuthTokenCredential( new OAuthTokenCredential(
'AaeMLQGFFuvYBfOT1bWcLUo0-r_V81AqRXi6pJ2j_FNtsqdO0qeoj6CHed8Gzdhzr5wiKUvFF0gYfTf3', env('CLIENT_ID_PAYPAL'),
'EOCbTEZffxOx3GXG3j0eAJSpeWlPLAhiY34uqWE71ljERbakYkjwqGTYkHp1qdms6O_FxXtdL5jwbfIA' env('SECRET_PAYPAL')
) )
); );
......
...@@ -75,7 +75,7 @@ setlocale(LC_MONETARY, 'en_US'); ...@@ -75,7 +75,7 @@ setlocale(LC_MONETARY, 'en_US');
@section('scripts_extra') @section('scripts_extra')
<script type="text/javascript"> <script type="text/javascript">
Mercadopago.setPublishableKey("TEST-73a8fe53-17bf-4060-b2b8-a069cc779a11"); Mercadopago.setPublishableKey({{env('PK_MERCADO_PAGO')}});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment