CRM-12352
authorDonald A. Lobo <lobo@civicrm.org>
Mon, 15 Apr 2013 01:00:06 +0000 (18:00 -0700)
committerDonald A. Lobo <lobo@civicrm.org>
Mon, 15 Apr 2013 01:00:06 +0000 (18:00 -0700)
----------------------------------------
* CRM-12352: missing single quotes around arrayed variable reference
  http://issues.civicrm.org/jira/browse/CRM-12352

CRM/Core/Payment/PayPalImpl.php

index 935e6a67d823ca25cbed3ed4e7a9f8ace0fcad3d..7a7d3f3586a6f9f91c40f1d94452ee07dca7b4ed 100644 (file)
@@ -241,7 +241,13 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
     //$args['desc']           = 'Recurring Contribution';
     $args['totalbillingcycles'] = $params['installments'];
     $args['version'] = '56.0';
-    $args['profilereference'] = "i={$params['invoiceID']}" . "&m=$component" . "&c={$params['contactID']}" . "&r={$params['contributionRecurID']}" . "&b={$params['contributionID']}" . "&p={$params['contributionPageID']}";
+    $args['profilereference'] =
+      "i={$params['invoiceID']}" .
+      "&m=$component" .
+      "&c={$params['contactID']}" .
+      "&r={$params['contributionRecurID']}" .
+      "&b={$params['contributionID']}" .
+      "&p={$params['contributionPageID']}";
 
     $result = $this->invokeAPI($args);
 
@@ -316,11 +322,18 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
       $args['billingfrequency'] = $params['frequency_interval'];
       $args['method'] = "CreateRecurringPaymentsProfile";
       $args['profilestartdate'] = $start_date;
-      $args['desc'] = $params['description'] . ": " . $params['amount'] . " Per " . $params['frequency_interval'] . " " . $params['frequency_unit'];
+      $args['desc'] =
+        $params['description'] . ": " .
+        $params['amount'] . " Per " .
+        $params['frequency_interval'] . " " .
+        $params['frequency_unit'];
       $args['amt'] = $params['amount'];
       $args['totalbillingcycles'] = $params['installments'];
       $args['version'] = 56.0;
-      $args['PROFILEREFERENCE'] = "i=" . $params['invoiceID'] . "&m=" . $component . "&c=" . $params['contactID'] . "&r=" . $params['contributionRecurID'] . "&b=" . $params['contributionID'] . "&p=" . $params['contributionPageID'];
+      $args['PROFILEREFERENCE'] =
+        "i=" . $params['invoiceID'] . "&m=" . $component .
+        "&c=" . $params['contactID'] . "&r=" . $params['contributionRecurID'] .
+        "&b=" . $params['contributionID'] . "&p=" . $params['contributionPageID'];
     }
 
     // Allow further manipulation of the arguments via custom hooks ..
@@ -355,7 +368,8 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
   function checkConfig() {
     $error = array();
     $paymentProcessorType = CRM_Core_PseudoConstant::paymentProcessorType(false, null, 'name');
-    if ($this->_paymentProcessor['payment_processor_type_id'] == CRM_Utils_Array::key('PayPal_Standard', $paymentProcessorType) ||
+    if (
+      $this->_paymentProcessor['payment_processor_type_id'] == CRM_Utils_Array::key('PayPal_Standard', $paymentProcessorType) ||
       $this->_paymentProcessor['payment_processor_type_id'] == CRM_Utils_Array::key('PayPal', $paymentProcessorType)
     ) {
       if (empty($this->_paymentProcessor['user_name'])) {
@@ -512,10 +526,11 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
 
     $cancelUrlString = "$cancel=1&cancel=1&qfKey={$params['qfKey']}";
     if (CRM_Utils_Array::value('is_recur', $params)) {
-      $cancelUrlString .= "&isRecur=1&recurId={$params['contributionRecurID']}&contribId={$params[contributionID]}";
+      $cancelUrlString .= "&isRecur=1&recurId={$params['contributionRecurID']}&contribId={$params['contributionID']}";
     }
 
-    $cancelURL = CRM_Utils_System::url($url,
+    $cancelURL = CRM_Utils_System::url(
+      $url,
       $cancelUrlString,
       TRUE, NULL, FALSE
     );