贝宝可变金额的定期付款 [英] Paypal recurring payments with variable amount

查看:108
本文介绍了贝宝可变金额的定期付款的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,请注意,我已经阅读了很多有关该主题的文章,但是所提供的信息对我来说还是不够的或不准确.

First, notice I have read many post regarding this topic, but the info provided is not enough for me or is not accurate.

我正在使用AngularJS和Ruby on Rails开发一个提供不同服务的网站.用户可以订阅这些服务(一项或多项),并获得Paypal定期付款(通过配置文件)以支付这些服务(使用商家API).对于固定金额,该服务对我来说还可以.

I´m developing a website with AngularJS and Ruby on Rails that offers different services. Users can subscribe to these services (one or many) and they get a Paypal Recurring Payment (through a profile) to pay these services (using merchant API). For a fixed amount the service is working ok for me.

问题在于,一个时段到另一个时段的金额可能会有所不同,具体取决于用户订阅的服务数量.

The problem is, the amount can be different from one period to another, depending on the number of services the user is subscribed.

我已经阅读了Paypal文档,但是我仍然不清楚什么是正确的方法.

I have read Paypal docs, but It´s still not clear to me what is the right approach.

我的方法是:

  1. 一旦用户订阅了一项新服务,我就可以删除现有的定期付款配置文件(金额固定)并创建一个新的.可以,但是我已经阅读到我无法从应用程序中自动删除配置文件.我只能创造.为了删除现有的个人资料,我必须手动进行操作,方法是登录我的商业Paypal帐户并将其删除.如果为true,那么这对我来说不是解决方案,因为我无法自动完成所有流程.但是,这对我来说很奇怪.这是真的?如果没有,您能告诉我该怎么做吗?

  1. Once a user subscribes a new service, I can remove the existing recurring payment profile (with fixed amount) and create a new one. This would be ok, but I have read I can´t delete a profile automatically from my application. I can only create. In order to delete an existing profile, I have to do it manually, by login in my business paypal account and delete it. If true, then this is not a solution for me, because I can´t do all flow automatically. However, this is quite strange for me. Is this true? If not, could you please let me know how to do it?

尽管我还没有深入了解它,但是我读了一篇文章,我可以使用Reference事务来实现这一点.这样对吗?

Although, I have not read deep on it, I read on a post I can use Reference transactions to implement this. Is this right?

更新 https://developer.paypal.com/docs/经典/快速结帐/集成指南/ECReferenceTxns/#recurringreftxns

据我了解,参考交易让我可以改变在运行时从买方那里获得的金额,但问题是该操作不会重复执行(由Paypal管理).我应该保留逻辑以便从我的应用程序中执行它.对吧?

As far as I understood, Reference transactions let me vary the amount to get from the buyer when I run it, but the problem is that this operation does not executes recurring (managed by Paypal). I should keep the logic in order to execute it from my application. Right?

欢迎其他任何方法或说明.

Any other approach or clarification is welcome.

更新 我的第一种方法是仅使用订阅的所有服务的数量创建一个可变的定期付款.但是,也许解决方案是为每个服务创建定期付款资料?

UPDATE My first approach is to create just one variable recurring payment with the amount of all services subscribed. But, maybe the solution is to create a recurring payment profile per each service?

推荐答案

1)如果使用标准订阅"按钮,则为true,但是如果您使用的是定期付款" API,则可以使用 ManageRecurringPaymentsProfileStatus .

1) This is true if you're using Standard Subscription buttons, but if you're working with the Recurring Payments API you can cancel the profile using ManageRecurringPaymentsProfileStatus.

2)是,对于参考交易,您可以随时收取所需的任何金额,但基本上由您自己使用参考交易来建立自己的定期付款系统.您可以每天运行一个脚本,遍历所有帐户并相应地处理应付款.

2) Yes, with reference transactions you can charge any amount you need to at any time, but it would be left up to you to build your own recurring payments system, basically, utilizing reference transactions. You could have a script run each day that goes through all your accounts and processes due payments accordingly.

另一种选择是让您的用户创建预先批准配置文件,然后使用付款API 处理付款使用预批准密钥.这与参考交易非常相似.

Another option would be to have your users create a Preapproval profile and then use the Pay API to process payments using the preapproval keys. This is very similar to reference transactions.

这篇关于贝宝可变金额的定期付款的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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