summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d06eb2c)
Changed the path for fetching the values, from dynamic
$this->_getParam('user_name');
to static path:
$this->_paymentProcessor['user_name'];
Also changed calls to self::$value to $this->value, following upstream.
* @static
* @var string
*/
* @static
* @var string
*/
- static protected $_mode = NULL;
+ protected $_mode = NULL;
/**
* The array of params cooked and passed to the TC API via tc_link().
* @static
* @var array
*/
/**
* The array of params cooked and passed to the TC API via tc_link().
* @static
* @var array
*/
- static protected $_params = array();
+ protected $_params = array();
/**
* We only need one instance of this object. So we use the singleton
/**
* We only need one instance of this object. So we use the singleton
* @return void
*/
function __construct($mode, &$paymentProcessor) {
* @return void
*/
function __construct($mode, &$paymentProcessor) {
$this->_paymentProcessor = $paymentProcessor;
$this->_paymentProcessor = $paymentProcessor;
$amount = $this->_getParam('amount');
}
$fields = array();
$amount = $this->_getParam('amount');
}
$fields = array();
- $fields['custid'] = $this->_getParam('user_name');
- $fields['password'] = $this->_getParam('password');
+
+ $fields['custid'] = $this->_paymentProcessor['user_name'];
+ $fields['password'] = $this->_paymentProcessor['password'];
+
$fields['action'] = 'sale';
// Enable address verification
$fields['action'] = 'sale';
// Enable address verification
$exp_year = substr($this->_getParam('year'),-2);
$fields['exp'] = "$exp_month$exp_year";
$exp_year = substr($this->_getParam('year'),-2);
$fields['exp'] = "$exp_month$exp_year";
- if (self::$_mode != 'live') {
+ if ($this->_mode != 'live') {
$fields['demo'] = 'y';
}
return $fields;
$fields['demo'] = 'y';
}
return $fields;
* not set
*/
function _getParam($field) {
* not set
*/
function _getParam($field) {
- return CRM_Utils_Array::value($field, self::$_params, '');
+ $value = CRM_Utils_Array::value($field, $this->_params, '');
+ if ($xmlSafe) {
+ $value = str_replace(array('&', '"', "'", '<', '>'), '', $value);
+ }
+ return $value;
- self::$_params[$field] = $value;
+ $this->_params[$field] = $value;