I make the user's balance in PHP (the balance can not be less than zero).
Suppose I replenish the balance by 10 rubles and buy goods for 10 rubles. Payment passes, and the balance becomes 0. But when I replenish the balance by 8 rubles and buy goods for 8 rubles (the price of goods is stored in the database), then payment does not occur, there is no error in the PHP log. What could be the problem?
Just in case the balance code:
if ($id && $job_user) { $job->balance = $job_user->balance - abs($this->GetWeight($packing[$id_product])) * $num_packing[$id_product]; $this->users->update_job($id_user, $id_product, $job); Just want to note that there is a payment of any amount, except the number 8.