We have implemented PayPal recurring payment functionality on our website. During the subscription checkout, users have option to check automatic payment which will charge them every 1 year.
After DoExpressCheckoutPayment
API method is called and finished, we call CreateRecurringPaymentsProfile
API method with the following details:
$requestParams=array(
"TOKEN"=>$token,
"PROFILESTARTDATE"=>date("Y-m-d\TH:i:s\Z"),
"DESC"=>"Mimi subscription",
"BILLINGPERIOD"=>"Year",
"BILLINGFREQUENCY"=>"1",
"AMT"=>$subscriptionType->price,
"CURRENCYCODE"=>"GBP",
"PROFILEREFERENCE"=>$transactionId
);
where the TOKEN is the value returned from the SetExpressCheckout
API metod call. We set PROFILESTARTDATE
to today's date (13 Oct 2014), BILLINGPERIOD
to Year and BILLINGFREQUENCY
to 1.
When we test this code, everything seems to be working fine, and recurring payment profile is created, but the following detail is interesting. When I enter to my sandbox account, in my recurring payments profiles I can see the profile previously created. Here is image attached:
Why the Next payment due date is today's date (we did testing on 13th October 2014), and why it is not set to 13 Oct 2015? Is this means that user will be charged 2 times in 2014 (once during normal subscription checkout and then once using recurring payment profile mechanism).
Thx in advance.
If you have already charged the buyer for the year 2014 using the "DoExpressCheckout" API then you need to specify the "PROFILESTARTDATE" as "13 Oct 2015". "PROFILESTARTDATE" specifies when the profile is going to be charged , So in your case it should be charged once again and then on "13 Oct 2015".
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.