Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transactions. Reward: 45 USD #5

Closed
AlexeyAnshakov opened this issue Sep 22, 2014 · 3 comments
Closed

Transactions. Reward: 45 USD #5

AlexeyAnshakov opened this issue Sep 22, 2014 · 3 comments

Comments

@AlexeyAnshakov
Copy link
Member

Do a transactions feature between users. Open
blogs-post.htm
for example. After user input a sum into "Donation" field and click submit, the sum will be transferred to the topic author (using his ID) minus our fee, % is what the author get, linear dependence:
1 - 10 WRG 75.5-80%
10 - 100 WRG 80-85%
100 - 1,000 WRG 85-90%
1,000 - 10,000 WRG 90-95%
In DB we have to store WRG's to three decimal places, like 5,432 WRG and rounding in user's advantage.
Please create webRunes account in DB, so all fees and withdraw transactions can be stored like others.

@bhushano7
Copy link
Contributor

In database :
Table Name : webRunes_transactions
UserId (SentTo): XXXXXXXXXXXXX
UserId (From): XXXXXXXXXXXXX
TransactionWRG (TotalWRG): X,XXX
Percentage: X,XX
TotalWRG (TransactionWRG - Percentage) : X,XXX
DateTime : date-time

-> User opens blogs-post.htm (Use empty HTML)
-> Enter WRG Amount and click Submit
-> Calculate charges
-> Store in database

1 wrg -75%
2 wrg -75.5%
3 wrg -76%
...
10 wrg -80%

If you send 70wrg
I will got something like 62.891 (it's incorrect, just for example)

@AlexeyAnshakov AlexeyAnshakov changed the title Transactions. Reward: ??? USD Transactions. Reward: 45 USD Sep 27, 2014
@bhushano7
Copy link
Contributor

0 - 10 WRG, 75-80%
75 to 80 = difference 5/10 = 0.5

0 wrg - 75%
1 wrg -75.5%
2 wrg -76%
3 wrg -76.5%
4 wrg -77%
5 wrg -77.5%
6 wrg -78%
7 wrg -78.5%
8 wrg -79%
9 wrg -79.5%
10 wrg -80%

10 - 100 WRG , 80-85%
5/90 = 0.055

100 - 1,000 WRG 85-90%
5/900 = 0.0055

1,000 - 10,000 WRG 90-95%
5/9000 = 0.00055

@AlexeyAnshakov
Copy link
Member Author

#55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants