Skip to content

RavindraChherke/Stripe-module-for-Appcelerator-Titanium-iOS-and-Android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Stripe module for Appcelerator Titanium iOS and Android

Version 3

Check releases

iOS Module Documentation for version 3

Stripe Documentation

Version 1

Check releases

#Example

//require the module
var stripe = require('com.ravindra.stripe');

//set card information using setCard method

var value = stripe.setCard({
	publishableKey : "pk_test_6pRNASCoBOKtIshFeQd4XMUh",
	cardNumber:"4242424242424242",
	month : 12,
	expiryYear : 2019,
	cvc : "123"
});


//request for token from stripe 
stripe.requestForToken({
	success : success,
	failure : failure
});

//On successful receive of token
function success(e) {
	alert("Toke received from Stripe: " + e.token);
}

//On failure 
function failure(e) {
	alert("Error: " + e.error);
}