Ignore:
Timestamp:
Feb 20, 2014 3:03:59 AM (10 years ago)
Author:
anonymous
Message:

Completed integrating /branches/eli_branch into /trunk. Changes include:

  • Removed closing ?> from end of files
  • Upgrade old-style contructor methods to use construct() instead.
  • Class properties and methods defined as public, private, static or protected
  • Ensure code runs under E_ALL with only mysql_* deprecated warnings
  • Search for the '@' symbol anywhere it might be used to supress runtime errors, then replace with proper error recovery.
  • Run the php cli -l option to check files for syntax errors.
  • Bring tests up-to-date with latest version and methods of PHPUnit
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/lib/PayPal.inc.php

    r396 r468  
    3333
    3434    // General object parameters.
    35     var $_params = array(
     35    private $_params = array(
    3636        'paypal_url' => 'https://www.paypal.com/cgi-bin/webscr',
    3737        'test_mode' => false,
     
    3939
    4040    // Options used for specific buttons and links.
    41     var $_default_button_options = array();
     41    private $_default_button_options = array();
    4242
    4343    // Array of buttons created by newButton().
    44     var $_buttons = array();
     44    private $_buttons = array();
    4545
    4646    // Store the response from the last IPN.
    47     var $_ipn_response;
     47    private $_ipn_response;
    4848
    4949    /**
     
    5252     * @param   bool    $test_mode  Use PayPal sandbox for testing.
    5353     */
    54     function PayPal($test_mode=false)
     54    public function __construct($test_mode=false)
    5555    {
    5656        if ($test_mode) {
     
    9595     * @return  bool    True on success, false on failure.
    9696     */
    97     function setButtonDefaults($type, $options)
     97    public function setButtonDefaults($type, $options)
    9898    {
    9999        $app =& App::getInstance();
     
    127127     * @return  bool    True on success, false on failure.
    128128     */
    129     function newButton($type, $name, $options=null)
     129    public function newButton($type, $name, $options=null)
    130130    {
    131131        $app =& App::getInstance();
     
    162162     * @return  mixed   Link of button, or false on failure.
    163163     */
    164     function getLink($name)
     164    public function getLink($name)
    165165    {
    166166        $app =& App::getInstance();
     
    196196     * @param   string  $name   Name of button for which to generate link.
    197197     */
    198     function printLink($name)
     198    public function printLink($name)
    199199    {
    200200        echo $this->getLink($name);
     
    208208     * @param   string  $name   Name of button to print.
    209209     */
    210     function printButton($name)
     210    public function printButton($name)
    211211    {
    212212        ?>
     
    234234     * @param  array    $params     Array of parameters (key => val pairs).
    235235     */
    236     function setParam($params)
     236    public function setParam($params)
    237237    {
    238238        $app =& App::getInstance();
     
    253253     * @return mixed               Configured parameter value.
    254254     */
    255     function getParam($param)
     255    public function getParam($param)
    256256    {
    257257        $app =& App::getInstance();
     
    272272     * @return  bool    True if valid, false if invalid.
    273273     */
    274     function incomingIPNRequest()
     274    public function incomingIPNRequest()
    275275    {
    276276        if ($_SERVER['REQUEST_METHOD'] == 'POST'
     
    290290     * @return  bool    True on success, false on failure.
    291291     */
    292     function processIPN()
     292    public function processIPN()
    293293    {
    294294        $app =& App::getInstance();
     
    351351     * @return  bool    True if response contains VERIFIED, false otherwise.
    352352     */
    353     function verifiedIPN()
     353    public function verifiedIPN()
    354354    {
    355355        $app =& App::getInstance();
     
    380380} // End of class.
    381381
    382 ?>
Note: See TracChangeset for help on using the changeset viewer.