【问题标题】:Using Stripe and Parse APIs - how can I tell if the Current Parse User has an active subscription with Stripe?使用 Stripe 和 Parse API - 如何判断当前 Parse 用户是否拥有 Stripe 订阅?
【发布时间】:2015-05-05 22:29:59
【问题描述】:

在我的代码中,我可以判断当前用户是否创建了一个帐户

$(document).ready(function(){
  //keeps a user logged in
  var currentUser = Parse.User.current();

Stripe 客户对象有一个 status:active 键值对,我想检查它以确定条带客户是否有活动订阅。 (https://stripe.com/docs/api#list_subscriptions)

有谁知道我如何让 Parse 和 Stripe 相互通信,以便在代码检查用户是否登录时,它还会检查用户是否订阅了 Stripe?

【问题讨论】:

  • 整天都在想办法解决这个问题!

标签: parse-platform stripe-payments


【解决方案1】:

原来有办法做到这一点 这是 nodejs 中的示例:

let stripeSub = await stripe.subscriptions.list({customer: customerId});

【讨论】:

    猜你喜欢
    • 2015-07-26
    • 2015-12-24
    • 1970-01-01
    • 1970-01-01
    • 2016-11-12
    • 2017-07-03
    • 2017-02-01
    • 2016-04-17
    • 2015-04-29
    相关资源
    最近更新 更多