Created
November 7, 2014 18:47
-
-
Save digilord/7a68d190fab2524ca1ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Test this route with | |
// curl -F test=testing http://localhost:3000/stripeaccess/ | |
Router.route('stripeaccess',{ | |
path:'/stripeaccess', | |
where: 'server', | |
action: function(){ | |
var request = this.request; // From the client | |
var response = this.response; // Response to the client | |
// 1. receive the JSON from Stripe | |
var stripeData = request.body; | |
console.log('stripeData: ', stripeData) | |
// 2. Send that JSON to a server method | |
Meteor.call('processStripe', stripeData); | |
// 3. Profit (Literally :-P ) | |
// Stripe required end of reciept. | |
response.writeHead(200) | |
response.end() | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment