From 702c12037f3dadc163474e1e8166a795fa228a9d Mon Sep 17 00:00:00 2001 From: Jamie McClelland Date: Tue, 28 Oct 2014 17:21:28 -0400 Subject: [PATCH] CRM-15537 - translate open ended installments to 9999 for authorize.net ---------------------------------------- * CRM-15537: editing recurring contribution for authorize.net with unlimited contributions throws error https://issues.civicrm.org/jira/browse/CRM-15537 --- CRM/Core/Payment/AuthorizeNet.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CRM/Core/Payment/AuthorizeNet.php b/CRM/Core/Payment/AuthorizeNet.php index 16d2b6d7ef..8fbacdffc5 100644 --- a/CRM/Core/Payment/AuthorizeNet.php +++ b/CRM/Core/Payment/AuthorizeNet.php @@ -757,7 +757,11 @@ class CRM_Core_Payment_AuthorizeNet extends CRM_Core_Payment { $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'); -- 2.25.1