Announcement

Collapse
No announcement yet.

Tutorial: Integrate Bitcoin as a payment option

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tutorial: Integrate Bitcoin as a payment option

    I recently started to accept bitcoins as a form of payment at checkout. I thought it would be useful to tell people what I did, incase anyone else wanted to do it as well.

    Step One:
    Sign up for an online wallet at https://blockchain.info/wallet/

    Step Two:
    Create an offline payment method called bitcoin.

    Step Three:
    Edit "checkout-step3.html"

    replace "<!--START: CUSTOM--> to <!--END: CUSTOM--> with:

    Code:
    <!--START: CUSTOM-->
    <div style=" margin-top:20px;">
    <input name="payment" type="radio" onmousedown="document.getElementById('paymentdescription').style.display='block'; updateprice(); bitcoinpricemat(); getbitcoinprice(); return false;" value="offline-[id]" [FIRSTOPTIONCHECKED]>
    [payment_type]
    				
              
                    
    <div id="paymentdescription" style=" display:none;">
    
    <script type="text/javascript" charset="utf-8">    
    function updateprice(){
    	     
    var Amount = '[BALANCE]';
    var ReplacedAmount = Amount.replace(/\$/g,'');
    var urlfirst = 'https://btcticker.appspot.com/mtgox/';
    var urllast = 'usd2btc.png';
    document.getElementById('bitcoinimage').src= urlfirst+ReplacedAmount+urllast;
    }
    
    </script>
    
    <script type="text/javascript">
    
    </script>
    
    <center>[payment_description]
    Please send
    
    <img id="bitcoinimage" src="https://btcticker.appspot.com/mtgox/17.00usd2btc.png" />
    
     bitcoins to:<br>
    [YOUR BITCOIN WALLET ADDRESS]
    
    <!--START: CUSTOM_FIELD-->
    <div style="margin-top:15px;">
    [InputName]:<br /> [field]
    </div>
    <!--END: CUSTOM_FIELD-->
    </center>
    </div>
    
    </div>			  
    <!--END: CUSTOM-->
    Step 4:
    Replace [YOUR BITCOIN WALLET ADDRESS] with your wallet id.

    Explanation:
    The javascript will take the dollar sign off of the [BALANCE] that 3dcart generates, then insert that value into a url which generates an image of the current conversion from dollars to bitcoins.

    The "onmousedown" javascript in the radio button shows and hides the bitcoin address and amount when you select bitcoin as the form of payment. This way people who dont know what bitcoin is dont get confused.

    Limitation:
    1) Since you are changing the template file with bitcoin specific things, this will only really work smoothly if bitcoin is your only offline payment method.

    2) You need to check to make sure you get the bitcoins before you send the goods, as there is no built in way to confirm receipt.

    Conclusion:
    I may have left something out, if you have any questions, or something is not working, let me know, and I will try and help.

    Backup your files before you make changes!
    Last edited by NMTEACO; 09-06-2012, 04:37 AM.

  • #2
    Given that bitcoin is typically an anonymous payment used to purchase things that people want to be anonymous for buying, I'm curious why you would choose to accept this.
    - Dean P. e-commerce and small business consulting

    Comment


    • #3
      Originally posted by DeanP View Post
      Given that bitcoin is typically an anonymous payment used to purchase things that people want to be anonymous for buying, I'm curious why you would choose to accept this.
      Cash is also anonymous!

      But a few reasons:

      1) No charge backs (though this is not really an issue for us anyway)

      2) If done right, you can get away with very low merchant fees when converting to dollars.

      3) Easy for international customers to order

      4) Marketing. Not many places are taking bitcoin yet, so you stand out in the community.

      5) If you like speculation, you can play the game a bit and possibly make more money by cashing out when bitcoins are at a higher value then when you took them.

      To be sure there are many reasons NOT to take bitcoins, mostly involving complicated setup (I tried to address that here in this post) and risk of the whole thing falling apart before you cash out (or an exchange getting hacked). Its not for everyone. You have to evaluate your business and see if it makes since for you.
      Last edited by NMTEACO; 09-13-2012, 11:12 AM.

      Comment


      • #4
        How is this working out for you? My stores owner asked me to investigate this method of accepting payments for merchandise.
        ZuluTimeZone.com
        Time Well Spent

        Comment


        • #5
          Originally posted by sportscenterisnext View Post
          How is this working out for you? My stores owner asked me to investigate this method of accepting payments for merchandise.
          It's working great for us... we don't get a huge number of orders, but it just sits there and we get a few a week. No complaints or issues so far.

          Comment


          • #6
            Thank you for the swift response.

            I investigated your store yesterday and looked at it's visibility. I do have more questions which I will ask of Bitpay.com
            ZuluTimeZone.com
            Time Well Spent

            Comment

            Working...
            X