test mercado pago
Showing
| ... | ... | @@ -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), | ||
| ... | ... |
Please
register
or
sign in
to comment