Bitcoin Forum
April 26, 2024, 03:25:41 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [solved]Simple Form?  (Read 950 times)
logansryche (OP)
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250



View Profile
August 21, 2011, 05:56:23 PM
Last edit: August 23, 2011, 02:18:14 AM by logansryche
 #1

Hello folks,

I'm looking to create a form. This form will have 3 input boxes. The first one is for the send from box. The second one is the send to box and the third generates a converted number from the previous page. The point is to send btc to a given address from a given address based on the value in the box, like a simple payment page(ie: the value in the box is 1.2btc and when the user enters their address in the first box, it will auto send 1.2btc from that address to another address while sending the contents of the order to my email and display a thank you/confirmation page). This form also needs to convert a USD total into a BTC total for the 3rd input box from the previous page(which has a checkout form on it). I've tried doing this many times and have given up. If someone out there knows how to do this, I'm all ears.

-Matt
1714101941
Hero Member
*
Offline Offline

Posts: 1714101941

View Profile Personal Message (Offline)

Ignore
1714101941
Reply with quote  #2

1714101941
Report to moderator
1714101941
Hero Member
*
Offline Offline

Posts: 1714101941

View Profile Personal Message (Offline)

Ignore
1714101941
Reply with quote  #2

1714101941
Report to moderator
"If you don't want people to know you're a scumbag then don't be a scumbag." -- margaritahuyan
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714101941
Hero Member
*
Offline Offline

Posts: 1714101941

View Profile Personal Message (Offline)

Ignore
1714101941
Reply with quote  #2

1714101941
Report to moderator
1714101941
Hero Member
*
Offline Offline

Posts: 1714101941

View Profile Personal Message (Offline)

Ignore
1714101941
Reply with quote  #2

1714101941
Report to moderator
1714101941
Hero Member
*
Offline Offline

Posts: 1714101941

View Profile Personal Message (Offline)

Ignore
1714101941
Reply with quote  #2

1714101941
Report to moderator
logansryche (OP)
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250



View Profile
August 22, 2011, 12:44:30 PM
 #2

does no one know how to do this?
alkhdaniel
Member
**
Offline Offline

Activity: 114
Merit: 10


View Profile
August 22, 2011, 01:14:59 PM
 #3

Converting from USD to BTC based on mtgox last price:
Code:
<?php
$opts 
= array(
  
'http'=> array(
    
'method'=>   "GET",
    
'user_agent'=>    "MozillaXYZ/1.0"));
$context stream_context_create($opts);
$json file_get_contents('https://mtgox.com/code/data/ticker.php'false$context);
$json json_decode($json);
//$usd2btc = $valueofbox3 / $json->{'ticker'}->{'last'};
?>


Not really sure what you meant with the rest, please give another example :x
arsenische
Legendary
*
Offline Offline

Activity: 1199
Merit: 1012


View Profile
August 22, 2011, 01:16:22 PM
 #4

I am sorry, I didn't get it: why do you need a "send from" box?

logansryche (OP)
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250



View Profile
August 22, 2011, 01:46:45 PM
 #5

I am sorry, I didn't get it: why do you need a "send from" box?
This is going into my payment page for BitCard. The send from box is where the customer enters their bitcoin address. The send to box would obviously be my bitcoin address. When the customer hits submit, it will automaticaly send the BTC value in the other box from the send from box to the send to box.

Not really sure what you meant with the rest, please give another example :x

Ok. Customer buys some items and clicks the checkout button. It leads them to the page I'm describing. This form has to be able to convert USD(from the previous page) to BTC, send me notification by email of the order while displaying a thank you page. This form also has to have 3 imput boxes. The first one the customer puts their address in, the second one has my adderss in it, and the third one is a value display from the previous page(where the conversion script comes in). Once the customer fills in their address and hits submit, the form has to send that value that's listed in box #3 to my bitcoin address to complete the transaction.
arsenische
Legendary
*
Offline Offline

Activity: 1199
Merit: 1012


View Profile
August 22, 2011, 05:01:01 PM
Last edit: August 22, 2011, 07:42:04 PM by arsenische
 #6

Once the customer fills in their address and hits submit, the form has to send that value that's listed in box #3 to my bitcoin address to complete the transaction.

The form doesn't have access to customer's wallet and can't send bitcoins from his/her address. It is the customer who can send the money to your address. So, you need just to generate a unique bitcoin address and to ask the customer to send bitcoins there.

You might find it useful to read https://en.bitcoin.it/wiki/Merchant_Howto, https://en.bitcoin.it/wiki/PHP_developer_intro and the linked pages.

logansryche (OP)
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250



View Profile
August 22, 2011, 06:25:02 PM
 #7

Ok.. I think I sorta get it. Via that wiki I found Bitcoin Payflow, yet still have no idea how to implement this.
I know nothing about php, old school html is all I know.
arsenische
Legendary
*
Offline Offline

Activity: 1199
Merit: 1012


View Profile
August 22, 2011, 07:52:57 PM
 #8

Ok.. I think I sorta get it. Via that wiki I found Bitcoin Payflow, yet still have no idea how to implement this.
I know nothing about php, old school html is all I know.

Probably you need a server to run bitcoind and maybe somebody to set it up and implement the desired functionality for you.

logansryche (OP)
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250



View Profile
August 22, 2011, 09:07:43 PM
 #9

Well there should be a way to set it up to be used with mt gox or bit-bank as i know for a fact bitcoind won't run on my server and think it's a waste of resources to find a server just to run it on. But yes, if someone did come along and make a form for me, I would apprecite it.
alkhdaniel
Member
**
Offline Offline

Activity: 114
Merit: 10


View Profile
August 22, 2011, 09:38:37 PM
 #10

Well there should be a way to set it up to be used with mt gox or bit-bank as i know for a fact bitcoind won't run on my server and think it's a waste of resources to find a server just to run it on. But yes, if someone did come along and make a form for me, I would apprecite it.
Try bit-pay.
https://bit-pay.com/
logansryche (OP)
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250



View Profile
August 23, 2011, 02:17:34 AM
 #11

Here's hoping that works.. have to wait 24hrs to be accepted
Worth the wait i supose.

-Matt


EDIT: Yup, working with Bit Pay to work with my cart to get BitCard back up and running again. Thanks for the info alkhdaniel. ^.^
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!