/**
  * @param FinancialTransactionInterface $transaction
  * @return array
  */
 protected function getPurchaseParameters(FinancialTransactionInterface $transaction)
 {
     /**
      * @var \JMS\Payment\CoreBundle\Model\PaymentInterface $payment
      */
     $payment = $transaction->getPayment();
     /**
      * @var \JMS\Payment\CoreBundle\Model\PaymentInstructionInterface $paymentInstruction
      */
     $paymentInstruction = $payment->getPaymentInstruction();
     /**
      * @var \JMS\Payment\CoreBundle\Model\ExtendedDataInterface $data
      */
     $data = $transaction->getExtendedData();
     $transaction->setTrackingId($payment->getId());
     $card = new \Omnipay\Common\CreditCard();
     $parameters = array('transactionId' => $transaction->getTrackingId(), 'amount' => $payment->getTargetAmount(), 'currency' => $paymentInstruction->getCurrency(), 'description' => $data->has('description') ? $data->get('description') : 'Transaction ' . $payment->getId(), 'clientIp' => $data->get('client_ip'), 'gateway' => $this->getGateway($transaction), 'card' => $card, 'notifyUrl' => $this->reportUrl, 'cancelUrl' => $data->get('cancel_url'), 'returnUrl' => $data->get('return_url'));
     return $parameters;
 }
 /**
  * @param FinancialTransactionInterface $transaction
  * @return array
  */
 protected function getPurchaseParameters(FinancialTransactionInterface $transaction)
 {
     /**
      * @var \JMS\Payment\CoreBundle\Model\PaymentInterface $payment
      */
     $payment = $transaction->getPayment();
     /**
      * @var \JMS\Payment\CoreBundle\Model\ExtendedDataInterface $data
      */
     $data = $transaction->getExtendedData();
     $transaction->setTrackingId($payment->getId());
     $parameters = array('amount' => $payment->getTargetAmount(), 'description' => $data->has('description') ? $data->get('description') : 'Transaction ' . $payment->getId(), 'returnUrl' => $data->get('return_url'), 'paymentMethod' => $this->getMethod($transaction));
     return $parameters;
 }