Skip to content

Commit

Permalink
support additional options when triggering actions
Browse files Browse the repository at this point in the history
  • Loading branch information
TomK committed May 8, 2015
1 parent 26134ec commit dd0e7c1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Models/Visitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,18 @@ public function alias($alias)
* @param null $couponCode
* @param bool $returnPixels
* @param string $userReference
* @param string $campaignHash
* @param string $sid1
* @param string $sid2
* @param string $sid3
*
* @return PostActionResponse
*/
public function triggerAction(
$companyFid, $actionKey, $transactionId, $transactionValue = 0,
array $data = null, $couponCode = null, $returnPixels = true,
$userReference = null
$userReference = null,
$campaignHash = null, $sid1 = null, $sid2 = null, $sid3 = null
)
{
$endpoint = AffiliateActionEndpoint::bound($this->_getApi());
Expand All @@ -78,6 +83,10 @@ public function triggerAction(
$payload->returnPixels = $returnPixels;
$payload->visitorId = $this->_visitorId;
$payload->userReference = nonempty($userReference, $this->_alias);
$payload->campaignHash = $campaignHash;
$payload->sid1 = $sid1;
$payload->sid2 = $sid2;
$payload->sid3 = $sid3;

$req = $endpoint->post($payload);
return $this->_processRequest($req);
Expand Down

0 comments on commit dd0e7c1

Please sign in to comment.