From: jitendrapurohit Date: Mon, 7 Mar 2016 09:47:59 +0000 (+0530) Subject: CRM-18140 - Recurring PayPal transactions fail with 'Transaction ID not set' X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0bde274f8999c35209de7ecc49f91b8211c7894f;p=civicrm-core.git CRM-18140 - Recurring PayPal transactions fail with 'Transaction ID not set' --- diff --git a/CRM/Core/Payment/PayPalImpl.php b/CRM/Core/Payment/PayPalImpl.php index 6c1617fc74..c4d904927d 100644 --- a/CRM/Core/Payment/PayPalImpl.php +++ b/CRM/Core/Payment/PayPalImpl.php @@ -511,7 +511,7 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment { $params['frequency_interval'] . " " . $params['frequency_unit']; $args['amt'] = $params['amount']; - $args['totalbillingcycles'] = $params['installments']; + $args['totalbillingcycles'] = CRM_Utils_Array::value('installments', $params); $args['version'] = 56.0; $args['PROFILEREFERENCE'] = "" . "i=" . $params['invoiceID'] . "&m=" . $component . @@ -562,7 +562,11 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment { * @throws \Civi\Payment\Exception\PaymentProcessorException */ public function doQuery($params) { - if (empty($params['trxn_id'])) { + //CRM-18140 - trxn_id not returned for recurring paypal transaction + if (!empty($params['is_recur'])) { + return array(); + } + elseif (empty($params['trxn_id'])) { throw new \Civi\Payment\Exception\PaymentProcessorException('transaction id not set'); } $args = array(