Bitcoin Forum
November 25, 2017, 11:34:50 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Need help in configuring JSON RPC for Bitcoin Core - Please help  (Read 414 times)
IGCGamers
Full Member
***
Offline Offline

Activity: 196


View Profile
August 14, 2017, 09:25:04 PM
 #1

Hi,

I installed bitcoin core on ubuntu server and using JSON RPC on php. I am in the process of developing a gaming site.  When a client requests a withdrawal it automatically process the transaction and the transaction fee is charged from my main balance. Is there any way to make the the transaction fees deducted from the withdrawn money by the user.

Example - If a client requests for a withdrawal of 0.1 btc, i want to deduct the fee and send the balance as withdrawal.  How do i put it in php code?  Please help me.  I dont want to charge a fixed fee from the clients.  I want to just deduct the fees that will incur for that withdrawal..
1511609690
Hero Member
*
Offline Offline

Posts: 1511609690

View Profile Personal Message (Offline)

Ignore
1511609690
Reply with quote  #2

1511609690
Report to moderator
1511609690
Hero Member
*
Offline Offline

Posts: 1511609690

View Profile Personal Message (Offline)

Ignore
1511609690
Reply with quote  #2

1511609690
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1511609690
Hero Member
*
Offline Offline

Posts: 1511609690

View Profile Personal Message (Offline)

Ignore
1511609690
Reply with quote  #2

1511609690
Report to moderator
1511609690
Hero Member
*
Offline Offline

Posts: 1511609690

View Profile Personal Message (Offline)

Ignore
1511609690
Reply with quote  #2

1511609690
Report to moderator
1511609690
Hero Member
*
Offline Offline

Posts: 1511609690

View Profile Personal Message (Offline)

Ignore
1511609690
Reply with quote  #2

1511609690
Report to moderator
Casy
Member
**
Offline Offline

Activity: 116

🔴🔵 FoxMixer.com 🔵🔴


View Profile WWW
August 15, 2017, 10:40:24 AM
 #2

Hi,

I installed bitcoin core on ubuntu server and using JSON RPC on php. I am in the process of developing a gaming site.  When a client requests a withdrawal it automatically process the transaction and the transaction fee is charged from my main balance. Is there any way to make the the transaction fees deducted from the withdrawn money by the user.

Example - If a client requests for a withdrawal of 0.1 btc, i want to deduct the fee and send the balance as withdrawal.  How do i put it in php code?  Please help me.  I dont want to charge a fixed fee from the clients.  I want to just deduct the fees that will incur for that withdrawal..

I don't know if this parameter is implemented in your bitcoin core version, but on
https://chainquery.com/bitcoin-api/sendtoaddress
You can see parameter 5: subtractfeefromamount (boolean), that is exactly what you want.

Just a general remark: it is usually more convenient for all users to know exactly what fees will be substracted.
As soon as you pass on the network fees directly to your customers, they will be encountering "random" fees, just depending on the network load. New users won't understand at all, why they received 0.1 BTC yesterday and 0.05 today.
Setting a fee that is generally a bit higher than the typical mining fees is the way of doing it predictably in the view of the users.

IGCGamers
Full Member
***
Offline Offline

Activity: 196


View Profile
August 15, 2017, 11:44:30 PM
 #3

Hi,

I installed bitcoin core on ubuntu server and using JSON RPC on php. I am in the process of developing a gaming site.  When a client requests a withdrawal it automatically process the transaction and the transaction fee is charged from my main balance. Is there any way to make the the transaction fees deducted from the withdrawn money by the user.

Example - If a client requests for a withdrawal of 0.1 btc, i want to deduct the fee and send the balance as withdrawal.  How do i put it in php code?  Please help me.  I dont want to charge a fixed fee from the clients.  I want to just deduct the fees that will incur for that withdrawal..

I don't know if this parameter is implemented in your bitcoin core version, but on
https://chainquery.com/bitcoin-api/sendtoaddress
You can see parameter 5: subtractfeefromamount (boolean), that is exactly what you want.

Just a general remark: it is usually more convenient for all users to know exactly what fees will be substracted.
As soon as you pass on the network fees directly to your customers, they will be encountering "random" fees, just depending on the network load. New users won't understand at all, why they received 0.1 BTC yesterday and 0.05 today.
Setting a fee that is generally a bit higher than the typical mining fees is the way of doing it predictably in the view of the users.

Thanks for your help. Can you please tell  me how do i use that 5 parameter in php? 

For example:

I use the below code for withdraw:


$wind = $bitcoin->sendtoaddress($address,$amount1);
$info = '<span  class="msgOk">Paid to the address: <b>'.$address.'</b><br><br>Txid: <b>'.$wind.'</b><br></span>';

Please tell me how should i use it in php
IGCGamers
Full Member
***
Offline Offline

Activity: 196


View Profile
August 16, 2017, 11:54:03 PM
 #4

an y one please help me with the code
MrCrank
Sr. Member
****
Offline Offline

Activity: 406


🌟 eSports ICO: 01/11/2017 🌟


View Profile
August 17, 2017, 04:24:35 AM
 #5

an y one please help me with the code

You can read it om bitcoin wiki.
Php examples find with google.
no one tell you working code because is expensive info.

I can help you, cost 0.1BTC

           ▄▄▄██████████▄▄▄
        ▄███▀▀   ▄▄▄▄   ▀▀███▄
     ▄██▀▀ ▄▄████████████▄▄ ▀▀██▄
    ██▀ ▄███████▀▀▀▀▀▀███████▄ ▀██
   ██▀ ██████▀          ▀██████  ██
  ██  █████▀         ▄▄▄▄▄██████▄ ██
██▀ █████  ▄▄▄██████████████████  ██
▐██  ██████▄▄▄▄▄▄ ▀▀▀▀▀▀██████▀▀▀▀ ██▌
███ ▐███████████████████▄▄▄▄▄▄     ███
▐██  ▀▀██████████████████████████▀ ██▌
███ █▄▄▄▄    ▀▀▀▀▀██████████████ ▄██
  ██▄ █████▄              ▄█████ ▄██
   ███ ▀██████▄▄      ▄▄██████▀ ▄██
    ▀██▄ ▀▀█████████████████▀ ▄██▀
      ▀███▄  ▀▀████████▀▀▀ ▄▄██▀
         ▀▀███▄▄▄▄▄▄▄▄▄▄████▀
              ▀▀▀▀▀▀▀▀▀▀
.
eSports.com

                   ██                   
                   ██                   
                   ██                   
                   ▀▀                   
         ▄▄████▄▄      ▄▄█████▄         
     ▄▄██▀▀    ▀▀███▄███▀    ▀▀██▄▄     
     ██     ▄      ▀▀     ▄▄▄    ██     
     ██  ▄███▄        ▄▄▀▀▀▄▄  ██▌   
    ▐█▌  ▀█████▀        ██   ██  ▐██   
    ██    ▀█▀            ███     ██   
   ▐██           ▄    ▄           ▐█▌   
   ██         ▄███    ▀██▄         ██   
   ██      ▄███▀        ▀███▄      ██   
   ██▄   ▄██▀              ▀██▄   ▄██   
    ▀████▀▀                   ▀████▀   
█   █
█ █ 
█ █ █
     
█ █ █
  █ █
█ █ 
█   █
█ █ █
  █ █
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!