【发布时间】:2021-07-27 05:38:42
【问题描述】:
我一直在使用 typescript 在我的应用程序中实现条带化,并且具有以下功能:
exports.deleteStripeCustomer = functions.https.onCall((data, context) => {
const deleted = await stripe.customers.del(
"I need to add the customers ID here"
);
});
在我需要添加客户 ID 的那个字符串中,我想从我已经在侦听该 ID 的 swift 代码中添加客户 ID,并在调用它时将其添加到函数中。
很快,这将是这样完成的:
func sayHello(name: string) {
print("hello \(name)")
}
然后当函数被调用时,id 从其他地方传入,如下所示:
sayHello(name: usersName)
知道这是如何在 typescript 中完成的吗?
在此先感谢,感谢您的帮助!
【问题讨论】:
标签: node.js swift typescript stripe-payments