简体   繁体   English

贝宝的定期付款的“订阅”按钮如何工作

[英]how paypal's Subscription button for recurring payment works

I have create a Subscription Button from my business sandbox account and trying to set recurring payment $1/week. 我已经从我的企业沙盒帐户创建了一个“订阅按钮”,并尝试将定期付款设置为每周1美元。

when i click the button on website every thing is working fine. 当我单击网站上的按钮时,一切正常。 But i don't know what should i save in DB after i return to success link. 但是我不知道返回成功链接后应该在数据库中保存什么。

i got the response from paypal is 我收到贝宝的回复是

Array
(
    [txn_type] => subscr_signup
    [subscr_id] => I-6ALNCWHKXXXX
    [last_name] => sharma
    [residence_country] => US
    [mc_currency] => USD
    [item_name] => Registration Weekly Button
    [business] => test.business.kaching@gmail.com
    [amount3] => 1.00
    [recurring] => 1
    [address_street] => 1 Main St
    [payer_status] => verified
    [payer_email] => test123@starwebindia.com
    [address_status] => confirmed
    [first_name] => harsh
    [receiver_email] => test.business.kaching@gmail.com
    [address_country_code] => US
    [payer_id] => XXXXJ2XM396NW
    [address_city] => San Jose
    [reattempt] => 1
    [payer_business_name] => harsh sharma's Test Store
    [address_state] => CA
    [subscr_date] => 05:36:38 Oct 01, 2018 PDT
    [btn_id] => 390XXXX
    [address_zip] => 95131
    [charset] => windows-1252
    [period3] => 1 W
    [address_country] => United States
    [mc_amount3] => 1.00
    [address_name] => harsh sharma's Test Store
    [auth] => AQUy6SmVq3w80zTvAfKwk62IyEsqNgyEWO6KVB8GfUMyytd2UXdckg.UiyDu4NVdi72buUymVDeXtO0XXXXXXXX
    [form_charset] => UTF-8
)

I have some issue's regarding this 我对此有一些问题

  1. What attributes of response should i save in DB? 我应该在数据库中保存响应的哪些属性?
  2. If i successfully done the payment i get a new row in my recurring payment dashboard. 如果我成功完成付款,那么我的定期付款仪表板中会出现一个新行。 what will happen on the next recurring date? 在下一个重复日期会发生什么? how can i handle that recurring process? 我该如何处理该重复过程?
  3. not related to recurring but i want to skip the page of "Return to saller's site". 与重复无关,但我想跳过“返回到销售人员的站点”页面。

Answers of your questions: 您的问题的答案:

1) What attributes of response should i save in DB? 1)我应该在数据库中保存响应的哪些属性?

Answer: subscr_id,amount3, payer_email, payer_id, period3, auth These fields are stored into your DB 答案:subscr_id,amount3,payer_email,payer_id,period3,auth这些字段存储在数据库中

2) If i successfully done the payment i get a new row in my recurring payment dashboard. 2)如果我成功完成了付款,那么我的定期付款仪表板中会出现一个新行。 what will happen on the next recurring date? 在下一个重复日期会发生什么? how can i handle that recurring process? 我该如何处理该重复过程?

Answer: For this you have to create webhook, which automatically create request on the next recurring date ? 答:为此,您必须创建webhook,它会在下一个重复日期自动创建请求? Which acknowledge to you that you have to pay for next subscription. 哪个向您确认您必须为下一次订阅付费。

3) not related to recurring but i want to skip the page of "Return to saller's site". 3)与重复无关,但我想跳过“返回到销售人员的站点”页面。

Answer: Not sure you have to use the account details when payment process occurred. 答:不确定在付款过程中是否必须使用帐户详细信息。

I hope answers are help you. 希望答案对您有所帮助。 Thanks 谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM