Answer the question
In order to leave comments, you need to log in
Interkassa integration problem?
The site is written in laravel, I connect the checkout according to the documentation, payments go through, but the checkout does not seem to get to the interaction url, because if you specify the request method for the interaction url GET in the checkout settings, and in web.php POST, then an error should occur which is not.
// url взаимодействия
public function result(Request $request)
{
$dataSet = $request->all();
if(!$dataSet)
exit('error 1');
$key = 'ключ тестовой кассы';
unset($dataSet['ik_sign']);
ksort($dataSet, SORT_STRING);
array_push($dataSet, $key);
$signtring = implode(':', $dataSet);
$sign = base64_encode(md5($signString, true));
if($sign != $request['ik_sign'])
exit('error 2');
$order = new Order;
$cart = \Cart::getContent();
$order_number = time();
return $order->addOrder($order_number, $cart);
}
<form id="payment" name="payment" method="post" action="" enctype="utf-8">
<input type="hidden" name="ik_co_id" value="id кассы"/>
<input type="hidden" name="ik_pm_no" value="{{ time() }}"/>
<input type="hidden" name="ik_am" value="{{ $total }}"/>
<input type="hidden" name="ik_cur" value="RUB"/>
<input type="hidden" name="ik_desc" value="Payment Description"/>
<input type="submit" value="Pay">
</form>
Answer the question
In order to leave comments, you need to log in
View logs? Disable csrf check for post request from interkassa?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question