-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
46 lines (28 loc) · 1.16 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
This is a framework I am working on for Node.js based ecommerce
Please be patient I am new to Node and it may take me a bit to get everything 100%
Example
A full integration example can be found here... https://simplecart-jgleason.rhcloud.com. Please remember this is in development
Paypal Integration
var paypal = require('bullettrain').use('paypal');
exports.addApp = function(appServer){
app = appServer;
paypal.setApp(app)
}
exports.setExpressCheckout = function(req, res){
paypal.setExpressCheckout(req,res);
}
exports.getCheckoutDetails = function(req, res, next){
paypal.getCheckoutDetails(req,res,next)
}
exports.finalizePayment = function(req, res){
paypal.finalizePayment(req,res)
}
Mongo/RESTi(ish) Integration
bullet = require('./lib/bullettrain').useRest('mongo')
app.post('/rest/catalogentries', bullet.postCatalogEntry,routes.goHome);
Google OAuth v2 (With ExpressJS)
google = require('bullettrain').useInterface('google')
google.setClientId(GOOGLE_CLIENT_ID)
google.setClientSecret(GOOGLE_CLIENT_SECRET)
app.get('/auth/google', google.requestCode)
app.get('/auth/google/callback', google.callbackHandler, google.getUserInformation, routes.goHome)