harrypujianto / Veritrans-Laravel5

33 stars 45 forks source link

token issue #27

Closed robertnicjoo closed 5 years ago

robertnicjoo commented 6 years ago

Hi,

When I try to return results in specific route or page i'm getting error 400 but receiving token as well!

try
{
            $snap_token = $midtrans->getSnapToken($transaction_data);
            $project->payment_verified = 'y';
            $project->save();

            //return redirect($vtweb_url);
            return redirect()->back()->with('success', 'Done '.$snap_token);
} 
catch (Exception $e) 
{   
            return $e->getMessage;
}

400

but if i use default echo $snap_token; everything works just fine.

what is the issue with it?

robertnicjoo commented 6 years ago

anyone?

harrypujianto commented 5 years ago

can you make sure that the token passed to the front? if you have, then this occured, means there's a trouble with the snap itself. Please contact support@midtrans.com