Bitcoin Forum
November 07, 2024, 06:48:47 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin Microtransaction API Flash/iOS/Android  (Read 1490 times)
Nejuf (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0



View Profile WWW
April 09, 2013, 06:28:47 AM
 #1

Does anyone know of a paid or free API that would allow me to accept Bitcoins as payment in a Flash game or iOS/Android app?  The only ones I have been able to find are for websites.  Undecided
Sekioh
Full Member
***
Offline Offline

Activity: 181
Merit: 100



View Profile
April 09, 2013, 06:43:23 AM
 #2

Essentially it'd be the same code, just different language... or even same language. AFAIK you'd have to still make a web request to your own (or a third party) bitcoind daemon or service, generate an address 'account' for the user and display it or hook their device app that hopefully supports bitcoin:// protocol, or pause the app and copy the address to clipboard for them to task switch over to wallet. There'd maybe be only one more step between your website third party and your own server to store in database the users unique device id and balance with account information so after a confirm you can have it available balance in credits or whatever.

<OPEN MONEY | Powering Blockchain Acceptance [ICO]
███████████████    ▬▬▬▬▬▬ Blockchain Meets Mainstream! ▬▬▬▬▬▬    ███████████████
Whitepaper  ●  Slack  ●  Facebook  ●  Twitter  ●  Reddit  ●  Telegram>
Xenland
Legendary
*
Offline Offline

Activity: 980
Merit: 1003


I'm not just any shaman, I'm a Sha256man


View Profile
April 09, 2013, 09:58:45 AM
 #3

There is always my PHP kit you can integrate with flash or w/e really.
http://github.com/Xenland/Bitcoin-Development-Kit

The website is http://bitcoindevkit.com but the server is down right now.
Nejuf (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0



View Profile WWW
April 11, 2013, 12:29:33 AM
 #4

Essentially it'd be the same code, just different language... or even same language. AFAIK you'd have to still make a web request to your own (or a third party) bitcoind daemon or service, generate an address 'account' for the user and display it or hook their device app that hopefully supports bitcoin:// protocol, or pause the app and copy the address to clipboard for them to task switch over to wallet. There'd maybe be only one more step between your website third party and your own server to store in database the users unique device id and balance with account information so after a confirm you can have it available balance in credits or whatever.

Thanks for describing that approach.  I'd like to use a dedicated API rather than my own creation to save time and avoid making mistakes that could cause people to send money to the wrong address or something.    Undecided

There is always my PHP kit you can integrate with flash or w/e really.
http://github.com/Xenland/Bitcoin-Development-Kit

The website is http://bitcoindevkit.com but the server is down right now.
Thanks Xenland, I think your kit may do what I need.  Please let me know when your server gets back up.
DarkPunk
Member
**
Offline Offline

Activity: 182
Merit: 10



View Profile
April 11, 2013, 01:54:53 AM
 #5

Essentially it'd be the same code, just different language... or even same language. AFAIK you'd have to still make a web request to your own (or a third party) bitcoind daemon or service, generate an address 'account' for the user and display it or hook their device app that hopefully supports bitcoin:// protocol, or pause the app and copy the address to clipboard for them to task switch over to wallet. There'd maybe be only one more step between your website third party and your own server to store in database the users unique device id and balance with account information so after a confirm you can have it available balance in credits or whatever.

Thanks for describing that approach.  I'd like to use a dedicated API rather than my own creation to save time and avoid making mistakes that could cause people to send money to the wrong address or something.    Undecided

There is always my PHP kit you can integrate with flash or w/e really.
http://github.com/Xenland/Bitcoin-Development-Kit

The website is http://bitcoindevkit.com but the server is down right now.
Thanks Xenland, I think your kit may do what I need.  Please let me know when your server gets back up.

No need to reinvent the wheel.  Java has JSON-RPC libraries, and an Authenticator object can be used for authentication to the RPC server.

Copy/Pasted from the bitcoin wiki:
Code:
 final String rpcuser ="...";
  final String rpcpassword ="...";
 
  Authenticator.setDefault(new Authenticator() {
      protected PasswordAuthentication getPasswordAuthentication() {
          return new PasswordAuthentication (rpcuser, rpcpassword.toCharArray());
      }
  });

A quick google and: https://code.google.com/p/jsonrpc4j/
Nejuf (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0



View Profile WWW
April 11, 2013, 05:14:27 AM
 #6

Essentially it'd be the same code, just different language... or even same language. AFAIK you'd have to still make a web request to your own (or a third party) bitcoind daemon or service, generate an address 'account' for the user and display it or hook their device app that hopefully supports bitcoin:// protocol, or pause the app and copy the address to clipboard for them to task switch over to wallet. There'd maybe be only one more step between your website third party and your own server to store in database the users unique device id and balance with account information so after a confirm you can have it available balance in credits or whatever.

Thanks for describing that approach.  I'd like to use a dedicated API rather than my own creation to save time and avoid making mistakes that could cause people to send money to the wrong address or something.    Undecided

There is always my PHP kit you can integrate with flash or w/e really.
http://github.com/Xenland/Bitcoin-Development-Kit

The website is http://bitcoindevkit.com but the server is down right now.
Thanks Xenland, I think your kit may do what I need.  Please let me know when your server gets back up.

No need to reinvent the wheel.  Java has JSON-RPC libraries, and an Authenticator object can be used for authentication to the RPC server.

Copy/Pasted from the bitcoin wiki:
Code:
 final String rpcuser ="...";
  final String rpcpassword ="...";
 
  Authenticator.setDefault(new Authenticator() {
      protected PasswordAuthentication getPasswordAuthentication() {
          return new PasswordAuthentication (rpcuser, rpcpassword.toCharArray());
      }
  });

A quick google and: https://code.google.com/p/jsonrpc4j/

Are you directing that more towards me or Xenland?  Huh  I'm trying to find a way for users to easily send their bitcoins (preferably from within app) and a way for me to reliably know when bitcoins have been received and who to credit them to.
DarkPunk
Member
**
Offline Offline

Activity: 182
Merit: 10



View Profile
April 11, 2013, 05:29:11 AM
 #7

<snip>

Are you directing that more towards me or Xenland?  Huh  I'm trying to find a way for users to easily send their bitcoins (preferably from within app) and a way for me to reliably know when bitcoins have been received and who to credit them to.

Either-or.  If you have any programming experience, all you really need is an RPC library for the language in need (Java in the case of Android, and Obj-C for iOS) and an RPC server (Set it up yourself, or use a 3rd-party like blockchain.info).
Mike Hearn
Legendary
*
Offline Offline

Activity: 1526
Merit: 1134


View Profile
April 11, 2013, 09:00:55 AM
 #8

For an Android app, you can use an intent to request a payment from an installed wallet app. See here:

https://code.google.com/p/bitcoin-wallet/source/browse/#git%2Fsample-integration-android

I'll ask Andreas to document this.
Andreas Schildbach
Hero Member
*****
Offline Offline

Activity: 483
Merit: 551


View Profile
April 11, 2013, 12:16:06 PM
 #9

I just added a wiki page for explaining in-app payments:

https://code.google.com/p/bitcoin-wallet/wiki/InAppPayments
Xenland
Legendary
*
Offline Offline

Activity: 980
Merit: 1003


I'm not just any shaman, I'm a Sha256man


View Profile
April 11, 2013, 01:03:09 PM
 #10

The website is back up, I have to resync the block chain on the new server so the examples may not work until that happens by my estimation of tomorrow Smiley
http://BitcoinDevkit.com
Nejuf (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0



View Profile WWW
April 11, 2013, 02:44:14 PM
 #11

Thanks guys.  Grin  Bitcoin wallet is the sort of thing I'm looking for, though BDK might work too.  Now to figure out how to tie all this into Flash.  Smiley
Xenland
Legendary
*
Offline Offline

Activity: 980
Merit: 1003


I'm not just any shaman, I'm a Sha256man


View Profile
April 12, 2013, 03:26:36 AM
Last edit: April 12, 2013, 07:02:03 AM by Xenland
 #12

Thanks guys.  Grin  Bitcoin wallet is the sort of thing I'm looking for, though BDK might work too.  Now to figure out how to tie all this into Flash.  Smiley

Indeed you'd definitely have to use Blockchain.info for simplicity of calling a page & if you can't afford setting up a 512mb ram vps server with php +BDK+ Bitcoin running on it(which flash could query through php requests that way) although you do get the benefits of "controlling your money" when blockchain.info can potentially "defraud" you either by spoofing data or stealing private keys. I'm not attacking blockchain.info just stating that if your intention is to use bitcoin for some purposes such as "controlling your money" then that’s the wrong way to integrate your flash project into a device like Bitcoin.

I'd also like to note I'll be selling example scripts(which are complex and informative in comparison to the free complementary scripts) and for being down for so long I decided to have every interactive example come with a "complementary" example script. The first free script up is the first example "generate an address". Here you go mates cheers! http://bitcoindevkit.com/examples/example1.php

*This gives me ideas of making an BDKas3
DarkPunk
Member
**
Offline Offline

Activity: 182
Merit: 10



View Profile
April 12, 2013, 03:35:36 AM
Last edit: April 12, 2013, 03:48:36 AM by DarkPunk
 #13

Thanks guys.  Grin  Bitcoin wallet is the sort of thing I'm looking for, though BDK might work too.  Now to figure out how to tie all this into Flash.  Smiley

Indeed you'd definitely have to use Blockchain.info for simplicity of calling a page & if you can't afford setting up a 512mb ram vps server with php +BDK+ Bitcoin running on it(which flash could query through php requests that way) although you do get the benefits of "controlling your money" when blockchain.info can potentially "defraud" you either by spoofing data or stealing private keys. I'm not attacking blockchain.info just stating that if your intention is to use bitcoin for some purposes such as "controlling your money" then that’s the wrong way to integrate your flash project into a device like Bitcoin.

I'd also like to note I'll be selling example scripts(which are complex and informative in comparison to the free complementary scripts) and for being down for so long I decided to have every function come with a "complementary" example script. The first free script up is the first example "generate an address". Here you go mates cheers! http://bitcoindevkit.com/examples/example1.php

*This gives me ideas of making an BDKas3

Your RPC server is down, or you moved your PHP script.

Edit: It's definitely your RPC server.
Xenland
Legendary
*
Offline Offline

Activity: 980
Merit: 1003


I'm not just any shaman, I'm a Sha256man


View Profile
April 12, 2013, 07:00:43 AM
 #14

Thanks guys.  Grin  Bitcoin wallet is the sort of thing I'm looking for, though BDK might work too.  Now to figure out how to tie all this into Flash.  Smiley

Indeed you'd definitely have to use Blockchain.info for simplicity of calling a page & if you can't afford setting up a 512mb ram vps server with php +BDK+ Bitcoin running on it(which flash could query through php requests that way) although you do get the benefits of "controlling your money" when blockchain.info can potentially "defraud" you either by spoofing data or stealing private keys. I'm not attacking blockchain.info just stating that if your intention is to use bitcoin for some purposes such as "controlling your money" then that’s the wrong way to integrate your flash project into a device like Bitcoin.

I'd also like to note I'll be selling example scripts(which are complex and informative in comparison to the free complementary scripts) and for being down for so long I decided to have every function come with a "complementary" example script. The first free script up is the first example "generate an address". Here you go mates cheers! http://bitcoindevkit.com/examples/example1.php

*This gives me ideas of making an BDKas3

Your RPC server is down, or you moved your PHP script.

Edit: It's definitely your RPC server.

Thanks Smiley Bitcoin 0.8.1 went up today and its probably still loading I still need to link the BDK library to the Bitcoin RPC auth credentials too. In fact double thanks for reminding me its probubly finished syncing by now.
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!