I am assigning the following array to transactionInfo.
$transactionDetails=[
'amount' => $total,
'description'=>$description,
'notify_url'=>'http://url.com/paypal/log',
'headerImageUrl'=>'http://url.com/img/bhi_logo.png',
'brandName'=>'Name',
'encodedTestIDs' => serialize($payForTestID),
'returnUrl' => 'http://url.com/payment/return',
'cancelUrl' => 'http://url.com/payment/cancel'
];
Session::put('transactionInfo',$transactionDetails);
If I redirect to another page on the website I am able to pull the array using
Session::get('tranactionInfo');
However, if I redirect to PayPal to collect the payment and then PayPal redirects the user back to my site the session variable is then null.
Here is the route that PayPal is returning to:
Route::any('/payment/return',function(){
if(Session::has('transactionInfo')){
echo 'what is happening?';
}
//Session::flush();
dd(Session::get('transactionInfo')); die;
});