首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >paypal交易历史记录创建额外的经常性付款

paypal交易历史记录创建额外的经常性付款
EN

Stack Overflow用户
提问于 2013-05-10 07:58:40
回答 1查看 111关注 0票数 0

我使用的是paypal重复使用的gem:

https://github.com/fnando/paypal-recurring

对于ruby on rails应用程序

下面是我的代码中的一部分:

代码语言:javascript
复制
 def make_recurring

    process :request_payment

    if @plan
      create_units
      process :create_recurring_profile, period: @plan.recurring, amount: (@plan.price), frequency: 1, start_at: Time.zone.now        
    end
  end


 def process(action, options={})
    not_recurring_amount =  @cart.total_price  
    not_recurring_amount += 19.95 if @plan #add activation price for first payment

    options = options.reverse_merge(
      token: @order.paypal_payment_token,
      payer_id: @order.paypal_customer_token,
      description: "Your product total is below",
      amount: not_recurring_amount.round(2),
      currency: "USD"
    )

    response = PayPal::Recurring.new(options).send(action)
    raise response.errors.inspect if response.errors.present?
    response
  end

从本质上讲,用户购买产品后收取239.95的费用。然后,用户购买具有一次性激活的产品计划,并收取33.95的费用。这些都是一次性付款。然后,当他们购买该套餐时,他们还需要为该通话时间套餐收取14.95的重复月费。一切似乎都正常,但我注意到在我的paypal沙箱账户中,另一个重复收费是空白的:

为什么会发生这种空白电荷?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-05-10 21:11:39

这不是一个实际的费用,它只是一个正在创建的个人资料的记录。您必须先创建配置文件,然后才能对其进行收费。正如您所看到的,这反映在PayPal帐户中。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16473088

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档