Naive Coding Question re: Bitcoins

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BFT3K
    Too lazy to set a custom title
    • Dec 2005
    • 10764

    #1

    Naive Coding Question re: Bitcoins

    I know this is probably a dumb question for those in-the-know but...

    Let's say you have a site and want to try out bitcoins as THE ONLY payment option. A person pays for access, but what program/script generates a un/pw for this person to access the site?

    Without a 3rd party biller, how is this done in realtime?

    Again, sorry for the naive question - I'm not too bright.
    Last edited by BFT3K; 04-18-2013, 01:23 PM.
  • Dankasaur
    So Fucking Fossilized
    • Sep 2011
    • 1432

    #2
    Utilizing Paul Markham's Magic Join Links™ ® ©

    Comment

    • NYMD
      Registered User
      • Apr 2013
      • 26

      #3
      Assuming you have only one site and one subscription type... You host a page that takes sign up submissions and generates an invoice to a bitcoin processor like bitpay or coinbase. The invoice that they generate looks like this:

      bitpay-dot-com/invoice?id=nOGLY_LjFKyQWt7RO12DmONjJhB4BcZavkr9Sao qziU=

      The person pays it.

      When the transaction is complete, the processor posts back the invoice information to you telling you it was a confirmed sale. That is where a script you writes receives the postback, generates a u/p and sends it to the new member.

      You'll need a system that tracks the invoice that is generated as well as the email the person uses to sign up. You are responsible for the user management and expiry. And I guess the crux of your question is that it isn't done in realtime -- there is a delay as the person pays the bitcoin invoice and you receive confirmation it is complete.
      Last edited by NYMD; 04-18-2013, 01:35 PM.

      Comment

      • BFT3K
        Too lazy to set a custom title
        • Dec 2005
        • 10764

        #4
        Originally posted by NYMD
        Assuming you have only one site and one subscription type... You host a page that takes sign up submissions and generates an invoice to a bitcoin processor like bitpay or coinbase. The invoice that they generate looks like this:

        bitpay-dot-com/invoice?id=nOGLY_LjFKyQWt7RO12DmONjJhB4BcZavkr9Sao qziU=

        The person pays it.

        When the transaction is complete, the processor posts back the invoice information to you telling you it was a confirmed sale. That is where a script you writes receives the postback, generates a u/p and sends it to the new member.

        You'll need a system that tracks the invoice that is generated as well as the email the person uses to sign up. You are responsible for the user management and expiry. And I guess the crux of your question is that it isn't done in realtime -- there is a delay as the person pays the bitcoin invoice and you receive confirmation it is complete.
        Thanks, but I'm still a bit confused... I assume the confirmation of the sale will come via an email, no?

        Wouldn't that still require you to manually address the email, even if you can dump it into a script to generate the un/pw?

        I'm clearly not a coder, so sorry again if these questions are pedestrian, but if a person wants to join while you are away from your computer, how would you be granting access in realtime?
        Last edited by BFT3K; 04-18-2013, 01:52 PM.

        Comment

        • NYMD
          Registered User
          • Apr 2013
          • 26

          #5
          Originally posted by BFT3K
          Thanks, but I'm still a bit confused... I assume the confirmation of the sale will come via an email, no? Doesn't that still require you to manually address the email, even if you can dump it into a script to generate the un/pw?

          I'm clearly not a coder, so sorry again if these questions are pedestrian, but if a person wants to join while you are away from your computer, how would you be granting access in realtime?
          The confirmation comes two ways -- via email like you described is one way. So yes you could manually do the accounts when you receive the email.

          The second way is a "data postback" -- that means the processor's server sends a packet of information to your server with that same completion information. You need a custom script on your server to handle that information, create accounts, etc.

          Comment

          • Hornydog4cooter
            Confirmed User
            • Jan 2005
            • 2859

            #6
            interesting thread here is a bump for you

            Comment

            • BFT3K
              Too lazy to set a custom title
              • Dec 2005
              • 10764

              #7
              Originally posted by NYMD
              The confirmation comes two ways -- via email like you described is one way. So yes you could manually do the accounts when you receive the email.

              The second way is a "data postback" -- that means the processor's server sends a packet of information to your server with that same completion information. You need a custom script on your server to handle that information, create accounts, etc.
              Does this script already exist, or would you have to hire a coder to write one for you, on a specific server-need basis?

              Comment

              • DWB
                Registered User
                • Jul 2003
                • 31779

                #8
                You can start by doing it manually if you're trying to get up and running quickly and don't know how to have it post back. Once you get confirmation of the transaction, you can send them user/pass.

                When you create a check out page / invoice, you can add user fields like email, username, password, and so on. All of that comes to you.

                Comment

                • NYMD
                  Registered User
                  • Apr 2013
                  • 26

                  #9
                  Originally posted by BFT3K
                  Does this script already exist, or would you have to hire a coder to write one for you, on a specific server-need basis?
                  I believe the only option is custom at this point. There is a market for CCBill or Epoch or someone to take bitcoins as an option so that there is user management for sites like yours that don't have custom development time available.

                  Comment

                  • Vapid - BANNED FOR LIFE
                    Barterer
                    • Aug 2004
                    • 4864

                    #10
                    Rpc + Json.

                    Comment

                    • BFT3K
                      Too lazy to set a custom title
                      • Dec 2005
                      • 10764

                      #11
                      Originally posted by DWB
                      You can start by doing it manually if you're trying to get up and running quickly and don't know how to have it post back. Once you get confirmation of the transaction, you can send them user/pass.

                      When you create a check out page / invoice, you can add user fields like email, username, password, and so on. All of that comes to you.
                      Sure, but doing it manually will not provide realtime access, that's all I'm saying. The bitcoin customer needs to be aware of this, or they will not be happy.

                      It looks like coinbase.com may be working on the issue, but it's not ready yet (see below):

                      Last edited by BFT3K; 04-18-2013, 02:10 PM.

                      Comment

                      • woj
                        <&(©¿©)&>
                        • Jul 2002
                        • 47882

                        #12
                        If anyone needs it setup, I can set it up for a few bucks, icq: 33375924 or email me at woj#at#wojfun#.#com to discuss details
                        Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
                        Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
                        Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

                        Comment

                        • NYMD
                          Registered User
                          • Apr 2013
                          • 26

                          #13
                          It sounds like subscription means a type of recurring payment not necessarily that they will be handling your user management. Obviously they can't "deduct" from a user's btc wallet so I'm assuming it will just be an email blast to renew their subscription before it expires.

                          edit: I could be wrong and subscription could very well mean user management

                          Comment

                          • BFT3K
                            Too lazy to set a custom title
                            • Dec 2005
                            • 10764

                            #14
                            Originally posted by woj
                            If anyone needs it setup, I can set it up for a few bucks, icq: 33375924 or email me at woj#at#wojfun#.#com to discuss details
                            Good to know. Looks like a great opportunity for a new script for you to make and sell!

                            Originally posted by NYMD
                            It sounds like subscription means a type of recurring payment not necessarily that they will be handling your user management. Obviously they can't "deduct" from a user's btc wallet so I'm assuming it will just be an email blast to renew their subscription before it expires.

                            edit: I could be wrong and subscription could very well mean user management
                            Yeah, I guess it could go either way.

                            Any coinbase.com people here on GFY yet?

                            Comment

                            • DWB
                              Registered User
                              • Jul 2003
                              • 31779

                              #15
                              Originally posted by BFT3K
                              Sure, but doing it manually will not provide realtime access, that's all I'm saying. The bitcoin customer needs to be aware of this, or they will not be happy.
                              If you don't have 24 hours support, then you are correct. WOJ just posted above that he can set it up, so there ya go.

                              For what it's worth, I've seen a handful of porn sites using bitcoin that do mention they have to manually add the user. Growing pains right now, but it will all get worked out really quick I'm sure.

                              Comment

                              • AmeliaG
                                Too lazy to set a custom title
                                • Jan 2003
                                • 10663

                                #16
                                We are beta-testing a gateway for this. Please drop us a line via the contact form at SpookyCash if you are interested in licensing once we finish the beta.
                                GFY Hall of Famer

                                AltStar Hall of Famer




                                Blue Blood's SpookyCash.com

                                Babe photography portfolio

                                Comment

                                • BFT3K
                                  Too lazy to set a custom title
                                  • Dec 2005
                                  • 10764

                                  #17
                                  Any benefits or pitfalls between accepting Bitcoins via BitPay.com vs CoinBase.com?

                                  Comment

                                  • Jel
                                    Confirmed User
                                    • Feb 2007
                                    • 6904

                                    #18
                                    Originally posted by AmeliaG
                                    We are beta-testing a gateway for this. Please drop us a line via the contact form at SpookyCash if you are interested in licensing once we finish the beta.
                                    done

                                    Comment

                                    • NYMD
                                      Registered User
                                      • Apr 2013
                                      • 26

                                      #19
                                      Originally posted by BFT3K
                                      Any benefits or pitfalls between accepting Bitcoins via BitPay.com vs CoinBase.com?
                                      Coinbase's API is currently more developed. BitPay is a bit simpler to get integrated. I don't know how the admin panel compares. Coinbase offers a wallet system for end users and tries to help people get bitcoins but BitPay is currently just a payment processor. Both are young companies and still having a few growing pains if you google around.

                                      Comment

                                      • BFT3K
                                        Too lazy to set a custom title
                                        • Dec 2005
                                        • 10764

                                        #20
                                        Originally posted by NYMD
                                        Coinbase's API is currently more developed. BitPay is a bit simpler to get integrated. I don't know how the admin panel compares. Coinbase offers a wallet system for end users and tries to help people get bitcoins but BitPay is currently just a payment processor. Both are young companies and still having a few growing pains if you google around.
                                        Cool, thanks. Do both process globally. I saw somewhere that Coinbase was US only, but I could be wrong. I have to go back and check...

                                        Comment

                                        • NYMD
                                          Registered User
                                          • Apr 2013
                                          • 26

                                          #21
                                          Originally posted by BFT3K
                                          Cool, thanks. Do both process globally. I saw somewhere that Coinbase was US only, but I could be wrong. I have to go back and check...
                                          Given some of the comments on how unstable coinbase's software is at this early stage, I'm appreciating the simplicity of BitPay's API right now... www-dot-reddit-dot-com/r/Bitcoin/comments/1cppem/coinbase_are_good_people_my_tale_of_customer/ and www-dot-reddit-dot-com/r/Bitcoin/comments/1coz10/warning_coinbasecom_is_having_major_problems_keep/
                                          Last edited by NYMD; 04-20-2013, 04:36 AM.

                                          Comment

                                          • Joshua G
                                            dumb libs love censorship
                                            • Jul 2008
                                            • 8198

                                            #22
                                            it would be such an advancement, to get away from all the payment processing bullshit of the current deal. no more needing visa to approve what you produce. no more 15% processing fees. no more annual assrape fees for nothing. no more chargeback bullshit from users.

                                            would be great to see the industry & also customers shift from visa to bitcoin to move that money!

                                            Comment

                                            • adultmobile
                                              No, I am not banned
                                              • Nov 2003
                                              • 5345

                                              #23
                                              Originally posted by JoshGirls Josh
                                              no more needing visa to approve what you produce. no more 15% processing fees.
                                              In fact I would suggest to run bitcoins (bitcoind) on your server and no need bitpay or coinbase or any third party processor or company. Opensource php libs in github:

                                              https://github.com/search?l=PHP&q=bi...e=Repositories
                                              https://github.com/search?l=PHP&q=mt...e=Repositories
                                              https://github.com/search?l=PHP&q=bt...e=Repositories

                                              Epoch-like or CCBILL-like companies are not really a need there. Any average php guy can use free scripts over your bitcoin demon running in your server, check mtgox + btc-e for price every 15 minutes and so on.

                                              Just I think the real issue is exchange BTC<->USD. Time to time those exchanges BTC<->USD will have bank accounts frozen and perhaps money you have there lost all or in part. Someone remembers webmasterchecks issue? They was (and still are) fully compliant, honest and ok... but because just 1 their accounts used wmc for gambling (without wmc knowledge, and against wmc TOS), this 1 account holder was busted... prosecutor does his job, then all wmc accounts had been frozen (with bank account) for many months, even if those wmc account holders had nothing to do with gambling or illegal - it was very boring event, and of course adult/porn companies are NOT helped by anyone in these cases, we are an hated and lower rights cathegory. Now compare: always there will be "at least one" who use mtgox, btc-e or else money exchange system for bad stuff (let's say .. a lot) and when busted, prosecutor can freeze a whole bank of generic exchanges, so your money is frozen for year(s) or lost. It is much like you host your legal site in same server of illegal stuff, and the server is seized and offline, your're offline too, and perhaps even investigated.

                                              Example from this week:

                                              https://bitfloor.com/
                                              2013.04.17 I am sorry to announce that due to circumstances outside of our control BitFloor must cease all trading operations indefinitely. Unfortunately, our US bank account is scheduled to be closed
                                              2013.04.20 The bank has issued us a check for the remaining account balance. The ETA for receiving the check is around 10 days. Until then, we will be unable to make any further payouts. We are exploring various options for returning your funds.

                                              Said so, there is still cool pieces in bitcoin, just I still believe next versions of cryptocurrencies will replace the flawed bitcoins at some point.
                                              Last edited by adultmobile; 04-20-2013, 06:11 AM.

                                              TubeCamGirl.com

                                              Comment

                                              • helterskelter808
                                                So Fucking Banned
                                                • Sep 2010
                                                • 3405

                                                #24
                                                I would suggest banknotes in an aluminum lined envelope.

                                                Comment

                                                • BFT3K
                                                  Too lazy to set a custom title
                                                  • Dec 2005
                                                  • 10764

                                                  #25
                                                  Originally posted by adultmobile
                                                  In fact I would suggest to run bitcoins (bitcoind) on your server and no need bitpay or coinbase or any third party processor or company. Opensource php libs in github:

                                                  https://github.com/search?l=PHP&q=bi...e=Repositories
                                                  https://github.com/search?l=PHP&q=mt...e=Repositories
                                                  https://github.com/search?l=PHP&q=bt...e=Repositories

                                                  Epoch-like or CCBILL-like companies are not really a need there. Any average php guy can use free scripts over your bitcoin demon running in your server, check mtgox + btc-e for price every 15 minutes and so on.

                                                  Just I think the real issue is exchange BTC<->USD. Time to time those exchanges BTC<->USD will have bank accounts frozen and perhaps money you have there lost all or in part. Someone remembers webmasterchecks issue? They was (and still are) fully compliant, honest and ok... but because just 1 their accounts used wmc for gambling (without wmc knowledge, and against wmc TOS), this 1 account holder was busted... prosecutor does his job, then all wmc accounts had been frozen (with bank account) for many months, even if those wmc account holders had nothing to do with gambling or illegal - it was very boring event, and of course adult/porn companies are NOT helped by anyone in these cases, we are an hated and lower rights cathegory. Now compare: always there will be "at least one" who use mtgox, btc-e or else money exchange system for bad stuff (let's say .. a lot) and when busted, prosecutor can freeze a whole bank of generic exchanges, so your money is frozen for year(s) or lost. It is much like you host your legal site in same server of illegal stuff, and the server is seized and offline, your're offline too, and perhaps even investigated.

                                                  Example from this week:

                                                  https://bitfloor.com/
                                                  2013.04.17 I am sorry to announce that due to circumstances outside of our control BitFloor must cease all trading operations indefinitely. Unfortunately, our US bank account is scheduled to be closed
                                                  2013.04.20 The bank has issued us a check for the remaining account balance. The ETA for receiving the check is around 10 days. Until then, we will be unable to make any further payouts. We are exploring various options for returning your funds.

                                                  Said so, there is still cool pieces in bitcoin, just I still believe next versions of cryptocurrencies will replace the flawed bitcoins at some point.
                                                  Lots of good info, thanks.

                                                  I wouldn't personally use my own server to do this, out of numerous fears and concerns, but I may try a site out using CoinBase or BitPay, just to see how it goes.

                                                  The lag time between a surfer wanting to join, and their need to purchase bitcoins to do so (which apparently takes some effort) is a pitfall, as is the currency fluctuation, but it may worth an experiment or two.

                                                  I've written this before, in a few of these threads...

                                                  I am not a gambling man. If I were to ever use bitcoins as a payment option for a site membership, I would never hold any bitcoins in reserve.

                                                  A person pays $10 to $20 in bitcoins, and as soon as humanly possible, I would want that money wired into my account.

                                                  I think coinbase pays out once daily (but I could be wrong). There is always the chance that the exchange goes up or down a bit before you get paid, and that is a risk, but if you cash out on a daily basis the risk is relatively low. Even if the currency crashes 100% the most you would lose is one day of bitcoin join sales, so no big deal.

                                                  I would not trade or horde bitcoins however, as again, I am not a gambling man.

                                                  Comment

                                                  • BFT3K
                                                    Too lazy to set a custom title
                                                    • Dec 2005
                                                    • 10764

                                                    #26
                                                    Originally posted by JoshGirls Josh
                                                    it would be such an advancement, to get away from all the payment processing bullshit of the current deal. no more needing visa to approve what you produce. no more 15% processing fees. no more annual assrape fees for nothing. no more chargeback bullshit from users.

                                                    would be great to see the industry & also customers shift from visa to bitcoin to move that money!
                                                    Yup, but on the downside, at the moment there does not appear to be any logical recurring billing scenario that would make any sense, and I have no idea how you would track or compensate affiliates.

                                                    A great idea for experimental stand-alone sites though... or maybe as a decline-redirect page for people without NATS or multiple biller options.

                                                    There is also the possibility that the whole system gets shut down, should the bankers and governments of the world find it to be too easy for people to conduct business in the shadows, so it's long-term existence is not guaranteed.

                                                    I would cash out daily, just to be safe.
                                                    Last edited by BFT3K; 04-20-2013, 07:49 AM.

                                                    Comment

                                                    • Nathan
                                                      Confirmed User
                                                      • Jul 2003
                                                      • 3108

                                                      #27
                                                      The point about using BitPay is that they can directly convert the bitcoins you charge into USD and they also allow you defining a USD price instead of a bitcoin price. Makes it a bit safer in terms of revenue.

                                                      In general, the systems work just like any other biller BFT3K. I do not see where the confusion is. All these billers work the same way. You pay via Bitcoin, something like BitPay does a postback to your backend, or use use bitcoind to take coins directly and that handles the postback in some shape.

                                                      The bigger problem I see with bitcoins from a tech standpoint that transactions are not INSTANT! They require CONFIRMATION to be safe and permanent. Meaning for you to know they are real transactions, they need multiple confirmations in the blockchain. I am not sure how BitPay handles this, so not sure how it would work.
                                                      "Think about it a little more and you'll agree with me, because you're smart and I'm right."
                                                      - Charlie Munger

                                                      Comment

                                                      • NYMD
                                                        Registered User
                                                        • Apr 2013
                                                        • 26

                                                        #28
                                                        Bitpay advised that with a digital product, we should go with the highest speed transaction not requiring a confirmation. They've not had any transactions not eventually confirm even at the high speed. If I were selling physical goods, I would go with at least 1 node confirm required or their slowest speed, which requires 6.

                                                        Comment

                                                        • adultmobile
                                                          No, I am not banned
                                                          • Nov 2003
                                                          • 5345

                                                          #29
                                                          Originally posted by NYMD
                                                          Bitpay advised that with a digital product, we should go with the highest speed transaction not requiring a confirmation. They've not had any transactions not eventually confirm even at the high speed. If I were selling physical goods, I would go with at least 1 node confirm required or their slowest speed, which requires 6.
                                                          They say for "digital product" is enough wait 1 block confirm (10-15 min), well, that's because they think digital = no cost if lost. But for cam site you have to pay the model, and deposits of $100 to $300 at once are not rare at all. So I would set this to 3 to 6 blocks, perhaps depending on amount. From bitcoin faq:

                                                          * Transactions are broadcasted within seconds and verified (added to next block in blockchain) within 10 to 60 minutes, average 15-20. see: http://bitcoinstats.org/
                                                          * Double Spend: a malicious user tries to spend to two different recipients at the same time. Bitcoin mining + blockchain create a consensus on the network about which of the two transactions will win. This means it can happen you get confirmation on first block but then on second or third block (so after 10 * 2 or 10 * 3 minutes) you see the "other" transaction won, and you're scammed.
                                                          * Confirmation: a transaction has been verified by the network (added in next block of blockchain). Each new confirmation decreases the risk of a reversal exponentially. For larger amounts ( ex. 1000 $USD and above ), wait for more confirmations, for ex: 6. Then 6 blocks or 1 hour is enough to make reversal computationally impractical (no double spend).

                                                          Now if you provide revenue share paid quickly AND accept bitcoins verified at just 1st block added (after just the about 10 minutes), some smart one could do double spend to you AND him, and have part of his sales going to HIM after you accounted his revshare. Of course you system should be very retard not to doublecheck after 1st block chain for double spend case AND alert you AND blacklist the affiliate - but most systems are very retard after all.
                                                          Last edited by adultmobile; 04-20-2013, 11:21 AM.

                                                          TubeCamGirl.com

                                                          Comment

                                                          • Jel
                                                            Confirmed User
                                                            • Feb 2007
                                                            • 6904

                                                            #30
                                                            the real fun and games are going to start when mr pirate rips your site, and sets up bitcoin billing.

                                                            atm you go to bitpay, create merchant account, and pretty much that's it. enter your pricing, a bank account to transfer to, and you're set up as far as any checking goes - there pretty much isn't any.

                                                            Comment

                                                            • borked
                                                              Totally Borked
                                                              • Feb 2005
                                                              • 6284

                                                              #31
                                                              Originally posted by adultmobile
                                                              They say for "digital product" is enough wait 1 block confirm (10-15 min), well, that's because they think digital = no cost if lost. But for cam site you have to pay the model, and deposits of $100 to $300 at once are not rare at all. So I would set this to 3 to 6 blocks, perhaps depending on amount. From bitcoin faq:

                                                              * Transactions are broadcasted within seconds and verified (added to next block in blockchain) within 10 to 60 minutes, average 15-20. see: http://bitcoinstats.org/
                                                              * Double Spend: a malicious user tries to spend to two different recipients at the same time. Bitcoin mining + blockchain create a consensus on the network about which of the two transactions will win. This means it can happen you get confirmation on first block but then on second or third block (so after 10 * 2 or 10 * 3 minutes) you see the "other" transaction won, and you're scammed.
                                                              * Confirmation: a transaction has been verified by the network (added in next block of blockchain). Each new confirmation decreases the risk of a reversal exponentially. For larger amounts ( ex. 1000 $USD and above ), wait for more confirmations, for ex: 6. Then 6 blocks or 1 hour is enough to make reversal computationally impractical (no double spend).

                                                              Now if you provide revenue share paid quickly AND accept bitcoins verified at just 1st block added (after just the about 10 minutes), some smart one could do double spend to you AND him, and have part of his sales going to HIM after you accounted his revshare. Of course you system should be very retard not to doublecheck after 1st block chain for double spend case AND alert you AND blacklist the affiliate - but most systems are very retard after all.
                                                              great informational post

                                                              For coding work - hit me up on andy // borkedcoder // com
                                                              (consider figuring out the email as test #1)



                                                              All models are wrong, but some are useful. George E.P. Box. p202

                                                              Comment

                                                              • BFT3K
                                                                Too lazy to set a custom title
                                                                • Dec 2005
                                                                • 10764

                                                                #32

                                                                Comment

                                                                • adultmobile
                                                                  No, I am not banned
                                                                  • Nov 2003
                                                                  • 5345

                                                                  #33

                                                                  TubeCamGirl.com

                                                                  Comment

                                                                  Working...