/**
  * @param Response $response
  * @param FinancialTransactionInterface $transaction
  * @throws \JMS\Payment\CoreBundle\Plugin\Exception\FinancialException
  */
 protected function throwUnlessSuccessResponse(Response $response, FinancialTransactionInterface $transaction)
 {
     if ($response->isSuccess()) {
         return;
     }
     $transaction->setResponseCode($response->getErrorResponseCode());
     $transaction->setReasonCode($response->getErrorReasonCode());
     $ex = new FinancialException('Stripe-Response was not successful: ' . $response->getErrorMessage());
     $ex->setFinancialTransaction($transaction);
     throw $ex;
 }