Helix Installation   Getting Started   Reference Documentation   Global Functions   Quick Start
ModulesClassesFunctions
 

Class Reference

class paypal extends obj

Helix obj paypal
Hide Inherited MembersE-Commerce
Description
No description.
 
Constants
No constants.
 
Properties
protected_dirty[ obj ]
publicfields[ paypal ]
protected_gateway_url[ paypal ]
publicproperty_objects_array[ obj ]
publicresponse[ paypal ]
 
Methods
public__construct ( )[ paypal ]
Parameters
No parameters for this method
Code
008  public function __construct()
009  {
010      $this->_gateway_url = "https://www.paypal.com/cgi-bin/webscr";
011     
012      $this->fields["cmd"] = new paypal_field("cmd",null,true,null);
013      $this->fields["notify_url"] = new paypal_field("notify_url",null,false,null);
014      $this->fields["amount"] = new paypal_field("amount",null,false,null);
015      $this->fields["item_name"] = new paypal_field("item_name",null,true,null);
016      $this->fields["item_number"] = new paypal_field("item_number",null,false,null);
017      $this->fields["quantity"] = new paypal_field("quantity",null,false,null);
018      $this->fields["undefined_quantity"] = new paypal_field("undefined_quantity",null,false,null);
019      $this->fields["on0"] = new paypal_field("on0",null,false,null);
020      $this->fields["on1"] = new paypal_field("on1",null,false,null);
021      $this->fields["os0"] = new paypal_field("os0",null,false,null);
022      $this->fields["os1"] = new paypal_field("os1",null,false,null);
023      $this->fields["add"] = new paypal_field("add",null,false,null);
024      $this->fields["display"] = new paypal_field("display",null,false,null);
025      $this->fields["cancel_return"] = new paypal_field("cancel_return",null,false,null);
026      $this->fields["cbt"] = new paypal_field("cbt",null,false,null);
027      $this->fields["cn"] = new paypal_field("cn",null,false,null);
028      $this->fields["cpp_header_image"] = new paypal_field("cpp_header_image",null,false,null);
029      $this->fields["cpp_headerback_color"] = new paypal_field("cpp_headerback_color",null,false,null);
030      $this->fields["cpp_headerborder_color"] = new paypal_field("cpp_headerborder_color",null,false,null);
031      $this->fields["cpp_payflow_color"] = new paypal_field("cpp_payflow_color",null,false,null);
032      $this->fields["cs"] = new paypal_field("cs",null,false,null);
033      $this->fields["image_url"] = new paypal_field("image_url",null,false,null);
034      $this->fields["no_note"] = new paypal_field("no_note",null,false,null);
035      $this->fields["no_shipping"] = new paypal_field("no_shipping",null,false,null);
036      $this->fields["page_style"] = new paypal_field("page_style",null,false,null);
037      $this->fields["return"] = new paypal_field("",null,false,null);
038      $this->fields["shopping_url"] = new paypal_field("",null,false,null);
039      $this->fields["rm"] = new paypal_field("",null,false,null);
040      $this->fields["address_override"] = new paypal_field("",null,false,null);
041      $this->fields["currency_code"] = new paypal_field("",null,false,null);
042      $this->fields["custom"] = new paypal_field("",null,false,256);
043      $this->fields["handling"] = new paypal_field("",null,false,null);
044      $this->fields["invoice"] = new paypal_field("",null,false,127);
045      $this->fields["shipping"] = new paypal_field("",null,false,null);
046      $this->fields["shipping2"] = new paypal_field("",null,false,null);
047      $this->fields["tax"] = new paypal_field("",null,false,null);
048      $this->fields["tax_cart"] = new paypal_field("",null,false,null);
049      $this->fields["amount"] = new paypal_field("",null,true,null);
050      $this->fields["business"] = new paypal_field("",null,true,null);
051      $this->fields["handling_cart"] = new paypal_field("",null,false,null);
052      $this->fields["paymentaction"] = new paypal_field("",null,false,null);
053      $this->fields["upload"] = new paypal_field("",null,false,null);
054      $this->fields["address1"] = new paypal_field("",null,false,null);
055      $this->fields["address2"] = new paypal_field("",null,false,null);
056      $this->fields["city"] = new paypal_field("",null,false,null);
057      $this->fields["country"] = new paypal_field("",null,false,null);
058      $this->fields["first_name"] = new paypal_field("",null,false,null);
059      $this->fields["last_name"] = new paypal_field("",null,false,null);
060      $this->fields["lc"] = new paypal_field("",null,false,null);
061      $this->fields["night_phone_a"] = new paypal_field("",null,false,null);
062      $this->fields["night_phone_b"] = new paypal_field("",null,false,null);
063      $this->fields["night_phone_c"] = new paypal_field("",null,false,null);
064      $this->fields["state"] = new paypal_field("",null,false,null);
065      $this->fields["zip"] = new paypal_field("",null,false,null);
066      $this->fields["business_address1"] = new paypal_field("",null,false,null);
067      $this->fields["business_address2"] = new paypal_field("",null,false,null);
068      $this->fields["business_city"] = new paypal_field("",null,false,null);
069      $this->fields["business_state"] = new paypal_field("",null,false,null);
070      $this->fields["business_zip"] = new paypal_field("",null,false,null);
071      $this->fields["business_country"] = new paypal_field("",null,false,null);
072      $this->fields["business_cs_email"] = new paypal_field("",null,false,null);
073      $this->fields["business_cs_phone_a"] = new paypal_field("",null,false,null);
074      $this->fields["business_cs_phone_b"] = new paypal_field("",null,false,null);
075      $this->fields["business_cs_phone_c"] = new paypal_field("",null,false,null);
076      $this->fields["business_url"] = new paypal_field("",null,false,null);
077      $this->fields["business_night_phone_a"] = new paypal_field("",null,false,null);
078      $this->fields["business_night_phone_b"] = new paypal_field("",null,false,null);
079      $this->fields["business_night_phone_c"] = new paypal_field("",null,false,null);
080  }
public__get ( p )[ obj ]
Parameters
requiredp
Code
007  public function __get($p)
008  {
009      $methods = get_class_methods($this);
010      $properties = get_object_vars($this);
011      if (in_array("get_$p",$methods))
012      {
013          return $this->{"get_$p"}();
014      }
015      else if (array_key_exists("_$p",$properties))
016      {
017          return $this->{"_$p"};
018      }
019      else if (in_array("get_" . substr($p,strpos($p,"_")+1), $methods))
020      {
021          return $this->{"get_" . substr($p,strpos($p,"_")+1)}(substr($p,0,strpos($p,"_")));
022      }
023      else
024      {
025          trigger_error("This object [" . get_class($this) . ":$this->id] has no private property '_$p' for the requested public property '$p'",E_USER_WARNING);
026          return null;
027      }
028  }
publicget_array ( )[ obj ]
Parameters
No parameters for this method
Code
096  public function get_array()
097  {
098      return get_object_vars($this);
099  }
publicget_classname ( )[ obj ]
Parameters
No parameters for this method
Code
086  public function get_classname()
087  {
088      return get_class($this);
089  }
publicget_dirty ( )[ obj ]
Parameters
No parameters for this method
Code
063  public function get_dirty()
064  {
065      if ($this->id === 0)
066      {
067          $this->_dirty = true;
068      }
069      else
070      {
071          foreach (get_object_vars($this) as $k=>$v)
072          {
073              if ($this->_dirty)
074              {
075                  break;
076              }
077              if (preg_match('/_dirty$/',$k))
078              {
079                  $this->_dirty = $this->_dirty || $v;
080              }
081          }
082      }
083      return $this->_dirty;
084  }
publicget_json ( )[ obj ]
Parameters
No parameters for this method
Code
101  public function get_json()
102  {
103      $class = new ReflectionClass($this->classname);
104      $methods = $class->getMethods();
105      usort($methods,"sort_reflection_objects");
106      $accessors = array();
107      foreach ($methods as $index=>$method)
108      {
109          $declarer = $method->getDeclaringClass()->name;
110          if (preg_match('/^(get|set|)_(.+)$/',$method->name,$matches))
111          {
112              $accessor = $matches[2];
113              $getset = $matches[1];
114              eval("\$accessors[\$accessor] = \$this->".$accessor.";");
115          }
116      }
117      //return json_encode($this->get_array());
118      return json_encode($accessors);
119  }
publicget_properties ( )[ obj ]
Parameters
No parameters for this method
Code
121  public function get_properties()
122  {
123      return array_keys($this->array);
124  }
protectedget_string ( )[ obj ]
Parameters
No parameters for this method
Code
091  protected function get_string()
092  {
093      return method_exists($this,"__toString") ? $this->__toString() : null;
094  }
publicprocess ( )[ paypal ]
Parameters
No parameters for this method
Code
082  public function process()
083  {
084  }
public__set ( p , v )[ obj ]
Parameters
requiredp
requiredv
Code
030  public function __set($p,$v)
031  {
032      $methods = get_class_methods($this);
033      $properties = get_object_vars($this);
034      if (in_array("set_$p",$methods))
035      {
036          $this->{"set_$p"}($v);
037      }
038      else if (array_key_exists("_$p",$properties))
039      {
040          if (!preg_match('/_dirty$/',$p) && property_exists($this,"_{$p}_dirty"))
041          {
042              if (is_object($this->{"_$p"}))
043              {
044                  $this->{"_$p"}->dirty = true;
045              }
046              else
047              {
048                  $this->{"_{$p}_dirty"} = $this->{$p}==$v ? false : true;
049              }
050          }
051          $this->{"_$p"} = $v;
052      }
053      else if (in_array("set_" . substr($p,strpos($p,"_")+1), $methods))
054      {
055          $this->{"set_" . substr($p,strpos($p,"_")+1)}($v,substr($p,0,strpos($p,"_")));
056      }
057      else
058      {
059          trigger_error("This object [" . get_class($this) . ":$this->id] has no private property '_$p' for the requested public property '$p'",E_USER_WARNING);
060      }
061  }
 
Accessors
publicarray[ obj ]
Code
096  public function get_array()
097  {
098      return get_object_vars($this);
099  }
publicclassname[ obj ]
Code
086  public function get_classname()
087  {
088      return get_class($this);
089  }
publicdirty[ obj ]
Code
063  public function get_dirty()
064  {
065      if ($this->id === 0)
066      {
067          $this->_dirty = true;
068      }
069      else
070      {
071          foreach (get_object_vars($this) as $k=>$v)
072          {
073              if ($this->_dirty)
074              {
075                  break;
076              }
077              if (preg_match('/_dirty$/',$k))
078              {
079                  $this->_dirty = $this->_dirty || $v;
080              }
081          }
082      }
083      return $this->_dirty;
084  }
publicjson[ obj ]
Code
101  public function get_json()
102  {
103      $class = new ReflectionClass($this->classname);
104      $methods = $class->getMethods();
105      usort($methods,"sort_reflection_objects");
106      $accessors = array();
107      foreach ($methods as $index=>$method)
108      {
109          $declarer = $method->getDeclaringClass()->name;
110          if (preg_match('/^(get|set|)_(.+)$/',$method->name,$matches))
111          {
112              $accessor = $matches[2];
113              $getset = $matches[1];
114              eval("\$accessors[\$accessor] = \$this->".$accessor.";");
115          }
116      }
117      //return json_encode($this->get_array());
118      return json_encode($accessors);
119  }
publicproperties[ obj ]
Code
121  public function get_properties()
122  {
123      return array_keys($this->array);
124  }
publicstring[ obj ]
Code
091  protected function get_string()
092  {
093      return method_exists($this,"__toString") ? $this->__toString() : null;
094  }
Get Helix PHP Framework at SourceForge.net. Fast, secure and Free Open Source software downloads