AAAAPK dž?\
index.htmlnu W+A„¶ PK dž?\²xZ*M M 2co_listener.ctpnu W+A„¶
Header(array('settings' => 'Settings', 'help' => 'Help'), '2co_listener_config_{n}'); ?>
tabStart('settings'); ?>
input('action_2co_listener_{n}_sid_config', array('type' => 'text', 'label' => "Vendor/Seller ID", 'class' => 'medium_input', 'smalldesc' => 'Enter your 2CO Vendor ID here')); ?>
input('action_2co_listener_{n}_secret_config', array('type' => 'text', 'label' => "Secret Word", 'class' => 'medium_input', 'smalldesc' => 'The secret word choosen by the vendor in their 2CO account, used to verify that the response is coming from 2CO')); ?>
tabEnd(); ?>
tabStart('help'); ?>
- This plugin will process the INS response coming from the 2CO server, you must be a registered 2CO vendor in order to be able to use this one.
- enter your Vendor id and the secret word choosen by the vendor at the 2CO account area.
- All the data returned will be stored in the $form->data array
- For more documentation about the 2CO parameters, please search the 2CO website for "INS".
tabEnd(); ?>
PK dž?\èñ¬9Q Q 2co_listener.phpnu W+A„¶ 'payments', 'title' => 'Payment Gateways/Processors');
var $events = array('hack' => 0, 'new_order' => 0, 'fraud_status' => 0, 'refund' => 0, 'other' => 0);
var $details = array('title' => '2CO Listener', 'tooltip' => 'Get the response from the 2CO payment processor.');
function run($form, $actiondata){
$params = new JParameter($actiondata->params);
$mainframe = JFactory::getApplication();
$vendorid = $params->get('sid');
$secretword = $params->get('secret');
$md5hash = strtoupper(md5($form->data['sale_id'].$vendorid.$form->data['invoice_id'].$secretword));
//if the hash is ok
if($md5hash == $form->data['md5_hash']){
//switch messages types
switch($form->data['message_type']){
case 'ORDER_CREATED':
$this->events['new_order'] = 1;
break;
case 'FRAUD_STATUS_CHANGED':
$this->events['fraud_status'] = 1;
break;
case 'REFUND_ISSUED':
$this->events['refund'] = 1;
break;
default:
$this->events['other'] = 1;
break;
}
}else{
//$this->events['hack'] = 1;
}
}
function load($clear){
if($clear){
$action_params = array(
'sid' => '',
'secret' => ''
);
}
return array('action_params' => $action_params);
}
}
?>PK dž?\®)ÕÐ .htaccessnu W+A„¶