Answer the question
In order to leave comments, you need to log in
How to fix a payment error in merchant?
I set up payment with a record in the database, here is the request form
<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="go">
</form>
if ($_POST['LMI_PREREQUEST'] == 1) {
if ($_POST['LMI_PAYEE_PURSE'] == 'U205235885940') {
echo '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'] .
'SpCFe8m9CNQs6rY61XOg' .
$_POST['LMI_PAYER_PURSE'] .
$_POST['LMI_PAYER_WM'];
if (strtoupper(hash('sha256', $key)) != $_POST['LMI_HASH']) {
exit;
}
$payment = new Payment();
$payment->nickname = $_POST['nickname'];
$payment->total_money = $_POST['LMI_PAYMENT_AMOUNT'];
$payment->type_comment = 'web';
$payment->save();
$model = Models::where('nickname', '=', $_POST['nickname'])
->first();
$model->cash = $model->cash + $_POST['LMI_PAYMENT_AMOUNT'];
$model->save();
}
Answer the question
In order to leave comments, you need to log in
Probably the page should return just OK (or something similar), but you get the whole page returned. This could probably be a mistake.
And also check the order of the parameters in the request signature, they seem to be in alphabetical order.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question