So, I have looked everywhere and no one seems to have this specific problem.
I have set up a e-commerce store that is accepting BTC, So far the users can only see the price of the product in USD, however, I want the user to be able to click the USD price and convert it to BTC instantly. Like you can on a blockchain.info transaction.
Blockchain transaction conversion
So far, I have only been able to display the BTC price using Blockchain API.
I want the same effect as Blockchain on my price, or atleast under it.
(Snapshots of site below to give an idea of what I want)
The code I have to display the BTC price (If it helps, im a noob sorry)
<?php $url = "https://blockchain.info/stats?format=json"; $stats = json_decode(file_get_contents($url), true); echo $stats['market_price_usd']; ?>