Blog / Software Development

Some tips with integrating Stripe with a subscription-based Django application

August 12, 2013

I just finished integrating Stripe with a subscription-based Django application a few weeks ago for processing credit card payments. This was the first time I've used this service and found the Stripe API and documentation to be very well written. Below are some things I learned while working on this project.

Avoid storing any credit card data in your database if you can for Payment Card Industry (PCI) compliance

One of the main reasons to …

How to share your local web server to the Internet using a reverse SSH tunnel

July 25, 2013

I was recently working with integrating Stripe payments with a Django app. Since it's a subscription-based web application, it made a lot of sense for us to use webhooks, which Stripe supports. You basically set a URL in your Stripe account settings where Stripe could POST when an event occurs (eg. trial ends, subscription canceled due to an unpaid invoice, etc.). This eliminates the need of having to poll the Stripe server to check …

How to submit a form in a POST request using JavaScript

April 16, 2013

I was working on a Django project a couple of days ago where I needed to use JavaScript to submit a form in a POST request. The response of this request is a PDF file generated with ReportLab. I wanted the browser to prompt the user to download the file or open it in the browser in another window.

I was trying to do this with AJAX at first, but apparently you’re not really supposed …

Getting started with virtualenv on Ubuntu 12.04

April 1, 2013

virtualenv is one of those tools that every Python developer should use. It lets you create isolated Python environments for your projects so you can try out different versions of packages/libraries the applications use on the same machine.

You could do something similar using virtualization software such as VMware or VirtualBox, but they take up more resources and take longer to set up. With virtualenv, you can set up these isolated environments in seconds! …

Error Message: “Failed to create the SD card” when creating a new AVD on Ubuntu 12.04

December 2, 2012

Error Message:

Failed to create the SD card.

Failed to create sdcard in the AVD folder.

Just ran into this issue while I was setting up my Android development environment on my new laptop running Ubuntu Linux 12.04. I’m currently using the 64-bit build and it turned out that the ia32-libs package is not installed by default.

Installing this package fixes the issue:

sudo apt-get install ia32-libs