Вот форма запроса
<form action="https://merchant.webmoney.ru/lmi/payment.asp" method="POST">
<input type="hidden" name="login" value="{{$nickname}}">
<input type="text" name="LMI_PAYMENT_AMOUNT" value="500">
<input type="hidden"
name="LMI_PAYMENT_DESC_BASE64"
value="0J/QvtC/0L7Qu9C90LXQvdC40Y8g0YHRh9C10YLQsA==">
<input type="hidden" name="LMI_PAYEE_PURSE" value="U205235885940">
<input type="submit" class="button button-5" value="{{trans('settings.balance_on')}}">
</form>
а обрабатываю так
if ($_POST['LMI_PREREQUEST'] == 1) {
if ($_POST['LMI_PAYEE_PURSE'] == 'U205235885940') print('YES');
} else {
$key = $_POST['LMI_PAYEE_PURSE'] .
$_POST['LMI_PAYMENT_AMOUNT'] .
$_POST['LMI_PAYMENT_NO'] .
$_POST['LMI_MODE'] .
$_POST['LMI_SYS_INVS_NO'] .
$_POST['LMI_SYS_TRANS_NO'] .
$_POST['LMI_SYS_TRANS_DATE'] .
'********' .
$_POST['LMI_PAYER_PURSE'] .
$_POST['LMI_PAYER_WM'];
if (strtoupper(hash('sha256', $key)) != $_POST['LMI_HASH']) exit;
$model = Models::where('nickname', '=', $_POST['login'])
->first();
if ($model->nickname == $_POST['login']) {
$payment = new Payment();
$payment->nickname = $_POST['login'];
$payment->total_money = $_POST['LMI_PAYMENT_AMOUNT'];
$payment->type_comment = 'web';
$payment->save();
$model->cash = $model->cash + $_POST['LMI_PAYMENT_AMOUNT'];
$model->save();
}
}
почему же не записывается результат в бд?