Bitcoin Forum
May 08, 2024, 09:06:11 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Integrating Auto Recieiving for Purchases for Payment release  (Read 678 times)
onehost (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
July 24, 2016, 05:46:23 AM
 #1

Hello

Anyone know how we could implement a system on our ecommerce platform that allows users to provide confirmation of a purchase being delivered and then the bitcoins are sent automatically from our Bitcoin wallet to the seller?

How we want it to work is the purchaser pays via bitcoin and the seller delivers the goods. Upon the purchaser receiving the good he then notifies our site and then the purchase amount is sent from our wallet to the seller automatically.

I am sure there is a way as we have seen other sites doing the same thing.

Also if the cost is not too much we wold be happy to pay someone to complete this if they have expereince in setting up something such as this. Also in our other post we also have setup our own Bitcoin Core server as we wish to not use any third party payment processors and use our own servers to complete transactions. This PHP script does what we need from payments https://gourl.io/bitcoin-payment-gateway-api.html  but we do not want to use their API and use our own Bitcoin core server..... If someone knows how to set this up we would love to chat and work out how much something like this would cost to setup.
The forum strives to allow free discussion of any ideas. All policies are built around this principle. This doesn't mean you can post garbage, though: posts should actually contain ideas, and these ideas should be argued reasonably.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715202371
Hero Member
*
Offline Offline

Posts: 1715202371

View Profile Personal Message (Offline)

Ignore
1715202371
Reply with quote  #2

1715202371
Report to moderator
masakali
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
July 25, 2016, 04:18:56 PM
 #2

Do you mean like to a BIP32 HD wallet, or to a static wallet address of the seller?

There definitely is a way..
coinableS
Legendary
*
Offline Offline

Activity: 1442
Merit: 1179



View Profile WWW
July 28, 2016, 02:33:29 AM
 #3

So you want to set up an escrow system? That's what it sounds like to me.

Are you building from scratch? How much customization are you able to do with your e-commerce platform?

If you can build from scratch set it up in bitcoind with JSON RPC, you can prune it so you don't have to store the full blockchain. The biggest inconvenience is waiting for it to sync, which isn't so bad these days, the one I set up on digitalocean last month took less than 24 hours.

I'd just create a simple user/member system that assigns each user a specific address when they sign up.

something like
Code:
//new user registers
$userid = uniqid();
$addy = $bitcoin->getnewaddress();
$newuser = "INSERT INTO users
               (`USERID`, `USERNAME`, `PASSWORD`, `DEPOSIT_ADDRESS` ...etc

Seller posts something for sale and specifies a receiving/withdrawal address, buyer clicks to buy, and they send bitcoins to the deposit address which is an address that YOU control specifically.

Upon receipt notify the seller to deliver the item. You can use walletnotify in your bitcoin.conf to monitor for new transactions.

The details of this transaction will be logged in your database so the user can go back later to verify they received the item.
Once they receive the item they return to the site, click the "I received it" button and it will pull the amount of the sale from your database where you can then fire a sendtoaddress() via JSON RPC to send the funds to an address that the seller specifies (not their deposit address, an address they own and control).  Then mark the transaction as complete in your database.

Code:
//user clicks received it button
$checkAddy = $bitcoin->validateaddress($withdrawalAddress);
$isValid = $checkAddy['isvalid'];
if(!$isValid){
$message = "Address is invalid";
} else {
//process withdrawal
$withdrawal = $bitcoin->sendtoaddress($withdrawalAddress, $transactionAmount);
$message = "Transaction: ".$withdrawal."<br>";
        }

That would be the basics of it at least. You would need to figure out how you will handle disputes and stuff like that. Or you could do it using a 3rd party API like blocktrail, or blockchain.info.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!