简体   繁体   English

Paypal 定期付款和计费周期

[英]Paypal recurring payment and billing period

I am using PayPal-php-sdk .I had successfully implemented recurring payment using this rest api .我正在使用 PayPal-php-sdk 。我已经使用这个 rest api 成功实现了定期付款。 Currently the payment occurring in each end of the month.目前的付款发生在每个月底。 But I want to charge immediately when the user subscribe ie the first payment will charged when user subcribe the plan.但是我想在用户订阅时立即收费,即当用户订阅该计划时将收取第一笔费用。 How can I implement this ?我该如何实现? Please any one help.请任何人帮助。

I created mine to where I have a set up fee which charges immediately and then I set the regular payments to begin 1 month later. 我创建了我的固定费用,并立即收费,然后将常规付款设置为1个月后开始。

$merchantPreferences->setReturnUrl("$baseUrl/paypal/ExecuteAgreement?success=true")
->setCancelUrl("$baseUrl/paypal/ExecuteAgreement?success=false")
->setAutoBillAmount("yes")
->setInitialFailAmountAction("CONTINUE")
->setMaxFailAttempts("0")
->setSetupFee(new Currency(array('value' => 8.50, 'currency' => 'USD')));

I hope this helps. 我希望这有帮助。

It is likely that you are encountering a bug in the PayPal Sandbox. 您可能在PayPal沙箱中遇到错误。

Please report it to PayPal Merchant Support . 请将其报告给PayPal商家支持

If you don't offer free trial period the user must pay for the first cycle immediately.如果您不提供免费试用期,则用户必须立即支付第一个周期的费用。 If you offer free trial period, you can control the sequence of the cycles to have the paid one first and then the trial one.如果您提供免费试用期,您可以控制周期顺序,先付费后试用。

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

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