This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

will

wallet credit bug
« on: December 07, 2017, 03:52:30 PM »
Hello
Plugin Version:1.3.3
I use Euro for the currency
I've got "," separator

I add credits 80€ by the admin to the wallet of a user. The wallet show this value 0, 0002346473.
The same problem for affiliate program. For exemple it send 10€ to the wallet but show 0.0012214555
What it's happened ? Can you help me to solved the problem ?

*

Ivanko

  • *****
  • 388 posts
Re: wallet credit bug
« Reply #1 on: December 07, 2017, 06:16:20 PM »
Hi, I also had noticed same phenomena in lower plugin version. :o

*

MB Themes

Re: wallet credit bug
« Reply #2 on: December 07, 2017, 10:34:58 PM »
@will
Do you experience same issue on demo site?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

will

Re: wallet credit bug
« Reply #3 on: December 08, 2017, 09:10:02 AM »
I don't try with demo site.
Have you got a solution ?

*

will

Re: wallet credit bug
« Reply #4 on: December 08, 2017, 10:47:54 AM »
here a screenshot

*

MB Themes

Re: wallet credit bug
« Reply #5 on: December 08, 2017, 11:30:24 AM »
@will
I remember similar issue in past and was caused by incorrect configuration of table on database (not large enough).
go to your database and find table t_osp_wallet
Check it's structure, field i_amount should be at least bigint(20).... if it is less, then you store value into database but it cannot save it due to it's size.
Note that amounts are multiplied by 10^12.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

will

Re: wallet credit bug
« Reply #6 on: December 08, 2017, 11:58:52 AM »
Hello
The parameters are good for me.
I try tu increase it but don't works.
Another solution ?

*

MB Themes

Re: wallet credit bug
« Reply #7 on: December 08, 2017, 12:13:54 PM »
@will
Can you try to save them 80euro? (it's 80000000000000).
I am not able to reproduce this issue on demo site.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

will

Re: wallet credit bug
« Reply #8 on: December 08, 2017, 12:20:22 PM »
Don't works

*

MB Themes

Re: wallet credit bug
« Reply #9 on: December 08, 2017, 12:45:57 PM »
@will
I mean directly on database.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

will

Re: wallet credit bug
« Reply #10 on: December 08, 2017, 01:03:37 PM »
I make it and appears in the user account.
What is the issue ?

*

MB Themes

Re: wallet credit bug
« Reply #11 on: December 08, 2017, 02:28:09 PM »
@will
I've checked updater function and did not found any issue
Code: [Select]
public function addWallet($user, $amount) {
  $amount = (int)($amount*1000000000000);
  $wallet = $this->getWallet($user);
 
  if(isset($wallet['i_amount'])) {
    return $this->dao->update($this->getTable_wallet(), array('i_amount' => $amount+$wallet['i_amount']), array('fk_i_user_id' => $user));
  } else {
    return $this->dao->insert($this->getTable_wallet(), array('fk_i_user_id' => $user, 'i_amount' => $amount));
  }
}

It's correct.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

will

Re: wallet credit bug
« Reply #12 on: December 08, 2017, 03:02:58 PM »
Where can I see this code to verify it ?

Marked as best answer by on April 28, 2024, 06:38:18 AM
*

MB Themes

  • Undo Best Answer
  • Re: wallet credit bug
    « Reply #13 on: December 08, 2017, 04:07:21 PM »
    @will
    model
      To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

    *

    will

    Re: wallet credit bug
    « Reply #14 on: December 08, 2017, 04:54:25 PM »
    ???
    What does it mean ?
    What can I do to solved the problem ?