在Laravel 5.5中无法使用PHP cURL获取请求的会话

I have an issue on Laravel 5.5. I have a web application that acts as a gateway. My partner can request to my gateway via cURL or HTTP.

  1. The first step, when my partner requests (via cURL) to my gateway passing the master data and credential. Then I validate those data; if the data is correct, I will store request data in the session. And then response back session key.
  2. When a partner gets session key, they will redirect and pass session key back to my web page to input more detail info base on master data that they submit via cURL last time. But when they redirect to my web page via the browser, I can't get the session back. It seems the session key that I use when cURL request and redirect by the browser are different.

But when I try to request validate master data and credential in postman and get the session back by the postman, I can get it back.

My Sample Testing by using fix session key:

TestingController.php

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\Hash;
use Session;

class TestingController extends Controller
{
    public function test1() {
        $testing = "Testing";
        Session::put("ABC", $testing);
        return "Key: ABC, Value: $testing";
    }

    public function test2() {
        $testing = Session::get("ABC");
            return "Key: ABC, Value: $testing";
        }
    }
}

web.php (route)

Route::post('/test1', 'TestingController@test1');
Route::get('/test2', 'TestingController@test2');

Sample request from php

<?php

$authenticate = "http://localhost/test1";
$redirect = "http://localhost/test2";
$ref_gen = date("Ymdhisa");
if($_POST['submit']) {
    $param = array(
        'username'=> 'testing',
        'secrete' => '85a731b9d40388ad0a998d84e7e9de958c2',
        'order_referenceno' => $ref_gen,
    );
    $content = json_encode($param);
    $curl = curl_init($authenticate);
    curl_setopt($curl, CURLOPT_HEADER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type:application/json"));
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
    $response = curl_exec($curl);
    var_dump("response:".$response);
    if ($response === FALSE) {
        echo "cURL Error: " . curl_error($curl);
    } else {
        header("Location: ".$redirect."?session=$response");
    }
}

?>