Rails payola gem没有得到stripeToken

时间:2018-06-07 01:00:12

标签: ruby-on-rails ruby email payola

检查PayolaSuscriptions表时出现错误:

stripeToken required for new customer with paid subscription

条带日志也不会显示任何请求。

我的控制器:

class SubscriptionsController < ApplicationController
  # bring in the `render_payola_status` helper.
include Payola::StatusBehavior

def new


    @plan = SubscriptionPlan.first
  end

  def create
    # do any required setup here, including finding or creating the owner object
    owner = current_user # this is just an example for Devise

    # set your plan in the params hash
    params[:plan] = SubscriptionPlan.find_by(id: params[:plan_id])
    p params[:plan]

    # call Payola::CreateSubscription
    subscription = Payola::CreateSubscription.call(params, owner)
    p subscription

    # Render the status json that Payola's javascript expects
    render_payola_status(subscription)

 end

end

它究竟是如何运作的? payola采用params形式并将其传递给Stripe?在这种情况下,它似乎没有传递给条纹?另外,我没有从payola得到很多日志,所以我很难解读我的错误原因。

正在运行的活动作业。并且在成功运行活动作业之后会显示错误,直到数据库处于挂起状态。

0 个答案:

没有答案