CRM-15993, also handle recurring paypal express
authorkurund <kurund@civicrm.org>
Tue, 24 Feb 2015 19:09:43 +0000 (00:39 +0530)
committerkurund <kurund@civicrm.org>
Tue, 24 Feb 2015 19:09:43 +0000 (00:39 +0530)
----------------------------------------
* CRM-15993: Add CiviCRM BN code to all PayPal methods for partner program tracking
  https://issues.civicrm.org/jira/browse/CRM-15993

CRM/Core/Payment/PayPalImpl.php

index 4cb21f78cb728c4e922e952a10a38ab6bc63d29a..19608b8d8aecc34fd12a573780b269e988b0fb99 100644 (file)
@@ -266,6 +266,9 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
       "&b={$params['contributionID']}" .
       "&p={$params['contributionPageID']}";
 
+    // add CiviCRM BN code
+    $args['BUTTONSOURCE'] = 'CiviCRM_SP';
+
     $result = $this->invokeAPI($args);
 
     if (is_a($result, 'CRM_Core_Error')) {
@@ -273,7 +276,6 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
     }
 
     /* Success */
-
     $params['trxn_id'] = $result['transactionid'];
     $params['gross_amount'] = $result['amt'];
     $params['fee_amount'] = $result['feeamt'];