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

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

问题描述

首先,请注意我已经阅读了很多关于此主题的帖子,但所提供的信息对我来说不够或不准确.

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. 一旦用户订阅了一项新服务,我就可以删除现有的定期付款资料(固定金额)并创建一个新的.这没问题,但我读过我无法从我的应用程序中自动删除配置文件.我只能创造.为了删除现有的配置文件,我必须手动执行,通过登录我的企业贝宝帐户并将其删除.如果为真,那么这对我来说不是解决方案,因为我无法自动完成所有流程.然而,这对我来说很奇怪.这是真的?如果没有,你能告诉我怎么做吗?

  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?

虽然我没有深入阅读,但我读过一篇文章,我可以使用参考事务来实现这一点.对吗?

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) 如果您使用的是标准订阅按钮,则这是正确的,但如果您使用的是定期付款 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.

另一种选择是让您的用户创建一个Preapproval 个人资料,然后使用 Pay 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.

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

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