Added standard payment processing for Stripe BOD-146.

This commit is contained in:
Patrick Fic
2020-06-16 08:54:58 -07:00
parent 05bf94e808
commit ef81991046
25 changed files with 599 additions and 84 deletions

View File

@@ -16,27 +16,13 @@ exports.payment = async (req, res) => {
console.log("exports.payment -> amount", amount);
console.log("exports.payment -> stripe_acct_id", stripe_acct_id);
try {
const pr = await stripe.paymentRequest.create({
country: "CA",
currency: "cad",
total: {
label: "Demo total",
amount: 1099,
},
requestPayerName: true,
requestPayerEmail: true,
});
console.log(pr);
await stripe.paymentIntents
.create(
{
payment_method_types: ["card"],
amount: amount,
currency: "cad",
application_fee_amount: 100,
application_fee_amount: 50,
},
{
stripeAccount: stripe_acct_id,