Sunday, April 2, 2017

Post request from another domain results TokenMismatchException

I'm working with a bank api.
The bank send a post request to my website but does not return there is not a token field is their request and I am faced with TokenMismatchException.

How can I fix this problem?
Here is coresponding codes:

public function submitPayment()
{  
    $api = 'test';
    $amount = '3443354';
    $redirect = URL::to('new-order/after-payment');
    $result = $this->send($api, $amount, $redirect);
    $result = json_decode($result);

    return redirect("https://pay.ir/payment/test/gateway/$result->transId");
}



via mehdirahimi

Advertisement