小编Vla*_*lad的帖子

Stripe PaymentIntents + 订阅

有人知道如何使用新的 PaymentsIntent SCA 方法使 Stripe 订阅在未来的付款时自动从卡中扣费吗?

Stripe 的文档需要进行重大修改。我从来没有见过像这些这样复杂和令人困惑的文档。

令人困惑的部分之一是他们在 PaymentsIntents 文档中所说的内容:

confirmation_method:

automatic
(Default) PaymentIntent can be confirmed using a publishable key. After next_actions are handled, no additional confirmation is required to complete the payment.

manual
All payment attempts must be made using a secret key. The PaymentIntent returns to the requires_confirmation state after handling next_actions, and requires your server to initiate each payment attempt with an explicit confirmation.
Run Code Online (Sandbox Code Playgroud)

如果我设置为自动,handleCardAction 将不再在前端工作。如果必须是手动的,这是否意味着所有未来的定期付款(例如第 2、3 个月等)都需要用户进行某种 SCA 确认?

我还没有找到任何 SCA 的付款意图和订阅的元素示例,以及未在后端预先设置的不同计划和价格,因为它们取决于每个人的参数。

如果我使用手动和handleCardAction,尽管付款正在进行,但订阅仍然不完整。如果我使用confirmCardPayment,SCA 弹出窗口永远不会显示。 …

stripe-payments

5
推荐指数
1
解决办法
3001
查看次数

SetOptions 在 Firestore Flutter WEB 中不起作用

查看 Flutter Web。似乎 Firestore Flutter Web 集成还没有完全实现。试图传递 {merge: true} 参数:

webFirestore
    .collection("/users")
    .doc(uid)
    .set(map, {merge: true});
Run Code Online (Sandbox Code Playgroud)

{merge: true} 下划线为红线。尝试了不同的格式,都不起作用。有谁知道语法需要看起来像什么?

这就是 firestore 文档所说的:

/// An object to configure the [WriteBatch.set] behavior.
/// Pass [: {merge: true} :] to only replace the values specified in
/// the data argument. Fields omitted will remain untouched.
@anonymous
@JS()
abstract class SetOptions {
  /// Set to true to replace only the values from the new data.
  /// Fields omitted will remain untouched.
  external bool get …
Run Code Online (Sandbox Code Playgroud)

flutter google-cloud-firestore flutter-web

2
推荐指数
1
解决办法
1375
查看次数