Spade
Mini Shell
| Directory:~$ /home/lmsyaran/public_html/joomla4/ |
| [Home] [System Details] [Kill Me] |
PK3�[,G�==creditcard.phpnu�[���<?php
/**
* @package HikaShop for Joomla!
* @version 4.4.1
* @author hikashop.com
* @copyright (C) 2010-2021 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><?php
class plgHikashoppaymentCreditcard extends hikashopPaymentPlugin
{
var $multiple = true;
var $name = 'creditcard';
var $pluginConfig = array(
'order_status' => array('ORDER_STATUS',
'orderstatus'),
'status_notif_email' =>
array('ORDER_STATUS_NOTIFICATION',
'boolean','0'),
'ask_ccv' => array('CARD_VALIDATION_CODE',
'boolean','1'),
'ask_owner' => array('CREDIT_CARD_OWNER',
'boolean','0'),
'ask_cctype' => array('CARD_TYPE',
'big-textarea'),
'information' => array('CREDITCARD_INFORMATION',
'wysiwyg'),
'return_url' => array('RETURN_URL',
'input'),
);
function needCC(&$method) {
if(@$_GET['option']=='com_hikashop'&&@$_GET['ctrl']=='order'&&@$_GET['task']=='pay')
return false;
$method->ask_cc=true;
$method->ask_ccv = @$method->payment_params->ask_ccv;
$method->ask_owner = @$method->payment_params->ask_owner;
$method->ask_cctype = @$method->payment_params->ask_cctype;
if(!empty($method->ask_cctype)){
$types = explode(',',$method->ask_cctype);
$method->ask_cctype = array();
foreach($types as $type){
$method->ask_cctype[$type]=$type;
}
}
return true;
}
function onBeforeOrderCreate(&$order,&$do){
if(parent::onBeforeOrderCreate($order, $do) === true)
return true;
$this->ccLoad();
if($order->order_payment_method=='creditcard'){
$order->credit_card_info = $this;
$obj = new stdClass();
$obj->cc_number=substr($this->cc_number,0,8);
$obj->cc_month=$this->cc_month;
$obj->cc_year=$this->cc_year;
$obj->cc_type=@$this->cc_type;
$history = new stdClass();
$history->type = 'credit card';
$history->notified = 0;
$history->data = base64_encode(serialize($obj));
$this->modifyOrder($order,$this->payment_params->order_status,$history,false);
}
}
function onHistoryDisplay(&$histories){
foreach($histories as $k => $history){
if($history->history_payment_method == $this->name &&
!empty($history->history_data)){
$data =
hikashop_unserialize(base64_decode($history->history_data));
$string='';
if(!empty($data->cc_type)){
$string.= JText::_('CARD_TYPE').':
'.$data->cc_type.'<br />';
}
$string.= JText::_('DATE').':
'.$data->cc_month.'/'.$data->cc_year.'<br
/>';
$string.= JText::_('BEGINNING_OF_CREDIT_CARD_NUMBER').':
'.$data->cc_number.'<br />';
$string.='<a
href="'.hikashop_completeLink('order&task=remove_history_data&history_id='.$history->history_id).'"><img
src="'.HIKASHOP_IMAGES.'delete.png"
/></a>';
$histories[$k]->history_data = $string;
static $done = false;
if(!$done){
$done = true;
$app = JFactory::getApplication();
$app->enqueueMessage(JText::_('CREDITCARD_WARNING'));
}
}
}
}
function onAfterOrderConfirm(&$order,&$methods,$method_id){
$method =& $methods[$method_id];
if($order->order_status !=
$method->payment_params->order_status)
$this->modifyOrder($order->order_id,
$method->payment_params->order_status,
@$method->payment_params->status_notif_email, false);
$this->removeCart = true;
$this->information = $method->payment_params->information;
if(preg_match('#^[a-z0-9_]*$#i',$this->information)){
$this->information = JText::_($this->information);
}
return $this->showPage('end');
}
function getPaymentDefaultValues(&$element) {
$element->payment_name='Credit card';
$element->payment_description='You can pay by credit
card.';
$element->payment_images='MasterCard,VISA,Credit_card,American_Express';
$element->payment_params->information='We will now process the
credit card transaction and contact you when completed.';
$element->payment_params->order_status='created';
$element->payment_params->ask_ccv = true;
$element->payment_params->ask_owner = false;
$element->payment_params->ask_cctype = '';
}
}
PK3�[�����creditcard.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<extension type="plugin" version="2.5"
method="upgrade" group="hikashoppayment">
<name>Hikashop Credit Card Payment Plugin</name>
<creationDate>12 février 2021</creationDate>
<version>4.4.1</version>
<author>Hikashop</author>
<authorEmail>dev@hikashop.com</authorEmail>
<authorUrl>http://www.hikashop.com</authorUrl>
<copyright>(C) 2010-2021 HIKARI SOFTWARE. All rights
reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html
GNU/GPL</license>
<description>This plugin enables you to setup your Credit card
collection payment system</description>
<files>
<filename
plugin="creditcard">creditcard.php</filename>
<filename>creditcard_end.php</filename>
</files>
<params addpath="/components/com_hikashop/params">
<param name="pluginoptions" type="pluginoptions"
default="plugin" label="hikashop"
description="HikaShop options" />
</params>
<config>
<fields name="params"
addfieldpath="/components/com_hikashop/fields">
<fieldset name="basic">
<field id="pluginoptions" name="pluginoptions"
type="pluginoptions" label="hikashop"
description="HikaShop options" />
</fieldset>
</fields>
</config>
</extension>
PK3�[�TD[creditcard_end.phpnu�[���<?php
/**
* @package HikaShop for Joomla!
* @version 4.4.1
* @author hikashop.com
* @copyright (C) 2010-2021 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><div class="hikashop_creditcard_end"
id="hikashop_creditcard_end">
<span class="hikashop_creditcard_end_message"
id="hikashop_creditcard_end_message">
<?php echo
JText::_('ORDER_IS_COMPLETE').'<br/>'.
$this->information.'<br/>'.
JText::_('THANK_YOU_FOR_PURCHASE');?>
</span>
</div>
<?php
if(!empty($this->payment_params->return_url)){
$doc = JFactory::getDocument();
$doc->addScriptDeclaration("window.hikashop.ready( function()
{window.location='".$this->payment_params->return_url."'});");
}
PK3�[�#o,,
index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK3�[,G�==creditcard.phpnu�[���PK3�[�����{creditcard.xmlnu�[���PK3�[�TD[creditcard_end.phpnu�[���PK3�[�#o,,
�index.htmlnu�[���PK8?