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.
0
votes
3 Answers
1
votes
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.
0
votes
It is likely that you are encountering a bug in the PayPal Sandbox.
Please report it to PayPal Merchant Support.