working hard coded one time payment to one org

This commit is contained in:
Arjun Patel
2019-03-06 03:42:50 -08:00
parent bc0e2bd0fd
commit 0a1ce8ee5f
2 changed files with 6 additions and 8 deletions
@@ -43,7 +43,6 @@ exports.create = (req, res, next) => {
// grant,
// message: 'Grant Created'
// });
console.log(grants);
next(grants.dataValues);
return null;
+6 -7
View File
@@ -10,7 +10,7 @@ exports.grantCharge = async (grant, req, res, next) => {
const { stripeToken, monthly } = req.body;
const grant_id = await grant.id;
const amount = req.body.amount * 100; //stripe standards
const amount = 100 * 100; //stripe standards
const user = req.user;
const product_id = 'prod_ER3jOog6QMX1GP',
@@ -42,15 +42,14 @@ exports.grantCharge = async (grant, req, res, next) => {
currency: 'usd',
source: 'tok_visa',
description: 'One time payment for grant',
statement_descriptor: 'one-time-grant',
transfer_group: 'Grant ' + grant_id
statement_descriptor: 'one-time-grant'
});
let transfers = stripe.transfers.create({
amount: 7000,
await stripe.transfers.create({
amount: amount - 1000,
currency: 'usd',
destination: '{CONNECTED_STRIPE_ACCOUNT_ID}',
transfer_group: '{ORDER10}'
source_transaction: charge.id,
destination: 'acct_1EAxzUIVW1uo07uH'
});
await Charge.create({