Stripe and titanium mobile


How can I intergrate the stripe api for payment processing to allow people to pay for services through my titanium mobile app.

I am using this code to start:

How can I make sure the information is encrypted.

First you need to make sure what you are selling is physically tenable, assuming it is (and your not selling any form of digital content, or functionality within the app) then the easiest way to use stripe from within Titanium would be to just wrap it in a web view (you could implement it in native code but this could get tiresome).

Assuming you have this example in a file called index.html in your resources directory.

var webView = Ti.UI.createWebView({
    url : 'index.html    

Note that you will need to let your server support https requests for actual encryption to happen, you shouldn't be encrypting yourself (in code).

Once this is done, all the work now happens on your server to process payments using Stripes libraries like in this example in the documentation.

Really this is a server job, all your doing is sending the server the information to process, not a lot going on with Titanium here except as a gateway.

This video can help you solving your question :)
By: admin