我尝试过不同的方式通过没有web钩子流来处理付款,但是唯一的解决方案是从我的dart代码中直接调用stripe,如下所示:
var response = await http.post(
Uri.parse('https://api.stripe.com/v1/payment_intents'),
body: {
'amount': _calculateAmount(amount),
'currency': currency,
'payment_method_types[]': 'card',
'description': description,
'receipt_email': email,
},
headers: {
'Authorization': 'Bearer ${AppConfig.instance.stripeSecretKey}',
'Content-Type': 'application/x-www-form-urlencoded'
},
);我的代码是否仍然符合PCI标准,并在生产中得到了适当的保护?
发布于 2022-05-30 02:56:35
您的代码仍然兼容PCI,但不安全。密钥必须安全地存储在您的web或移动应用程序的服务器端代码中(例如在环境变量或凭据管理系统中)。从Dart打来的电话意味着你是在向全世界展示你的证件。这是用条纹医生解释的
https://stackoverflow.com/questions/72427726
复制相似问题