Skip to content

Commit

Permalink
Add emailAddress to createNewCustomer function
Browse files Browse the repository at this point in the history
Relates #25 #68 #85
  • Loading branch information
joeylouise committed May 11, 2017
1 parent 16f59aa commit 3a86271
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/createNewCustomer.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
const stripe = require('stripe')('sk_test_5vjln3z3FwdABvb229LkatOa');

const createNewCustomer = (stripeToken, callback) => {
const createNewCustomer = (emailAddress, stripeToken, callback) => {
stripe.customers.create({
email: '[email protected]',
email: emailAddress,
source: stripeToken,
}, (err, customer) => {
if (err) {
callback(err);
} else {
callback(null, customer.id);
}
})
}
});
};

module.exports = createNewCustomer;

0 comments on commit 3a86271

Please sign in to comment.