protected function addRetryLink(&$data)
 {
     //add data we're going to need for the error page!
     $back_form = $this->gateway->session_getLastFormName();
     $params = array('gateway' => $this->gateway->getIdentifier());
     if (!$this->gateway->session_hasDonorData()) {
         $preserve = $this->gateway->getRetryData();
         $params = array_merge($preserve, $params);
     }
     $data['ffname_retry'] = GatewayFormChooser::buildPaymentsFormURL($back_form, $params);
 }
 /**
  *
  * @covers GatewayAdapter::__construct
  * @covers GatewayAdapter::defineVarMap
  * @covers GatewayAdapter::defineReturnValueMap
  * @covers GatewayAdapter::defineTransactions
  */
 public function testConstructor()
 {
     $options = $this->getDonorTestData();
     $class = $this->testAdapterClass;
     $_SERVER['REQUEST_URI'] = GatewayFormChooser::buildPaymentsFormURL('testytest', array('gateway' => $class::getIdentifier()));
     $gateway = $this->getFreshGatewayObject($options);
     $this->assertInstanceOf(TESTS_ADAPTER_DEFAULT, $gateway);
     $this->resetAllEnv();
     $gateway = $this->getFreshGatewayObject($options = array());
     $this->assertInstanceOf(TESTS_ADAPTER_DEFAULT, $gateway, "Having trouble constructing a blank adapter.");
 }