File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,22 @@ abstract class AbstractRestRequest extends \Omnipay\Common\Message\AbstractReque
6262 */
6363 protected $ payerId = null ;
6464
65+ protected $ referrerCode = 'CiviCRM_SP ' ;
66+
67+ /**
68+ * @return string
69+ */
70+ public function getReferrerCode () {
71+ return $ this ->referrerCode ;
72+ }
73+
74+ /**
75+ * @param string $referrerCode
76+ */
77+ public function setReferrerCode ($ referrerCode ) {
78+ $ this ->referrerCode = $ referrerCode ;
79+ }
80+
6581 public function getClientId ()
6682 {
6783 return $ this ->getParameter ('clientId ' );
@@ -146,6 +162,7 @@ public function sendData($data)
146162 'Accept ' => 'application/json ' ,
147163 'Authorization ' => 'Bearer ' . $ this ->getToken (),
148164 'Content-type ' => 'application/json ' ,
165+ 'PayPal-Partner-Attribution-Id ' => $ this ->getReferrerCode (),
149166 ),
150167 $ body
151168 );
Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ public function getData()
122122 ]
123123 ];
124124 }
125+
125126 return $ data ;
126127 }
127128
You can’t perform that action at this time.
0 commit comments