Ignore:
Timestamp:
Mar 12, 2008 1:47:19 AM (16 years ago)
Author:
quinn
Message:

Minor improvements to module maker scripts. Minor AuthorizeNet? change.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/AuthorizeNet.inc.php

    r250 r316  
    4242
    4343    var $post_url = ''; // The URL to post data to.
    44     var $md5_hash_value = ','; // A custom value for the response delimination character.
    4544    var $_results = array();
    4645    var $_params = array();
     
    5756        'x_delim_char'      => ',',
    5857        'x_encap_char'      => '',
     58        'md5_hash_salt'    => '',
    5959    );
    6060
     
    111111    function AuthorizeNet($params = array())
    112112    {
     113        $app =& App::getInstance();
     114
    113115        if (!function_exists('curl_init')) {
    114116            trigger_error('AuthorizeNet error: curl not installed.', E_USER_ERROR);
     
    118120        $this->post_url = isset($params['post_url']) ? $params['post_url'] : 'https://secure.authorize.net/gateway/transact.dll';
    119121
    120         // A custom value for the response delimination character.
    121         $this->md5_hash_value = isset($params['md5_hash_value']) ? $params['md5_hash_value'] : '';
    122 
    123122        // Set default parameters.
    124123        $this->_params = $this->_default_params;
     124       
     125        $this->setParam(array('md5_hash_salt' => $app->getParam('signing_key')));
    125126    }
    126127
     
    239240        return (
    240241            mb_strtolower($this->getResult('x_md5_hash')) == mb_strtolower(md5(
    241                 $this->md5_hash_value .
     242                $this->getParam('md5_hash_salt') .
    242243                $this->getParam('x_login') .
    243244                $this->getResult('x_trans_id') .
Note: See TracChangeset for help on using the changeset viewer.