【问题标题】:Paypal one time purchase and recurring payments in single transaction using express checkout through rest apisPaypal 一次性购买和定期付款,通过 rest api 使用快速结帐在单笔交易中进行
【发布时间】:2018-10-28 12:52:02
【问题描述】:

我正在使用 PayPal REST API,我想创建一个组合交易,该交易将在单笔交易中处理一次性付款和定期付款。

用例: 根据流程,用户可以从门户购买产品,也可以按月和按季订阅产品。用户还可以在一次交易中购买订阅产品和一次性付款产品。

我搜索了 REST API 文档以及 PHP SDK 示例,但找不到在单个交易中混合使用定期付款和一次性付款的交易示例。

【问题讨论】:

    标签: php paypal paypal-rest-sdk


    【解决方案1】:

    我注意到https://www.paypal-community.com/t5/Business-Tools/One-time-purchase-and-recurring-payments-in-single-transaction/td-p/1509420 有类似的问题并且有答案;我怀疑同一位作者可能同时提出了这两个问题,但我认为这可能对寻求答案的其他人有用。

    为避免链接失效,我将在下面粘贴给出的答案 - 但我没有亲自尝试过,所以我不知道它是否有效。

    一次性付款的一个选项是使用试用变量集 一天,之后的定期付款从第二天开始。

    例如,您经营服务业务:

    一次性设置费为 25.00 美元,外加每月维护费 10.00 美元。设置费通过使用试验变量集收取 一天,之后的定期付款从第二天开始。

    一些带有注释的示例代码:

    <!-- "a1" Trial amount 1. This is the price of the first trial period.
    For a free trial, use a value of 0 --> 
    <input type="hidden" name="a1" value="25.00"> 
    <!-- "p1" Trial period 1. This is the length of the first trial period. 
    The number is modified by the trial period 1 units (t1, below) --> 
    <input type="hidden" name="p1" value="1"> 
    <!-- "t1" Trial period 1 units. This is the units of trial period 1 (p1, above). 
    Acceptable values are: D (days), W (weeks), M (months), Y (years) -->
    <input type="hidden" name="t1" value="D">  
    

    不确定这是否是您的想法,但它也可能会给您一些其他想法。

    【讨论】:

      猜你喜欢
      • 2016-07-27
      • 2016-05-18
      • 2012-12-10
      • 2020-06-02
      • 2018-04-21
      • 2014-04-07
      • 2016-02-21
      • 2013-01-28
      • 2013-10-21
      相关资源
      最近更新 更多