Пример #1
0
 /**
  * Send the request with specified data
  *
  * @param  mixed             $data The data to send
  * @return CaptureResponse
  */
 public function sendData($data)
 {
     if (!$this->client) {
         throw new \InvalidArgumentException('You need to call "setClient" before "send"');
     }
     $result = $this->client->capture($data);
     return $this->response = new CaptureResponse($this, array('captureResult' => $result->captureResult, 'pbsResponse' => $result->pbsResponse, 'epayresponse' => $result->epayresponse));
 }
Пример #2
0
 /**
  * Send the request with specified data
  *
  * @param  mixed             $data The data to send
  * @return RefundResponse
  * @throws \InvalidArgumentException
  */
 public function sendData($data)
 {
     if (!$this->client) {
         throw new \InvalidArgumentException('You need to call "setClient" before "send"');
     }
     $result = $this->client->credit($data);
     return $this->response = new RefundResponse($this, ['creditResult' => $result->creditResult, 'pbsResponse' => $result->pbsresponse, 'epayresponse' => $result->epayresponse]);
 }