Example #1
0
 /**
  * Set URL for card remove [RFC1738 valid]
  *
  * @uses SagepayValid::url Validate URL field
  * @param string $removeUrl
  */
 public function setRemoveUrl($removeUrl)
 {
     if (SagepayValid::url($removeUrl))
     {
         $this->_removeUrl = $removeUrl;
     }
 }
 /**
  * Set vpsDirectUrl
  *
  * @uses SagepayValid::url Validate URL field
  * @param string $vpsDirectUrl
  */
 public function setVpsDirectUrl($vpsDirectUrl)
 {
     if (SagepayValid::url($vpsDirectUrl)) {
         $this->_vpsDirectUrl = $vpsDirectUrl;
     }
 }
Example #3
0
 /**
  * Set ID of the seller if using a phone payment.
  *
  * @param string $agentId
  */
 public function setAgentId($agentId)
 {
     if (SagepayValid::regex($agentId, '/^[a-zA-Z0-9\ ]{1,16}$/'))
     {
         $this->_agentId = $agentId;
     }
 }
 /**
  * Validate Zip Code for UK only
  *
  * @param string $value
  *
  * @return boolean
  */
 public function notEmptyZipCodeUK($value)
 {
     if ($this->_country == 'GB')
     {
         return SagepayValid::notEmpty($value);
     }
     return true;
 }
Example #5
0
 /**
  * Set reference to the website this transaction came from.
  *
  * @param type $website
  */
 public function setWebsite($website)
 {
     if (!empty($website) && SagepayValid::url($website))
     {
         $this->_website = $website;
     }
     else
     {
         trigger_error("Invalid Website URL value, email format expected, '" . $website . "' given", E_USER_WARNING);
     }
 }