How to trade STEEM via PHP and no popups?

in #steemdev6 years ago

Big.jpg

I created a payment system for game developers to include inside their games and call the system WordPress Money. This system currently allows you to do three things:

  1. You can monetise your games by integrating with Tapjoy and showing videos inside your games, showing banners, offering in-game rewards for downloading free games from the Apple / Play stores or even for doing things like buying a domain at GoDaddy. Tapjoy has a plethora of ways in which they reward the player and this is the key thing... They player can do something that costs them nothing or that costs them something. Some items reward them with more while others reward them with less but in either case the developer gets paid in fiat currency no matter what the player does and the player then receives in-game currency from Tapjoy anywhere between immediately and 2 weeks later. I wrote the back end server to allow Tapjoy to speak to the developer's WordPress website and sync that Tapjoy rewards to the player's in-game accounts so they can spend it in their game(s) once it is received.

  2. I allow developers to create any number of virtual currencies for their games and limit the currencies to a specific game or make it shareable across games. Since these are virtual currencies that have no monetary value it means I have complete control over how they are used and thus I let the developer give and take currency as they please. Players can buy items and if they have sufficient funds in their account, the transaction completes in real time and they receive whatever they bought directly into their inventory, ready to do whatever it is they intend to do with it... or they get an error message saying they don't have enough funds. Either way, the results are immediate and the buying / selling of goods can take place in game.

  3. I also allow people to buy these virtual currencies using any payment method the developer enabled for WooCommerce. This means they can pay via COD, EFT, cash or any CryptoCurrency they choose. The problem here is that the transactions are not real time (since BTC transactions can't be confirmed within a second or two) or some of the payment methods show popups (like PayPal) in which you have to complete the transaction. This means that while I allow for virtual goods and virtual currencies to be sold via the website and then used in game once it becomes available, I am not able to provide this option from within the game itself since it's an application, not something that runs inside a web page. This bugs me. I want to enable in-game crypto use..!

This is something I have wanted to do for a long time but I have always thought this to be impossible, given how CryptoCurrencies work. When I read that STEEM is near instantaneous I thought to myself: "Awesome! Let me add STEEM/STEEM DOLLARS as the first and only in-game payment option that allows you to buy and sell items using a real cryptocurrency directly from within your game!".

Ever since the day I first discovered STEEM I have wanted to do that and have been looking into how I can do that... but so far I am getting absolutely nowhere. All I see are tutorials that teach you how to write: "Please send STEEM to this address and I'll get back to you when I see it's done" on your website or instructions on how to make popup windows appear on your website to allow you to trade STEEM via a third party.

Basically, what I aim to do is turn any game developer into said third party. All gamers on the developer's site will have to create an account in order to play the developer's game(s) anyway and will thus have an account page where they can set whatever settings. (Think of it this way, everyone who buys my kit turns their WordPress site into a games portal. Think BattleNet or Xbox Live. They make variousgames, have players create an account and then the players can play all the developer's games via that one account) Both the developer and the players will have config screens where they can save whatever they need to save but here is what I need:

I need a way to send a simple GET or POST request to a php page which will trigger the transfer of STEEM or STEEM DOLLARS from one account to another account without requiring any HTML to be output at all. I want to be able to call a public function along the lines of SendSTEEMTo($recipient) and then inside that function I will take care of determining who the current person is, fetching their STEEM balance from the settings they saved on the website, transfer the funds from their account to the other and once it is done I will then update their inventory or whatever and have the function return either a success notification or an error notification.

All the "This is the current price of STEEM vs USD" and "This is your current balance" and "Are you sure you want to continue with this transaction" stuff, all of that I will code in C# to take place inside the game but at some point or another I want to send a call to run funciton SendSTEEMTo() and have it run without any popups or other requirements like cookies or HTML5 or jQuery or whatever... The part where the actual transfer of currency takes place is the part that I need explained to me. I am nowhere on that front at this point, I'm sorry to say 😭

I've looked and scratched my head but I have no idea if this is even possible. Is there anyone here who has enough experience with this who can answer me these two questions?

  1. Can this be done with STEEM or is it just as impossible and impractical as real-time Ether and BTC transactions?
  2. if it is possible, can you PLEASE show me HOW to do that?

I want to give WordPress Money a fourth option: Pay with CryptoCurrency. Considering I already have an install base of a few hundred customers, if I one day make the post: "Okay guys, download and install the latest free update and as soon as you've done so you will be able to use real time CryptoCurrencies inside your games instead of just using valueless virtual currencies. Enjoy" ...you can just imagine how that will boost the interest in STEEM if I can make that post? 😎🐱‍👤

But in order to do that, the above is what I need... a way to trigger a transfer of funds via PHP without any JavaScript that needs to run in a browser, client side, and without any kind of popups or anything that will break the execution of the function. If that requires people to pre-register their account details then that is fine (it will be up to them to decide if the developer seems reputable and then get or leave the game, but if they choose to register on the site then I want to be able to do this!)

Is this possible and if so how can I do that?

Your assistance will be very greatly appreciated!
Thanks

Feel free to contact me directly via [email protected] if you want. Again, all assistance in making this happen will be greatly appreciated. The stuff I saw on the "How to" documents are way over my head so please go gentle on me. :)

Coin Marketplace

STEEM 0.20
TRX 0.25
JST 0.037
BTC 96493.32
ETH 3372.63
USDT 1.00
SBD 2.99