コード例 #1
0
 public function submit()
 {
     $payload = $this->createPayload();
     $this->setURL("/dvtokens/" . $this->dvtoken);
     $response = RequestSender::send($this->url, $this->authHeader, $payload, $this->method);
     return new TokenResponse($response);
 }
コード例 #2
0
 public function submit()
 {
     $this->setAuthHeader();
     $this->setURL("/txns/withauthkey/" . $this->resultKey);
     $response = RequestSender::send($this->url, $this->authHeader, NULL, $this->method);
     return new TransactionResponse($response);
 }
コード例 #3
0
 public function submit()
 {
     $this->setAuthHeader();
     $this->setURL('/status/');
     $response = RequestSender::send($this->url, $this->authHeader, NULL, $this->method);
     return APIResponse::fromFullResponse($response);
 }
コード例 #4
0
 public function submit()
 {
     $this->setURL("/txns/search");
     $this->setMethod("POST");
     $this->setAuthHeader();
     $request = array();
     $request["Action"] = $this->action;
     $request["Amount"] = $this->amount;
     $request["AuthoriseId"] = $this->authoriseId;
     $request["BankResponseCode"] = $this->bankResponseCode;
     $request["BillerCode"] = $this->billerCode;
     $request["CardType"] = $this->cardType;
     $request["Crn1"] = $this->crn1;
     $request["Crn2"] = $this->crn2;
     $request["Crn3"] = $this->crn3;
     $request["Curency"] = $this->currency;
     $request["ExpiryDate"] = $this->expiryDate;
     $request["FromDate"] = $this->fromDate;
     $request["MaskedCardNumber"] = $this->maskedCardNumber;
     $request["MerchantReference"] = $this->merchantReference;
     $request["RRN"] = $this->rrn;
     $request["EmailAddress"] = $this->emailAddress;
     $request["ReceiptNumber"] = $this->receiptNumber;
     $request["ResponseCode"] = $this->responseCode;
     $request["SettlementDate"] = $this->settlementDate;
     $request["Source"] = $this->source;
     $request["ToDate"] = $this->toDate;
     $request["FromDate"] = $this->fromDate;
     $wrappedRequest = array("SearchInput" => $request);
     $response = RequestSender::send($this->url, $this->authHeader, $wrappedRequest, $this->method);
     return new TransactionSearchResponse($response);
 }
コード例 #5
0
 public function submit()
 {
     $this->setURL("/dvtokens/updatedvtokenauthkey");
     $tempPayload = $this->buildPayload();
     // Rename FixedAddDVTokenData to FixedUpdateDVTokenData
     $payload = array("FixedUpdateDVTokenData" => $tempPayload["FixedAddDVTokenData"], "RedirectionUrl" => $tempPayload["RedirectionUrl"], "WebHookUrl" => $tempPayload["WebHookUrl"], "HppParameters" => $tempPayload["HppParameters"]);
     $payload["FixedUpdateDVTokenData"]["DVToken"] = $this->dvtoken;
     $response = RequestSender::send($this->url, $this->authHeader, $payload, $this->method);
     return new AuthKeyResponse($response);
 }
コード例 #6
0
 public function submit()
 {
     $this->setAuthHeader();
     $this->setURL("/txns/processtxnauthkey");
     $payload = array();
     $wrappedPayload = array();
     $payload["Action"] = $this->action;
     $payload["Amount"] = $this->amount;
     $payload["Currency"] = $this->currency;
     if ($this->customer !== NULL) {
         $payload["Customer"] = $this->customer->getPayload();
     } else {
         $payload["Customer"] = null;
     }
     $payload["MerchantReference"] = $this->merchantReference;
     if ($this->customer !== NULL) {
         $payload["Order"] = $this->order->getPayload();
     } else {
         $payload["Order"] = null;
     }
     if ($this->hppParameters !== NULL) {
         $payload["HppParameters"] = $this->hppParameters->getPayload();
     } else {
         $payload["HppParameters"] = null;
     }
     $payload["Crn1"] = $this->crn1;
     $payload["Crn2"] = $this->crn2;
     $payload["Crn3"] = $this->crn3;
     $payload["Type"] = $this->type;
     $payload["SubType"] = $this->subType;
     $payload["BillerCode"] = $this->billerCode;
     $payload["TestMode"] = $this->testMode;
     $payload["TokenisationMode"] = $this->tokenisationMode;
     $payload["EmailAddress"] = $this->emailAddress;
     $payload["FraudScreeningDeviceFingerPrint"] = $this->fraudScreeningDeviceFingerPrint;
     $wrappedPayload["ProcessTxnData"] = $payload;
     $wrappedPayload["RedirectionUrl"] = $this->redirectionUrl;
     $wrappedPayload["WebHookUrl"] = $this->webHookUrl;
     $response = RequestSender::send($this->url, $this->authHeader, $wrappedPayload, $this->method);
     return new AuthKeyTransactionResponse($response);
 }
コード例 #7
0
 public function submit()
 {
     $this->setURL("/dvtokens/search");
     $payload = array();
     $payload["CardType"] = $this->cardType;
     $payload["Crn1"] = $this->crn1;
     $payload["Crn2"] = $this->crn2;
     $payload["Crn3"] = $this->crn3;
     $payload["ExpiredCardsOnly"] = !!$this->expiredCardsOnly;
     $payload["ExpiryDate"] = $this->expiryDate;
     $payload["FromDate"] = $this->fromDate;
     $payload["ToDate"] = $this->toDate;
     $payload["Source"] = $this->source;
     $payload["DVToken"] = $this->token;
     $payload["UserCreated"] = $this->userCreated;
     $payload["UserUpdated"] = $this->userUpdated;
     $payload["MaskedCardNumber"] = $this->maskedCardNumber;
     $wrappedPayload = array("SearchInput" => $payload);
     $response = RequestSender::send($this->url, $this->authHeader, $wrappedPayload, $this->method);
     return new TokenSearchResponse($response);
 }
コード例 #8
0
ファイル: Request.php プロジェクト: envire-team/yii2-bpoint
 protected function setAuthHeader()
 {
     if ($this->username === NULL || $this->password === NULL || $this->merchantNumber === NULL) {
         return;
     } else {
         $this->authHeader = base64_encode($this->username . "|" . $this->merchantNumber . ":" . $this->password);
     }
     if ($this->userAgent != NULL) {
         RequestSender::setUserAgent($this->userAgent);
     }
     RequestSender::setTimeout($this->timeout);
 }
コード例 #9
0
 public function submit()
 {
     $this->setURL("/dvtokens/adddvtokenauthkey");
     $payload = $this->buildPayload();
     $response = RequestSender::send($this->url, $this->authHeader, $payload, $this->method);
     return new AuthKeyResponse($response);
 }
コード例 #10
0
 public function submit()
 {
     $payload = array();
     $payload["Action"] = $this->action;
     $payload["Amount"] = $this->amount;
     $payload["Currency"] = $this->currency;
     if ($this->customer !== NULL) {
         $payload["Customer"] = $this->customer->getPayload();
     } else {
         $payload["Customer"] = null;
     }
     $payload["MerchantReference"] = $this->merchantReference;
     if ($this->order !== NULL) {
         $payload["Order"] = $this->order->getPayload();
     } else {
         $payload["Order"] = null;
     }
     $payload["OriginalTxnNumber"] = $this->originalTxnNumber;
     $payload["Crn1"] = $this->crn1;
     $payload["Crn2"] = $this->crn2;
     $payload["Crn3"] = $this->crn3;
     $payload["BillerCode"] = $this->billerCode;
     $payload["StoreCard"] = !!$this->storeCard;
     $payload["SubType"] = $this->subType;
     $payload["Type"] = $this->type;
     $payload["CardDetails"] = $this->cardDetail->getArrayRepresentation();
     $payload["TestMode"] = $this->testMode;
     $payload["EmailAddress"] = $this->emailAddress;
     $payload["TokenisationMode"] = $this->tokenisationMode;
     if ($this->fraudScreeningRequest !== NULL) {
         $payload["FraudScreeningRequest"] = $this->fraudScreeningRequest->getPayload();
     } else {
         $payload["FraudScreeningRequest"] = null;
     }
     $this->setAuthHeader();
     $this->setURL('/txns/');
     $wrappedPayload = array("TxnReq" => $payload);
     $response = RequestSender::send($this->url, $this->authHeader, $wrappedPayload, $this->method);
     return new TransactionResponse($response);
 }
コード例 #11
0
 public function submit()
 {
     $this->setURL("/dvtokens/" . $this->dvtoken);
     $response = RequestSender::send($this->url, $this->authHeader, NULL, $this->method);
     return APIResponse::fromFullResponse($response);
 }
コード例 #12
0
 public function submit()
 {
     $this->setURL("/dvtokens/txn/" . $this->txnNumber);
     $response = RequestSender::send($this->url, $this->authHeader, NULL, $this->method);
     return new TokenResponse($response);
 }