Backend for database, processing payments, and serving files?

Discussion in 'Mac Programming' started by ArtOfWarfare, Jan 29, 2016.

  1. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #1
    I'm working on a Python app that I want to have downloadable content.

    Some of the downloadable content will be free. Some will cost money.

    I'll need a database of my users and products and who has paid for what.

    I'd like to use some service that rolls this altogether. I'd like it if the cost was nothing to me, but they just took a percentage of the money I charge for the paid downloads (they'd serve the free downloads for free.)

    I'd like to keep the store in my own app, meaning it needs to either have a Python wrapper or a REST or SOAP API or something - I don't want to have to send my users to their website or something.

    Does anyone know of a service like this? I know I could write the whole server process myself and just rent VMs from Amazon or SoftLayer or something, but I'm hoping for something prebuilt/faster/easier, so I can get on to the parts of my app that are unique/new and not reinvent yet another online store thing.
     
  2. whooleytoo macrumors 603

    whooleytoo

    Joined:
    Aug 2, 2002
    Location:
    Cork, Ireland.
    #2
    Possibly Firebase is close to your needs? I did some basic prototyping with it before and it seemed quite easy to use. There is also a 3rd party Python interface, python-firebase; I haven't used that so can't comment on it.

    Firebase
    python-firebase

    I think the low-end hosting is free, scaling up based on traffic.
     
  3. ArtOfWarfare thread starter macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #3
    I see that they allow me to host files on their service, but it looks like all of the files hosted through them are publicly accessible to anyone.

    I've emailed them asking if it's possible to have private files which only authenticated users can access.
     
  4. Ap0ks macrumors 6502

    Joined:
    Aug 12, 2008
    Location:
    Cambridge, UK
    #4
    Sending users to another site, like PayPal or something will prevent you from having to be PCI compliant, if you're dead-set on keeping users on your site you'll want to look at something like Stripe or Braintree to process the payments via iframes & javascript to keep the PCI requirements low.

    Bandwidth still costs money, so even if your downloads are free to customers you'll still have to pay for the bandwidth used, one service you might want to check out is https://www.sendowl.com, pricing per month will depend on the number of products and file sizes. Also you need to consider you payment processor, they're going to take at least 2-3% of any money you make (for low volume sellers) in fees.
     
  5. ArtOfWarfare thread starter macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #5
    I don't want to expose the file to the user. I'd like to process their payment and download to a hidden directory.
    I want to avoid having anything that looks like a way of avoiding paying or helping others to avoid paying.
     
  6. Ap0ks macrumors 6502

    Joined:
    Aug 12, 2008
    Location:
    Cambridge, UK
    #6
    Think we need a bit more clarification on what it is you're actually trying to achieve...

    So this is a desktop app, written in Python? How does the additional content tie into your app? Does it add additional functionality or features to the app and is it a one time purchase? Are people paying for the app itself, or is it free with paid content? Simply downloading the file to a hidden folder isn't going to prevent people paying for content.

    In all honesty I think this is something you're going to have to roll your own for, the use case is so specific that I doubt there are any platforms that could cater to this exact need. As to how much you'll have to do yourself really depends on how the app and it's content is going to work.
     
  7. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #7
    Or consider In-App Purchases using the Mac App Store.

    This may not be practical, or maybe it's an implied constraint because the app is in Python. Embedding Python might be an option.

    Google search terms: python in-app purchase mac app store

    A couple top results:
    http://dafoster.net/articles/2014/06/24/submitting-a-python-app-to-the-mac-app-store/
    https://github.com/davidfstr/Python-in-Mac-App-Store
     
  8. ArtOfWarfare thread starter macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #8
    The app is a free download. It comes with some free content bundles and you may pay for additional content bundles. The content bundles include audio, visuals, and additional Python scripts.

    It might be easiest to think of it as a game with additional levels you can download (might not be far off - I am trying to gamify the entire app.)
     

Share This Page