public function add(Request $request) { if (empty(Session::get('cart'))) { return back(); } $inputs = $request->all(); $inputs['products_id'] = implode(',', array_keys(Session::get('cart'))); $zp = ZonaPagos::create(); $id = $zp->invoiceRequest($inputs); return redirect()->to("https://www.zonapagos.com/" . env('ZP_ROUTE_CODE') . "/pago.asp?estado_pago=iniciar_pago&identificador=" . $id); }
} echo '</tbody></table>'; Product::reindex(); $product = Product::search($request->name); dd($product); return redirect()->route('elasticIndex', compact('product')); }]); Route::get('t', ['as' => 'elasticSearcht', 'uses' => function (Request $request) { if (function_exists('apache_request_headers')) { $headers = apache_request_headers(); } else { $headers = $_SERVER; } //Get the forwarded IP if it exists if (array_key_exists('X-Forwarded-For', $headers) && filter_var($headers['X-Forwarded-For'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { $the_ip = $headers['X-Forwarded-For']; } elseif (array_key_exists('HTTP_X_FORWARDED_FOR', $headers) && filter_var($headers['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { $the_ip = $headers['HTTP_X_FORWARDED_FOR']; } else { $the_ip = filter_var($_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4); } dd(GeoIP::getLocation($the_ip)); }]); Route::get('pasarela', function () { return view('pasarelaPrueba'); }); use Agrosellers\Services\ZonaPagos; Route::get('consulta/{id}', function ($id) { $zp = ZonaPagos::create(); dd($zp->checkPay($id)); });
public function finalPay(Request $request) { $zp = ZonaPagos::create(); $zp->insertPayResult($request->all()); }