paypal 交易历史记录创建额外的定期付款 [英] paypal transaction history creates an extra recurring payment

查看:54
本文介绍了paypal 交易历史记录创建额外的定期付款的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 paypal 定期宝石:

I'm using the paypal recurring gem:

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

用于 ruby​​ on rails 应用程序

for a ruby on rails application

这是我的代码的选定部分:

Here's a selected portion of my code:

 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 的每月定期费用.一切似乎都正常,但我注意到在我的贝宝沙箱帐户中还有一个空白的经常性费用:

Essentially, a user buys a product and gets charged 239.95. Then a user buys a plan for the product with a one time activation and gets charged 33.95. Those are both one time payments. Then when they buy the plan, they also get charged a 14.95 recurring monthly charge for that airtime plan. Everything seems to work but I notice in my paypal sandbox account another recurring charge that is blank:

为什么会出现空白充电?

Why is that blank charge happening?

推荐答案

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

It is not an actual charge, its just a record of the profile being created. You have to first create a profile, before it can be charged. This is reflected in the PayPal account as you are seeing.

这篇关于paypal 交易历史记录创建额外的定期付款的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆