Git Product home page Git Product logo

stripe.cfc's Introduction

Stripe.cfc is a ColdFusion api binding for http://stripe.com.

This project is a complete web application and expects to live in its own webroot. To use Stripe.cfc
in your own web application, you can copy the stripe folder to your webroot or create a mapping to it.
Basic usage is like:

    stripe = createObject("component", "stripe.Stripe").init(secretKey=application.stripeSecretKey);										
    money = stripe.createMoney(rc.amount*100);					
    stripeResponse = stripe.createCharge(money=money,card=rc.stripeToken,description="testing with the Stripe.cfc");
    			
	//check the response and handle it as needed
	if (stripeResponse.getSuccess())
	{
		//handle the success, you may want to update the database and redirect to a confirmation
		id = stripeResponse.getResult().id; //get the id of the transaction out of the response
	}
	else
	{
		//handle the failure, you may want to send a notification email or log it										
	}

Implements all the functions of the Stripe API:
Charges, Customers, Plans, Coupons, Subscriptions, Invoice Items, Invoices, and Tokens

Supported CFML engines: ColdFusion 9.0.1 or Railo 3.3.1

Support: http://groups.google.com/group/stripecfc/
	
FW/1 (https://github.com/seancorfield/fw1) is the framework used for this web application
but that is not required to use Stripe.cfc in your own application. 			


Changes:
12/15/2011 - 1.0.4, add missing optional parameters for createCustomer()
12/01/2011 - 1.0.3, add Card.cfc, add support for functions that optionally take a Card object, i.e. createCustomer()
			 update methods that take ammount/currency to take Money object, to be consist with createCharge() 
11/29/2011 - 1.0.2,Response.errorCode
11/29/2011 - 1.0.1,changes to Response.getRawResponse() to .getResult(), use a common view for errors, handle 400,404 status codes			

stripe.cfc's People

Contributors

philcruz avatar

Watchers

Clayton Reeves avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.