Esempio n. 1
0
 /**
  * @param DateTime $date
  * @param DateTime $directoryDate
  * @param string $acquirerID
  * @param Country[] $countries
  * @throws InvalidArgumentException
  */
 public function __construct(DateTime $date, DateTime $directoryDate, $acquirerID, $countries)
 {
     if (!is_string($acquirerID)) {
         throw new InvalidArgumentException("Parameter 'acquirerID' should be of type string.");
     }
     if (!is_array($countries)) {
         throw new InvalidArgumentException("Parameter 'countries' should be an array.");
     }
     parent::__construct($date);
     $this->directoryDate = $directoryDate;
     $this->acquirerID = $acquirerID;
     $this->countries = $countries;
 }
 /**
  * @param string $acquirerID
  * @param string $issuerAuthenticationURL
  * @param string $purchaseID
  * @param string $transactionID
  * @param DateTime $transactionTimestamp
  * @param DateTime $createdTimestamp
  * @throws InvalidArgumentException
  */
 function __construct($acquirerID, $issuerAuthenticationURL, $purchaseID, $transactionID, DateTime $transactionTimestamp, DateTime $createdTimestamp)
 {
     parent::__construct($createdTimestamp);
     if (!is_string($acquirerID)) {
         throw new InvalidArgumentException("Parameter 'acquirerID' must be of type string.");
     }
     if (!is_string($issuerAuthenticationURL)) {
         throw new InvalidArgumentException("Parameter 'issuerAuthenticationURL' must be of type string.");
     }
     if (!is_string($purchaseID)) {
         throw new InvalidArgumentException("Parameter 'purchaseID' must be of type string.");
     }
     if (!is_string($transactionID)) {
         throw new InvalidArgumentException("Parameter 'transactionID' must be of type string.");
     }
     $this->acquirerID = $acquirerID;
     $this->issuerAuthenticationURL = $issuerAuthenticationURL;
     $this->purchaseID = $purchaseID;
     $this->transactionID = $transactionID;
     $this->transactionTimestamp = $transactionTimestamp;
 }
Esempio n. 3
0
 /**
  * @param string $acquirerID
  * @param float $amount
  * @param string $consumerBIC
  * @param string $consumerIBAN
  * @param string $consumerName
  * @param DateTime $createdTimestamp
  * @param string $currency
  * @param string $status
  * @param DateTime $statusTimestamp
  * @param string $transactionID
  */
 function __construct($acquirerID, $amount, $consumerBIC, $consumerIBAN, $consumerName, DateTime $createdTimestamp, $currency, $status, DateTime $statusTimestamp, $transactionID)
 {
     parent::__construct($createdTimestamp);
     if (!is_string($acquirerID)) {
         throw new InvalidArgumentException("Parameter 'acquirerID' must be of type string.");
     }
     if (!is_string($transactionID)) {
         throw new InvalidArgumentException("Parameter 'transactionID' must be of type string.");
     }
     if (!is_string($status)) {
         throw new InvalidArgumentException("Parameter 'status' must be of type string.");
     }
     if ($status == "Success") {
         if (!is_float($amount)) {
             throw new InvalidArgumentException("Parameter 'amount' must be of type float.");
         }
         if (!is_string($consumerBIC)) {
             throw new InvalidArgumentException("Parameter 'consumerBIC' must be of type string.");
         }
         if (!is_string($consumerName)) {
             throw new InvalidArgumentException("Parameter 'consumerName' must be of type string.");
         }
         if (!is_string($consumerIBAN)) {
             throw new InvalidArgumentException("Parameter 'consumerIBAN' must be of type string.");
         }
         if (!is_string($currency)) {
             throw new InvalidArgumentException("Parameter 'currency' must be of type string.");
         }
     }
     $this->acquirerID = $acquirerID;
     $this->amount = $amount;
     $this->consumerBIC = $consumerBIC;
     $this->consumerIBAN = $consumerIBAN;
     $this->consumerName = $consumerName;
     $this->currency = $currency;
     $this->status = $status;
     $this->statusTimestamp = $statusTimestamp;
     $this->transactionID = $transactionID;
 }