jeudi 23 décembre 2021

problem with session in iOS Safari - laravel

I have a problem with iOS devices, i working with laravel and sessions,

i using a payment module, the answer that the process gives me but is Null

in other browsers with Android system it does not lose the session

public function invoke(Request $request) {
    
      $payment_id = $request->get('payment_id');
    
    
      $response = Http::get("https://api.mercadopago.com/v1/payments/$payment_id" . "?access_token=TEST-CODEX-349463544506SADSA7");
      
      $response = json_decode($response);
    
      $request->session()->put('order', $response->order->id);
      $request->session()->put('ingreso', $response->transaction_details->net_received_amount);
      $request->session()->put('monto', $response->transaction_details->total_paid_amount);
      $request->session()->put('metodo', $response->payment_type_id); 
     $status = $response->status;
    
    
     if($status == 'approved') {
    
    
      Ingresosmp::insert([
        'user_id'       => Session::get('user_id'),
        'evento_id'       => Session::get('variableName'),
        'mp_id'  => Session::get('order'),
        'metodo'        => Session::get('metodo'),
        'monto'        => Session::get('monto'),
        'ingreso'        => Session::get('ingreso'),
    
    
      ]);
    
     
      
    
      return redirect('success')->with('success', 'okAY!');
    
    
    }

Image with problem:

https://i.imgur.com/nNUrhSL.png

help pls



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/33KvfcS
via IFTTT

Aucun commentaire:

Enregistrer un commentaire