Spade
Mini Shell
| Directory:~$ /home/lmsyaran/public_html/joomla4/ |
| [Home] [System Details] [Kill Me] |
PK���[�#o,,
index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK���["�%�
� payjunction.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 plgHikashoppaymentPayJunction extends hikashopPaymentPlugin
{
var $accepted_currencies = array( 'USD' );
var $multiple = true;
var $name = 'payjunction';
var $error_msg = array(
'00' => 'Transaction was approved.',
'85' => 'Transaction was approved.',
'FE' => 'There was a format error with your Trinity
Gateway Service (API) request.',
'AE' => 'Address verification failed because address
did not match.',
'ZE' => 'Address verification failed because zip did
not match.',
'XE' => 'Address verification failed because zip and
address did not match.',
'YE' => 'Address verification failed because zip and
address did not match.',
'OE' => 'Address verification failed because address or
zip did not match..',
'UE' => 'Address verification failed because cardholder
address unavailable.',
'RE' => 'Address verification failed because address
verification system is not working',
'SE' => 'Address verification failed because address
verification system is unavailable',
'EE' => 'Address verification failed because
transaction is not a mail or phone order.',
'GE' => 'Address verification failed because
international support is unavailable.',
'CE' => 'Declined because CVV2/CVC2 code did not
match.',
'NL' => 'Aborted because of a system error, please try
again later.',
'AB' => 'Aborted because of an upstream system error,
please try again later.',
'04' => 'Declined. Pick up card.',
'07' => 'Declined. Pick up card (Special
Condition).',
'41' => 'Declined. Pick up card (Lost).',
'43' => 'Declined. Pick up card (Stolen).',
'13' => 'Declined because of the amount is
invalid.',
'14' => 'Declined because the card number is
invalid.',
'80' => 'Declined because of an invalid date.',
'05' => 'Declined. Do not honor.',
'51' => 'Declined because of insufficient
funds.',
'N4' => 'Declined because the amount exceeds issuer
withdrawal limit.',
'61' => 'Declined because the amount exceeds withdrawal
limit.',
'62' => 'Declined because of an invalid service code
(restricted).',
'65' => 'Declined because the card activity limit
exceeded.',
'93' => 'Declined because there a violation (the
transaction could not be completed).',
'06' => 'Declined because address verification
failed.',
'54' => 'Declined because the card has expired.',
'15' => 'Declined because there is no such
issuer.',
'96' => 'Declined because of a system error.',
'N7' => 'Declined because of a CVV2/CVC2
mismatch.',
'M4' => 'Declined.',
'DT' => 'Duplicate Transaction'
);
function needCC(&$method) {
$method->ask_cc = true;
$method->ask_owner = true;
if( $method->payment_params->ask_ccv ||
($method->payment_params->security &&
$method->payment_params->security_cvv) ) {
$method->ask_ccv = true;
}
return true;
}
function onBeforeOrderCreate(&$order, &$do) {
if(parent::onBeforeOrderCreate($order, $do) === true)
return true;
$this->ccLoad();
ob_start();
$dbg = '';
$uuid = uniqid('');
$amount =
number_format($order->cart->full_total->prices[0]->price_value_with_tax,2,'.','');
$vars = array (
"dc_logon" => $this->payment_params->login
,"dc_password" => $this->payment_params->password
,"dc_version" => "1.2"
,"dc_transaction_type" =>
"AUTHORIZATION_CAPTURE"
,"dc_transaction_amount" => $amount
,"dc_address" =>
@$order->cart->billing_address->address_street
,"dc_city" =>
@$order->cart->billing_address->address_city
,"dc_state" =>
@$order->cart->billing_address->address_state->zone_name
,"dc_zipcode" =>
@$order->cart->billing_address->address_post_code
,"dc_name" => $this->cc_owner
,"dc_number" => $this->cc_number
,"dc_expiration_month" => $this->cc_month
,"dc_expiration_year" => $this->cc_year
,"dc_verification_number" => $this->cc_CCV
,"dc_schedule_create" => ''
,"dc_schedule_limit" => ''
,"dc_schedule_periodic_number" => ''
,"dc_schedule_periodic_type" => ''
,"dc_schedule_start" => ''
,"dc_transaction_id" => ''
);
if( $this->payment_params->security ) {
$vars['dc_security'] =
$this->payment_params->security_avs . '|' .
($this->payment_params->security_cvv?'M':'I')
. '|' .
($this->payment_params->security_preauth?'true':'false')
. '|' .
($this->payment_params->security_avsforce?'true':'false')
. '|' .
($this->payment_params->security_cvvforce?'true':'false')
;
}
$tmp = array();
foreach($vars as $k => $v) {
$tmp[] = $k . '=' . urlencode(trim($v));
}
$vars = implode('&', $tmp);
$session = curl_init();
curl_setopt($session, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($session, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($session, CURLOPT_POST, 1);
curl_setopt($session, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($session, CURLOPT_RETURNTRANSFER, 1);
$httpsHikashop = str_replace('http://','https://',
HIKASHOP_LIVE);
$domain = $this->payment_params->domain;
$url = '/quick_link';
curl_setopt($session, CURLOPT_URL, 'https://' . $domain .
$url);
curl_setopt($session, CURLOPT_POSTFIELDS, $vars);
$ret = curl_exec($session);
$error = curl_errno($session);
$err_msg = curl_error($session);
curl_close($session);
if( !empty($ret) ) {
$ret = explode(chr(28), $ret);
$result = array();
if( is_array($ret) ) {
foreach ($ret as $kv) {
list ($k, $v) = explode("=", $kv);
$result[$k] = $v;
}
}
if( $this->payment_params->debug ) {
echo print_r($result, true) . "\n\n\n";
}
if( isset($result['dc_response_code']) ) {
$rc = $result['dc_response_code'];
if( $rc == '00' || $rc == '85' ) {
$do = true;
$dbg .= ob_get_clean();
if( !empty($dbg) ) $dbg .= "\r\n";
ob_start();
$history = new stdClass();
$history->notified = 0;
$history->amount = $amount . $this->accepted_currencies[0];
$history->data = $dbg . 'Authorization Code: ' .
@$result['dc_approval_code'] . "\r\n" .
'Transaction ID: ' . @$result['dc_transaction_id'];
$this->modifyOrder($order,$this->payment_params->verified_status,$history,true);
} else {
if( isset($this->error_msg[$rc]) ) {
$this->app->enqueueMessage($this->error_msg[$rc]);
} else {
$this->app->enqueueMessage('Error');
}
if( isset($result['dc_response_message']) ) {
$this->app->enqueueMessage(
$result['dc_response_message'] );
}
$do = false;
}
} else {
$this->app->enqueueMessage('An error occurred.');
$do = false;
}
} else {
$do = false;
}
if( $error != 0 ) {
$this->app->enqueueMessage('There was an error during the
connection with the PayJunction payment gateway');
if( $this->payment_params->debug ) {
echo 'Curl Err [' . $error . '] : ' . $err_msg .
"\n\n\n";
}
}
$dbg .= ob_get_clean();
$this->writeToLog($dbg);
if( $error != 0 ) {
return true;
}
$this->ccClear();
return true;
}
function onAfterOrderConfirm(&$order,&$methods,$method_id){
return $this->showPage('thanks');
}
function onPaymentConfigurationSave(&$element){
if( isset($element->payment_params->security) &&
$element->payment_params->security &&
isset($element->payment_params->security_cvv) &&
$element->payment_params->security_cvv ) {
$element->payment_params->ask_ccv = true;
}
return true;
}
function getPaymentDefaultValues(&$element) {
$element->payment_name='PayJunction';
$element->payment_description='You can pay by credit card using
this payment method';
$element->payment_images='MasterCard,VISA,Credit_card,American_Express,Discover';
$element->payment_params->login='';
$element->payment_params->password='';
$element->payment_params->ask_ccv = true;
$element->payment_params->security = false;
$element->payment_params->domain='www.payjunction.com';
$element->payment_params->pending_status='created';
$element->payment_params->verified_status='confirmed';
}
}
PK���[�Bb��payjunction.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<extension type="plugin" version="2.5"
method="upgrade" group="hikashoppayment">
<name>Hikashop PayJunction Payment Plugin</name>
<creationDate>12 février 2021</creationDate>
<version>4.4.1</version>
<author>Obsidev</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 PayJunction
payment system</description>
<files>
<filename
plugin="payjunction">payjunction.php</filename>
<filename>payjunction_configuration.php</filename>
<filename>payjunction_thanks.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>
PK���[#�ȕ�payjunction_configuration.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
if(!function_exists('curl_init')) {
echo '<tr><td colspan="2"><strong>The
PayJunction payment plugin needs the CURL library installed but it seems
that it is not available on your server. Please contact your web hosting to
set it up.</strong></td></tr>';
}
hikashop_loadJslib('mootools');
?><tr>
<td class="key">
<label for="data[payment][payment_params][login]">
API Login
</label>
</td>
<td>
<input type="text"
name="data[payment][payment_params][login]" value="<?php
echo @$this->element->payment_params->login; ?>" />
</td>
</tr>
<tr>
<td class="key">
<label for="data[payment][payment_params][password]">
API Password
</label>
</td>
<td>
<input type="text"
name="data[payment][payment_params][password]"
value="<?php echo
@$this->element->payment_params->password; ?>" />
</td>
</tr>
<tr>
<td class="key">
<label for="data[payment][payment_params][domain]">
Payment Server
</label>
</td>
<td>
<?php
$values = array();
$values[] = JHTML::_('select.option',
'www.payjunction.com', 'Production Server');
$values[] = JHTML::_('select.option',
'www.payjunctionlabs.com', 'Test Server');
echo JHTML::_('select.genericlist', $values,
"data[payment][payment_params][domain]" ,
'class="custom-select" size="1"',
'value', 'text',
@$this->element->payment_params->domain ); ?>
</td>
</tr>
<tr>
<td class="key">
<label for="data[payment][payment_params][ask_ccv]">
Ask CCV
</label>
</td>
<td>
<?php echo JHTML::_('hikaselect.booleanlist',
"data[payment][payment_params][ask_ccv]" ,
'',@$this->element->payment_params->ask_ccv ); ?>
</td>
</tr>
<tr>
<td class="key">
<label for="data[payment][payment_params][security]">
Override Security
</label>
</td>
<td>
<?php echo JHTML::_('hikaselect.booleanlist',
"data[payment][payment_params][security]" ,
'onclick="payjunction_avs_radio(this);"
onchange="payjunction_avs_radio(this);"',@$this->element->payment_params->security
); ?>
</td>
</tr>
</table>
<div id="payjunction_security_1" <?php
if( !isset($this->element->payment_params->security) ||
!$this->element->payment_params->security ) {
echo 'style="border: 1px solid #5c5c5c; margin: 3px; display:
none;"';
} else {
echo 'style="border: 1px solid #5c5c5c; margin:
3px;"';
}
?>>
<table>
<tr>
<td class="key">
<label
for="data[payment][payment_params][security_avs]">
AVS Security
</label>
</td>
<td>
<?php
$values = array();
$values[] = JHTML::_('select.option', 'AWZ',
'Match Address OR Zip');
$values[] = JHTML::_('select.option', 'XY',
'Match Address AND Zip');
$values[] = JHTML::_('select.option', 'WZ',
'Match Zip');
$values[] = JHTML::_('select.option', 'AW',
'Match Address OR 9 Digit Zip');
$values[] = JHTML::_('select.option', 'AW',
'Match Address OR 5 Digit Zip');
$values[] = JHTML::_('select.option', 'A',
'Match Address');
$values[] = JHTML::_('select.option', 'X',
'Match Address AND 9 Digit Zip');
$values[] = JHTML::_('select.option', 'Y',
'Match Address AND 5 Digit Zip');
$values[] = JHTML::_('select.option', 'W',
'Match 9 Digit Zip');
$values[] = JHTML::_('select.option', 'Z',
'Match 5 Digit Zip');
echo JHTML::_('select.genericlist', $values,
"data[payment][payment_params][security_avs]" ,
'class="custom-select" size="1"',
'value', 'text',
@$this->element->payment_params->security_avs ); ?>
</td>
</tr>
<tr>
<td class="key">
<label
for="data[payment][payment_params][security_cvv]">
CVV Security
</label>
</td>
<td>
<?php echo JHTML::_('hikaselect.booleanlist',
"data[payment][payment_params][security_cvv]" ,
'',@$this->element->payment_params->security_cvv );
?>
</td>
</tr>
<tr>
<td class="key">
<label
for="data[payment][payment_params][security_preauth]">
PreAuth Security
</label>
</td>
<td>
<?php echo JHTML::_('hikaselect.booleanlist',
"data[payment][payment_params][security_preauth]" ,
'',@$this->element->payment_params->security_preauth );
?>
</td>
</tr>
<tr>
<td class="key">
<label
for="data[payment][payment_params][security_avsforce]">
AVS Force
</label>
</td>
<td>
<?php echo JHTML::_('hikaselect.booleanlist',
"data[payment][payment_params][security_avsforce]" ,
'',@$this->element->payment_params->security_avsforce );
?>
</td>
</tr>
<tr>
<td class="key">
<label
for="data[payment][payment_params][security_cvvforce]">
CVV Force
</label>
</td>
<td>
<?php echo JHTML::_('hikaselect.booleanlist',
"data[payment][payment_params][security_cvvforce]" ,
'',@$this->element->payment_params->security_cvvforce );
?>
</td>
</tr>
</table>
<script type="text/javascript">
var payjunction_el = $("payjunction_security_1");
var payjunction_s = null;
try { payjunction_s = new Fx.Slide(payjunction_el); } catch(e) {}
function payjunction_avs_radio(elem) {
if( elem.checked ) {
if( elem.value == "0" ) {
if( payjunction_el.isDisplayed() ) {
if(!payjunction_s) { payjunction_el.hide(); }
if(payjunction_s.open) { payjunction_s.show().slideOut(); }
}
} else {
if( !payjunction_el.isDisplayed() || (payjunction_s &&
!payjunction_s.open) ) {
payjunction_el.show();
if( payjunction_s ) { payjunction_s.hide().slideIn(); }
}
}
}
}
window.hikashop.ready( function() {
var e = $('data[payment][payment_params][security]1');
if( e.checked && !payjunction_el.isDisplayed() )
payjunction_el.show();
});
</script>
</div>
<table>
<tr>
<td class="key">
<label for="data[payment][payment_params][debug]">
<?php echo JText::_( 'DEBUG' ); ?>
</label>
</td>
<td>
<?php echo JHTML::_('hikaselect.booleanlist',
"data[payment][payment_params][debug]" ,
'',@$this->element->payment_params->debug ); ?>
</td>
</tr>
<tr>
<td class="key">
<label for="data[payment][payment_params][cancel_url]">
<?php echo JText::_( 'CANCEL_URL' ); ?>
</label>
</td>
<td>
<input type="text"
name="data[payment][payment_params][cancel_url]"
value="<?php echo
@$this->element->payment_params->cancel_url; ?>" />
</td>
</tr>
<tr>
<td class="key">
<label for="data[payment][payment_params][return_url]">
<?php echo JText::_( 'RETURN_URL' ); ?>
</label>
</td>
<td>
<input type="text"
name="data[payment][payment_params][return_url]"
value="<?php echo
@$this->element->payment_params->return_url; ?>" />
</td>
</tr>
<tr>
<td class="key">
<label
for="data[payment][payment_params][verified_status]">
<?php echo JText::_( 'VERIFIED_STATUS' ); ?>
</label>
</td>
<td>
<?php echo
$this->data['order_statuses']->display("data[payment][payment_params][verified_status]",@$this->element->payment_params->verified_status);
?>
</td>
</tr>
PK���[��)3��payjunction_thanks.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_payjunction_thankyou"
id="hikashop_payjunction_thankyou">
<span id="hikashop_payjunction_thankyou_message"
class="hikashop_payjunction_thankyou_message">
<?php echo JText::_('THANK_YOU_FOR_PURCHASE');
if(!empty($this->payment_params->return_url)){
echo '<br/><a
href="'.$this->payment_params->return_url.'">'.JText::_('GO_BACK_TO_SHOP').'</a>';
}?>
</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."'});");
}
PK���[�#o,,
index.htmlnu�[���PK���["�%� �
fpayjunction.phpnu�[���PK���[�Bb��v!payjunction.xmlnu�[���PK���[#�ȕ��&payjunction_configuration.phpnu�[���PK���[��)3���Bpayjunction_thanks.phpnu�[���PK�VF