send() public method

Send the request
public send ( ) : Omnipay\Common\Message\ResponseInterface
return Omnipay\Common\Message\ResponseInterface
 public function testSendError()
 {
     $this->setMockHttpResponse('CaptureFailure.txt');
     $response = $this->request->send();
     $this->assertFalse($response->isSuccessful());
     $this->assertFalse($response->isRedirect());
     $this->assertSame('Failure', $response->getMessage());
 }
 /**
  * Set the correct configuration sending
  *
  * @return \Omnipay\Common\Message\ResponseInterface
  */
 public function send()
 {
     $this->configure();
     return parent::send();
 }
 /**
  * Send a payment request to the gateway, and redirect appropriately
  *
  * @param AbstractRequest         $request
  * @param Market_TransactionModel $transaction
  *
  * @return string
  */
 private function sendPaymentRequest(AbstractRequest $request, Market_TransactionModel $transaction)
 {
     // try {
     /** @var ResponseInterface $response */
     $response = $request->send();
     $this->updateTransaction($transaction, $response);
     if ($response->isRedirect()) {
         // redirect to off-site gateway
         return $response->redirect();
     }
     $order = $transaction->order;
     if ($response->isSuccessful()) {
         return $order->returnUrl;
     } else {
         craft()->userSession->setError(Craft::t("Payment error: " . $transaction->message));
         return $order->cancelUrl;
     }
 }