Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set 1/3/5 years billing period in Paypal express checkout PHP

Tags:

php

paypal

I'm using paypal as payment gateway and want to create recurring profile like

  • 1 year plan for $20
  • 3 year plan for $40
  • 5 year plan for $50

but when i'm adding BILLINGPERIOD=year&BILLINGFREQUENCY=3 as params, getting error from paypal api :

And getting Error :

Billing frequency must be > 0 and be less than or equal to one year
Error Message: Invalid billing frequencyError Code: 11516
Error Severity Code: Error 

Please help me here.

like image 769
user3792555 Avatar asked Oct 14 '15 08:10

user3792555


1 Answers

This isn't possible with the paypal api, you need to create your own mechanism.

From the paypal api:

The combination of BillingPeriod and BillingFrequency cannot exceed one year.

If the billingperiod is Month you can set the billingfrequency to e.g. 1, 4, 9 and 12 but not to 13.

If the billingperiod is Year you can set the billingfrequencyonly to 1.

Source: https://developer.paypal.com/docs/classic/api/merchant/CreateRecurringPaymentsProfile_API_Operation_NVP/

like image 63
Alexander Wilhelm Avatar answered Sep 23 '22 14:09

Alexander Wilhelm