Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
onestartup-shop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Angel Martin
onestartup-shop
Commits
fbab40f4
Commit
fbab40f4
authored
May 22, 2018
by
Angel MAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
readme updated and vars changes
parent
19a2a137
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
8 deletions
+27
-8
README.md
README.md
+22
-3
CartController.php
src/controllers/CartController.php
+4
-4
finish.blade.php
src/views/public/cart/finish.blade.php
+1
-1
No files found.
README.md
View file @
fbab40f4
# Package shop OneStartup
**onestartup/shop**
is a module
store for websites
**onestartup/shop**
is a module
e-commerce
# Installation
...
...
@@ -10,6 +10,12 @@
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
```
php
...
...
@@ -53,4 +59,18 @@ http://localhost:8000/admin/shop/product
```
php
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
```
src/controllers/CartController.php
View file @
fbab40f4
...
...
@@ -260,7 +260,7 @@ class CartController extends Controller
$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
(
"transaction_amount"
=>
$this
->
total
()
+
$addres
->
shipping_price
->
cost
,
"token"
=>
$request
->
card_token_id
,
...
...
@@ -354,7 +354,7 @@ class CartController extends Controller
$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
(
"transaction_amount"
=>
$this
->
total
()
+
$addres
->
shipping_price
->
cost
,
...
...
@@ -462,8 +462,8 @@ class CartController extends Controller
$apiContext
=
new
ApiContext
(
new
OAuthTokenCredential
(
'AaeMLQGFFuvYBfOT1bWcLUo0-r_V81AqRXi6pJ2j_FNtsqdO0qeoj6CHed8Gzdhzr5wiKUvFF0gYfTf3'
,
'EOCbTEZffxOx3GXG3j0eAJSpeWlPLAhiY34uqWE71ljERbakYkjwqGTYkHp1qdms6O_FxXtdL5jwbfIA'
env
(
'CLIENT_ID_PAYPAL'
)
,
env
(
'SECRET_PAYPAL'
)
)
);
...
...
src/views/public/cart/finish.blade.php
View file @
fbab40f4
...
...
@@ -75,7 +75,7 @@ setlocale(LC_MONETARY, 'en_US');
@section('scripts_extra')
<script type="
text
/
javascript
">
Mercadopago.setPublishableKey(
"
TEST
-
73
a8fe53
-
17
bf
-
4060
-
b2b8
-
a069cc779a11
"
);
Mercadopago.setPublishableKey(
{
{env('PK_MERCADO_PAGO')}
}
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment