mirror of
https://github.com/openvk/openvk
synced 2024-12-23 00:51:03 +03:00
фикс дюпа алмазов в служебном апи)
This commit is contained in:
parent
0a4b7225ea
commit
3c632f3910
2 changed files with 7 additions and 0 deletions
|
@ -55,6 +55,11 @@ class Apps implements Handler
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($amount < 0) {
|
||||||
|
$reject(552, "Payment amount is invalid");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$coinsLeft = $this->user->getCoins() - $amount;
|
$coinsLeft = $this->user->getCoins() - $amount;
|
||||||
if($coinsLeft < 0) {
|
if($coinsLeft < 0) {
|
||||||
$reject(41, "Not enough money");
|
$reject(41, "Not enough money");
|
||||||
|
|
|
@ -142,6 +142,8 @@ function handlePayment(event) {
|
||||||
ok: false,
|
ok: false,
|
||||||
error: "negative sum"
|
error: "negative sum"
|
||||||
}, '*');
|
}, '*');
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageBox(
|
MessageBox(
|
||||||
|
|
Loading…
Reference in a new issue