var express = require('express'),
    app = express(),
    kaching = require('kaching');

app.set('views', __dirname);
app.set('view engine', 'jade');

app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(express.cookieParser());
app.use(express.session({ secret: 'secret' }));
app.use(kaching.initialize());

app.get('/', function(req, res) {
  res.render('index');
});

app.get('/kaching/paypal', function(req, res, next) {
  next();
}, kaching.create('paypal'));

app.listen(3000);

@@ -48,16 +48,64 @@
 ress(),%0A
+    PaypalStrategy = require('kaching-paypal'),%0A
     kach
@@ -189,24 +189,292 @@
 , 'jade');%0A%0A
+/**%0A * Test account: kaching@gmail.com%0A * Password: kachingtest%0A */%0Akaching.use(new PaypalStrategy(%7B%0A  'client_id': 'AVNKWRCWeT5AB6KEzKD28qyLwAl5rGi8vt3jtWpZtx--ybYDUjFivZd3EP9-',%0A  'client_secret': 'EAiZrRC51hz6ixu7On34zHnAFYB6jgZfVoBoz15aWei3nvM1MSDidZaT1GF0'%0A%7D));%0A%0A
 app.use(expr
@@ -794,43 +794,852 @@
 %7B%0A  
-next();%0A%7D, kaching.create('paypal')
+// Construct payment detail in %60req.payment%60%0A  req.payment = %7B%0A    // Payment amount, with optional details%0A    amount:%7B%0A      total:'7.47',%0A      currency:'USD',%0A      details: %7B%0A        shipping: '1.00',%0A        subtotal: '6.00',%0A        tax: '0.47'%0A      %7D%0A    %7D,%0A    // Item list, optional%0A    item_list: %7B%0A      items: %5B%0A        %7B name: 'Product', price: '3', quantity: '2', currency: 'USD' %7D%0A      %5D%0A    %7D,%0A    // Payment transaction description%0A    description:'Kaching paypal test transaction'%0A  %7D;%0A  // Proceed to next step%0A  next();%0A%7D, kaching.create('paypal', %7B%0A  // Redirect URL is required for paypal payment.%0A  redirect_urls: %7B%0A    return_url: 'http://localhost:3000/kaching/paypal/return',%0A    cancel_url: 'http://localhost:3000/kaching/paypal/cancel'%0A  %7D%0A%7D));%0A%0Aapp.get('/session', function(req, res) %7B%0A  res.json(req.session);%0A%7D
 );%0A%0A

Use paypal strategy for testing.