<commit_before><?php
require_once 'Payment/Process2/Exception.php';
require_once 'Payment/Process2/Common.php';
/**
 * Payment_Process2_Result
 *
 * The core result class that should be returned from each driver's process()
 * function. This should be exte33nded as Payment_Process2_Result_DriverName and
 * then have the appropriate fields mapped out accordingly.
 *
 * Take special care to appropriately create a parse() function in your result
 * class. You can then call _mapFields() with a resultArray (ie. exploded
 * result) to map your results from parse() into the member variables.
 *
 * Please note that this class keeps your original codes intact so they can
 * be accessed directly and then uses the function wrappers to return uniform
 * Payment_Process codes.
 *
 * @category Payment
 * @package  Payment_Process
 * @author   <NAME> <<EMAIL>>
 * @license  http://www.opensource.org/licenses/bsd-license.php BSD License
 * @version  Release: @package_version@
 * @link     http://pear.php.net/package/Payment_Process
 */
class Payment_Process2_Result
{
    /**
     * Processor instance which this result was instantiated from.
     *
     * This should contain a reference to the requesting Processor.
     *
     * @author <NAME> <<EMAIL>>
     * @access private
     * @var    Object
     */
    var $_request;

    /**
     * The raw response
     *
     * @author <NAME> <<EMAIL>>
     * @access protected
     * @var    string  $_rawResponse
     */
    var $_rawResponse = null;

    /**
     * The approval/decline code
     *
     * The value returned by your gateway as approved/declined should be mapped
     * into this variable. Valid results should then be mapped into the
     * appropriate PAYMENT_PROCESS2_RESULT_* code using the $_statusCodeMap
     * array. Values returned into $code should be mapped as keys in the map
     * with PAYMENT_PROCESS2_RESULT_* as the values.
     *
     * @author  <NAME> <<EMAIL>.net>
     * @access  public
     * @var     mixed  $code
     * @see    PAYMENT_PROCESS2_RESULT_APPROVED, PAYMENT_PROCESS2_RESULT_DECLINED
     * @see    PAYMENT_PROCESS2_RESULT_OTHER, $_statusCodeMap
     */
    var $code;

    /**
     * Message/Response Code
     *
     * Along with the response (yes/no) you usually get a response/message
     * code that translates into why it was approved/declined. This is where
     * you map that code into. Your $_statusCodeMessages would then be keyed by
     * valid messageCode values.
     *
     * @author  <NAME> <<EMAIL>>
     * @access  public
     * @var     mixed  $messageCode
     * @see     $_statusCodeMessages
     */
    var $messageCode;

    /**
     * Message from gateway
     *
     * Map the textual message from the gateway into this variable. It is not
     * currently returned or used (in favor of the $_statusCodeMessages map, but
     * can be accessed directly for debugging purposes.
     *
     * @author  <NAME> <<EMAIL>>
     * @access  public
     * @var     string   $message
     * @see     $_statusCodeMessages
     */
    var $message = 'No message from gateway';

    /**
     * Authorization/Approval code
     *
     * @author  <NAME> <<EMAIL>>
     * @access  public
     * @var     string  $approvalCode
     */
    var $approvalCode;

    /**
     * Address verification code
     *
     * The AVS code returned from your gateway. This should then be mapped to
     * the appropriate PAYMENT_PROCESS2_AVS_* code using $_avsCodeMap. This value
     * should also be mapped to the appropriate textual message via the
     * $_avsCodeMessages array.
     *
     * @author  <NAME> <<EMAIL>>
     * @access  public
     * @var     string  $avsCode
     * @see     PAYMENT_PROCESS2_AVS_MISMATCH, PAYMENT_PROCESS2_AVS_ERROR
     * @see     PAYMENT_PROCESS2_AVS_MATCH, PAYMENT_PROCESS2_AVS_NOAPPLY, $_avsCodeMap
     * @see     $_avsCodeMessages<commit_msg>Don't pre-define a message in the core result driver<commit_after><?php
require_once 'Payment/Process2/Exception.php';
require_once 'Payment/Process2/Common.php';
/**
 * Payment_Process2_Result
 *
 * The core result class that should be returned from each driver's process()
 * function. This should be exte33nded as Payment_Process2_Result_DriverName and
 * then have the appropriate fields mapped out accordingly.
 *
 * Take special care to appropriately create a parse() function in your result
 * class. You can then call _mapFields() with a resultArray (ie. exploded
 * result) to map your results from parse() into the member variables.
 *
 * Please note that this class keeps your original codes intact so they can
 * be accessed directly and then uses the function wrappers to return uniform
 * Payment_Process codes.
 *
 * @category Payment
 * @package  Payment_Process
 * @author   <NAME> <<EMAIL>>
 * @license  http://www.opensource.org/licenses/bsd-license.php BSD License
 * @version  Release: @package_version@
 * @link     http://pear.php.net/package/Payment_Process
 */
class Payment_Process2_Result
{
    /**
     * Processor instance which this result was instantiated from.
     *
     * This should contain a reference to the requesting Processor.
     *
     * @author <NAME> <<EMAIL>>
     * @access private
     * @var    Object
     */
    var $_request;

    /**
     * The raw response
     *
     * @author <NAME> <<EMAIL>>
     * @access protected
     * @var    string  $_rawResponse
     */
    var $_rawResponse = null;

    /**
     * The approval/decline code
     *
     * The value returned by your gateway as approved/declined should be mapped
     * into this variable. Valid results should then be mapped into the
     * appropriate PAYMENT_PROCESS2_RESULT_* code using the $_statusCodeMap
     * array. Values returned into $code should be mapped as keys in the map
     * with PAYMENT_PROCESS2_RESULT_* as the values.
     *
     * @author  <NAME> <<EMAIL>>
     * @access  public
     * @var     mixed  $code
     * @see    PAYMENT_PROCESS2_RESULT_APPROVED, PAYMENT_PROCESS2_RESULT_DECLINED
     * @see    PAYMENT_PROCESS2_RESULT_OTHER, $_statusCodeMap
     */
    var $code;

    /**
     * Message/Response Code
     *
     * Along with the response (yes/no) you usually get a response/message
     * code that translates into why it was approved/declined. This is where
     * you map that code into. Your $_statusCodeMessages would then be keyed by
     * valid messageCode values.
     *
     * @author  <NAME> <<EMAIL>>
     * @access  public
     * @var     mixed  $messageCode
     * @see     $_statusCodeMessages
     */
    var $messageCode;

    /**
     * Message from gateway
     *
     * Map the textual message from the gateway into this variable. It is not
     * currently returned or used (in favor of the $_statusCodeMessages map, but
     * can be accessed directly for debugging purposes.
     *
     * @author  <NAME> <<EMAIL>>
     * @access  public
     * @var     string   $message
     * @see     $_statusCodeMessages
     */
    var $message;

    /**
     * Authorization/Approval code
     *
     * @author  <NAME> <<EMAIL>>
     * @access  public
     * @var     string  $approvalCode
     */
    var $approvalCode;

    /**
     * Address verification code
     *
     * The AVS code returned from your gateway. This should then be mapped to
     * the appropriate PAYMENT_PROCESS2_AVS_* code using $_avsCodeMap. This value
     * should also be mapped to the appropriate textual message via the
     * $_avsCodeMessages array.
     *
     * @author  <NAME> <<EMAIL>>
     * @access  public
     * @var     string  $avsCode
     * @see     PAYMENT_PROCESS2_AVS_MISMATCH, PAYMENT_PROCESS2_AVS_ERROR
     * @see     PAYMENT_PROCESS2_AVS_MATCH, PAYMENT_PROCESS2_AVS_NOAPPLY, $_avsCodeMap
     * @see     $_avsCodeMessages
{'fraction_non_alphanumeric': 0.08308681672025724, 'fraction_numerical': 0.004372990353697749, 'mean_word_length': 2.6818181818181817, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7527970', 'n_tokens_mistral': 2288, 'n_tokens_neox': 2241, 'n_words': 771}