コード例 #1
0
 /**
  * @param string $fid
  * @param string $key
  *
  * @return BoolResponse
  */
 public function setKey($fid, $key)
 {
     $payload = new SetKeyAffiliateActionPayload();
     $payload->fid = $fid;
     $payload->key = $key;
     $ep = AffiliateActionEndpoint::bound($this->getApi());
     return $ep->setKey($payload)->get();
 }
コード例 #2
0
ファイル: Visitor.php プロジェクト: jurgisk/sdk
 /**
  * Reverse a previously triggered action
  *
  * @param        $transactionId
  * @param string $originalAction
  * @param string $reason
  * @param null   $reversalId
  * @param int    $reversalAmount
  * @param array  $data
  *
  * @return BoolResponse
  */
 public function reverseAction($transactionId, $originalAction = AffiliateBuiltInAction::ACQUISITION, $reason = ReversalReason::CANCEL, $reversalId = null, $reversalAmount = 0, array $data = null)
 {
     $endpoint = AffiliateActionEndpoint::bound($this->_getApi());
     $payload = new ReversalPayload();
     $payload->userAgent = $this->_fortifi->getUserAgent();
     $payload->language = $this->_fortifi->getUserLanguage();
     $payload->clientIp = $this->_fortifi->getClientIp();
     $payload->encoding = $this->_fortifi->getUserEncoding();
     $payload->reason = $reason;
     $payload->reversalAmount = $reversalAmount;
     $payload->reversalId = $reversalId;
     $payload->sourceActionKey = $originalAction;
     $payload->sourceTransactionId = $transactionId;
     $payload->data = $data;
     $payload->visitorId = $this->_visitorId;
     $req = $endpoint->reverse($payload);
     return $this->_processRequest($req);
 }