Changeset 316 for trunk/lib/AuthorizeNet.inc.php
- Timestamp:
- Mar 12, 2008 1:47:19 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/AuthorizeNet.inc.php
r250 r316 42 42 43 43 var $post_url = ''; // The URL to post data to. 44 var $md5_hash_value = ','; // A custom value for the response delimination character.45 44 var $_results = array(); 46 45 var $_params = array(); … … 57 56 'x_delim_char' => ',', 58 57 'x_encap_char' => '', 58 'md5_hash_salt' => '', 59 59 ); 60 60 … … 111 111 function AuthorizeNet($params = array()) 112 112 { 113 $app =& App::getInstance(); 114 113 115 if (!function_exists('curl_init')) { 114 116 trigger_error('AuthorizeNet error: curl not installed.', E_USER_ERROR); … … 118 120 $this->post_url = isset($params['post_url']) ? $params['post_url'] : 'https://secure.authorize.net/gateway/transact.dll'; 119 121 120 // A custom value for the response delimination character.121 $this->md5_hash_value = isset($params['md5_hash_value']) ? $params['md5_hash_value'] : '';122 123 122 // Set default parameters. 124 123 $this->_params = $this->_default_params; 124 125 $this->setParam(array('md5_hash_salt' => $app->getParam('signing_key'))); 125 126 } 126 127 … … 239 240 return ( 240 241 mb_strtolower($this->getResult('x_md5_hash')) == mb_strtolower(md5( 241 $this-> md5_hash_value.242 $this->getParam('md5_hash_salt') . 242 243 $this->getParam('x_login') . 243 244 $this->getResult('x_trans_id') .
Note: See TracChangeset
for help on using the changeset viewer.