简体   繁体   中英

Paypal recurring payment and billing period

I am using PayPal-php-sdk .I had successfully implemented recurring payment using this 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.

$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.

Please report it to PayPal Merchant Support .

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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