/**
  * Respond to a donation request
  */
 protected function handleDonationRequest()
 {
     $this->setHeaders();
     // TODO: this is where we should feed GPCS parameters into DonationData.
     // dispatch forms/handling
     if ($this->adapter->checkTokens()) {
         if ($this->isProcessImmediate()) {
             // Check form for errors
             // FIXME: Should this be rolled into adapter.doPayment?
             $form_errors = $this->validateForm();
             // If there were errors, redisplay form, otherwise proceed to next step
             if ($form_errors) {
                 $this->displayForm();
             } else {
                 // Attempt to process the payment, and render the response.
                 $this->processPayment();
             }
         } else {
             $this->adapter->session_addDonorData();
             $this->displayForm();
         }
     } else {
         //token mismatch
         $error['general']['token-mismatch'] = $this->msg('donate_interface-token-mismatch');
         $this->adapter->addManualError($error);
         $this->displayForm();
     }
 }