PaymentDefinition set cycle to infinite

Sellighsphire
Contributor
Contributor

Hello!

 

I'm trying to get a billing plan done. Everything works fine with an easy setup, as follows:

$paymentDefinition = new PaymentDefinition();
$paymentDefinition->setName('my plan') 
	->setType('REGULAR') 
	->setFrequency('Year')
	->setFrequencyInterval("1")
	->setCycles(1)
	->setAmount(new Currency(array('value' => 19.99, 'currency' => 'EUR')));
	

I want to change the plan to be executed infinitly every year unless the buyer stops the plan.

I changed the "setCycles" to 0 (zero), but then PayPal encounters an error saying that this plan isn't accepted.

 

How do I set an infinite plan?

I tried many values/keys and also removed this option, but all failed.

The API won't give any hints.

Does anyone successfully implemented this feature?

 

Regards

Jens

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.