node.js - Angular/node.js Stripe Checkout 集成(1 个账户,方便第三方付款人向第三方收款人付款)
问题描述
伙计,我已经有几天了,找不到一个好的解决方案。我想使用我的帐户(通过公钥和私钥)来促进从一个帐户到另一个帐户的付款(没有任何东西会进入我的帐户)。在前端我有:
checkout(amount) {
const strikeCheckout = (<any>window).StripeCheckout.configure({
key: environment.PRODUCTION==='true'?stripeLiveClientId:stripeTestClientId,
locale: 'auto',
token: (stripeToken: any) => {
if(stripeToken){
console.log(stripeToken)
this.createCharge(stripeToken,amount)
}
}
});
strikeCheckout.open({
name: 'Camel Stripe',
description: 'Stripe Checkout',
amount: amount
});
}
只是一个小片段,但本质上这只是捕获信用卡和电子邮件,并确保它是一张有效的信用卡,然后制作一个条带令牌。然后我将此令牌传递给节点后端并执行以下操作:
stripe.paymentIntents.create({
amount: priceInPence,
currency: 'usd',
source: stripeTokenId,
capture: false, // note that capture: false
}).then(charge => {
return res.json({ success: true, message: 'Success', result: charge })
}).catch(error => {
res.status(400).json({ success: false, status: 400, message: error });
});
//})
};
无论我如何构建它,它总是最终将付款发送到我的帐户,即具有公钥/私钥的帐户。有谁知道我可以使用这个令牌的方法,因为它有必要的信息,并将钱汇到另一个账户?
解决方案
除非您使用Connect ,否则您无法接受付款并将资金转移到完全不同的 Stripe 帐户中。
推荐阅读
- python - 在 manim 中异步运行不同的动画
- kubernetes - 在 GKE 控制台中注册集群时出错
- python - 使用烧瓶登录外部网站
- javascript - Core-JS 3 Babel 导致 mini-css-extract-plugin 错误
- mongodb - 如何根据取决于输入的算术表达式过滤 mongodb 中的结果?
- php - 如何创建一个可以在 Laravel 7 中的所有其他控制器中调用的方法
- python - 通过从列表中引入值来创建类对象
- vue.js - 具有嵌套 v-loop 的动态 v-model
- android - Parcelable 替换字段对象的值?
- xml - 供应商的 Prestashop 网络服务问题