/**
  * @return string
  */
 protected function makeGiftAidSubmission()
 {
     $this->setMockHttpResponse('GiftAidResponseAck.txt');
     $preBuiltMessage = file_get_contents(__DIR__ . '/Messages/GiftAidRequest.txt');
     $this->gtService->sendMessage($preBuiltMessage);
     return $preBuiltMessage;
 }
示例#2
0
 public function getResponseErrors()
 {
     $govTalkErrors = parent::getResponseErrors();
     foreach ($govTalkErrors['business'] as $b_index => $b_err) {
         if ($b_err['number'] == "3001") {
             unset($govTalkErrors['business'][$b_index]);
         }
     }
     $has_gt_errors = false;
     foreach ($govTalkErrors as $type) {
         if (count($type) > 0) {
             $has_gt_errors = true;
         }
     }
     if (!$has_gt_errors) {
         // lay out the GA errors
         foreach ($this->fullResponseObject->Body->ErrorResponse->Error as $gaError) {
             $govTalkErrors['business'][] = array('number' => (string) $gaError->Number, 'text' => (string) $gaError->Text, 'location' => (string) $gaError->Location);
         }
     }
     return $govTalkErrors;
 }