Esempio n. 1
0
 /**
  * Instance constructor. Contains a hard-coded CH XMLGW URL and additional
  * schema location.  Adds a channel route identifying the use of this
  * extension.
  *
  * @param string $govTalkSenderId GovTalk sender ID.
  * @param string $govTalkPassword GovTalk password.
  * @param string $service The service to use ('tpvs', 'vsips', or 'live').
  */
 public function __construct($govTalkSenderId, $govTalkPassword, $service = 'live')
 {
     switch ($service) {
         case 'tpvs':
             parent::__construct('https://www.tpvs.hmrc.gov.uk/HMRC/VATDEC', $govTalkSenderId, $govTalkPassword);
             $this->setTestFlag(true);
             break;
         case 'vsips':
             parent::__construct('https://secure.dev.gateway.gov.uk/submission', $govTalkSenderId, $govTalkPassword);
             $this->setTestFlag(true);
             break;
         default:
             parent::__construct('https://secure.gateway.gov.uk/submission', $govTalkSenderId, $govTalkPassword);
             break;
     }
     $this->setSchemaLocation('http://www.govtalk.gov.uk/taxation/vat/vatdeclaration/2/VATDeclarationRequest-v2-1.xsd', false);
     $this->setMessageAuthentication('clear');
 }
Esempio n. 2
0
 /**
  * Instance constructor. Contains a hard-coded Gateway URLs and additional
  * schema location.  Adds a channel route identifying the use of this
  * extension.
  *
  * @param string $govTalkSenderId GovTalk sender ID.
  * @param string $govTalkPassword GovTalk password.
  * @param string $service The service to use ('tpvs', 'vsips', or 'live').
  */
 public function __construct($govTalkSenderId, $govTalkPassword, $service = 'live')
 {
     switch ($service) {
         case 'tpvs':
             parent::__construct('https://www.tpvs.hmrc.gov.uk/new-cis/monthly_return', $govTalkSenderId, $govTalkPassword);
             $this->setTestFlag(true);
             break;
         case 'vsips':
             parent::__construct('https://secure.dev.gateway.gov.uk/submission', $govTalkSenderId, $govTalkPassword);
             $this->setTestFlag(true);
             break;
         default:
             parent::__construct('https://secure.gateway.gov.uk/submission', $govTalkSenderId, $govTalkPassword);
             break;
     }
     $this->setMessageAuthentication('clear');
 }