<commit_before><?php
/**
 * DPS interface and associated exceptions
 * 
 * For usage instructions see:
 *   http://blog.phpdeveloper.co.nz/2006/10/27/easy-dps-payment-express-interface-for-php/
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation; either version 2.1 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 * @author <NAME> <<EMAIL>>
 * @copyright 2005, 2006 Nerds Inc. Limited http://www.nerdsinc.co.nz/
 * @license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License
 * @package DPS
 * @version 5
 */

/**
 * Credit card processing class for DPS PXPost gateway
 *
 * @author <NAME> <<EMAIL>>
 * @copyright 2005, 2006 Nerds Inc. Limited http://www.nerdsinc.co.nz/
 * @uses PEAR::HTTP_Request, PHP compiled with OpenSSL
 * @todo Status
 * @todo Auth/Complete
 * @todo Refund
 */
class DPSPXPost
{

  /**
   * The username for the DPS account
   *
   * @var string
   */
  private $post_username;

  /**
   * The password for the DPS account
   *
   * @var string
   */
  private $post_password;

  /**
   * The XML result string from the transaction
   *
   * @var string
   */
  private $dps_response;

  /**
   * The URL to the PXPost service
   * @var string
   */
  private $dps_url;

  /**
   * The request elements to be sent to DPS
   *
   * @var array
   */
  private $request_elements = array();

  /**
   * String for debug information if necessary
   *
   * @var string
   */
  private $debug_log;

  /**
   * Debug mode on or off
   *
   * @var bool
   */
  private $debug = false;

  /**
   * Constructor for DPS PXPost
   * @param string $post_username The DPS PXPost account username
   * @param string $post_password The DPS PXPost account password
   */
  public function __construct ($post_username, $post_password)
  {
    $this->post_username = $post_username;
    $this->post_password = $<PASSWORD>;

    $this->dps_url       = 'https://www.paymentexpress.com/pxpost.aspx';

    $this->clearRequestElements();
  }

  /**
   * Executes a DPS PXPost request and returns parsed response data
   *
   * @return array The keyed response data
   */
  private function execute ()<commit_msg>Update to DPS URL. The old URL expires August 2011 so update your sites.<commit_after><?php
/**
 * DPS interface and associated exceptions
 * 
 * For usage instructions see:
 *   http://blog.phpdeveloper.co.nz/2006/10/27/easy-dps-payment-express-interface-for-php/
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation; either version 2.1 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 * @author <NAME> <<EMAIL>>
 * @copyright 2005, 2006 Nerds Inc. Limited http://www.nerdsinc.co.nz/
 * @license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License
 * @package DPS
 * @version 5
 */

/**
 * Credit card processing class for DPS PXPost gateway
 *
 * @author <NAME> <<EMAIL>>
 * @copyright 2005, 2006 Nerds Inc. Limited http://www.nerdsinc.co.nz/
 * @uses PEAR::HTTP_Request, PHP compiled with OpenSSL
 * @todo Status
 * @todo Auth/Complete
 * @todo Refund
 */
class DPSPXPost
{

  /**
   * The username for the DPS account
   *
   * @var string
   */
  private $post_username;

  /**
   * The password for the DPS account
   *
   * @var string
   */
  private $post_password;

  /**
   * The XML result string from the transaction
   *
   * @var string
   */
  private $dps_response;

  /**
   * The URL to the PXPost service
   * @var string
   */
  private $dps_url;

  /**
   * The request elements to be sent to DPS
   *
   * @var array
   */
  private $request_elements = array();

  /**
   * String for debug information if necessary
   *
   * @var string
   */
  private $debug_log;

  /**
   * Debug mode on or off
   *
   * @var bool
   */
  private $debug = false;

  /**
   * Constructor for DPS PXPost
   * @param string $post_username The DPS PXPost account username
   * @param string $post_password The DPS PXPost account password
   */
  public function __construct ($post_username, $post_password)
  {
    $this->post_username = $post_username;
    $this->post_password = $<PASSWORD>;

    $this->dps_url       = 'https://sec.paymentexpress.com/pxpost.aspx';

    $this->clearRequestElements();
  }

  /**
   * Executes a DPS PXPost request and returns parsed response data
   *
   * @return array The keyed response data
   */
  private function execute ()
{'fraction_non_alphanumeric': 0.10191310566779903, 'fraction_numerical': 0.014303593777936706, 'mean_word_length': 3.007163323782235, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 25, 'https://': 2, 'lorem ipsum': 0, 'www.': 5, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1663857', 'n_tokens_mistral': 1771, 'n_tokens_neox': 1663, 'n_words': 623}