Commit ffb67b46 by Angel MAS

test mercado pago

parent 68a2dd63
......@@ -43,15 +43,15 @@ class CartController extends Controller
public function __construct()
{
if (!\Session::has('cart')) {
\Session::put('cart', array());
}
setlocale(LC_MONETARY, 'en_US');
$this->util = new Util();
}
public function show()
{
if (!\Session::has('cart')) {
\Session::put('cart', array());
}
setlocale(LC_MONETARY, 'en_US');
$this->util = new Util();
}
public function show()
{
$total = $this->total();
$cart = \Session::get('cart');
......@@ -399,18 +399,14 @@ public function shipping()
$detail = $detail." Envio ". $addres->shipping_price->name ." $". $addres->shipping_price->cost .".00";
$mp = new MP(env('AC_MERCADO_PAGO'));
$mp = new MP('TEST-7957752184054483-101318-9bbc7ef53f975318d2521f05257cb66a__LB_LC__-60150825');
$payment_data = array(
"transaction_amount" => $this->total() + $addres->shipping_price->cost,
"description" => $detail,
"payment_method_id" => $request->payment_id,
"transaction_amount" => 100,
"description" => "Title of what you are paying for",
"payment_method_id" => "oxxo",
"payer" => array (
"email" => $client->email,
"first_name"=>$client->name,
"last_name"=>$client->lastname
"email" => "[email protected]"
)
);
......@@ -812,12 +808,12 @@ public function shipping()
}
} else{
$msg = 'Lo sentimos este código de descuento ya expiró :(';
}
$msg = 'Lo sentimos este código de descuento ya expiró :(';
}
}
}
$data = [
$data = [
'valid'=>$valid,
'msg'=>$msg,
'amount'=>money_format('%(#10n',$descuento),
......
......@@ -80,10 +80,7 @@ setlocale(LC_MONETARY, 'en_US');
@section('scripts_extra')
<script type="text/javascript">
Mercadopago.setPublishableKey('key_test');
Mercadopago.setPublishableKey('TEST-73a8fe53-17bf-4060-b2b8-a069cc779a11');
$("#form-pagar-mp").submit(function( event ) {
$('.btn-submit').attr('disabled', 'disabled');
......
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