----------------------------------------
* CRM-15537: editing recurring contribution for authorize.net with unlimited contributions throws error
https://issues.civicrm.org/jira/browse/CRM-15537
$template->assign('paymentKey', $this->_getParam('paymentKey'));
$template->assign('subscriptionId', $params['subscriptionId']);
- $template->assign('totalOccurrences', $params['installments']);
+
+ // for open ended subscription totalOccurrences has to be 9999
+ $installments = empty($params['installments']) ? 9999 : $params['installments'];
+ $template->assign('totalOccurrences', $installments);
+
$template->assign('amount', $params['amount']);
$arbXML = $template->fetch('CRM/Contribute/Form/Contribution/AuthorizeNetARB.tpl');