Skip to content

Commit

Permalink
auto commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cisspuser committed May 22, 2019
1 parent 83587cf commit 60753d9
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,15 @@ public function CheckoutConfirm() {

$subject = trim($this->config->get('config_name'));

// Fixed by Me
$redirect = str_replace('admin/', '', HTTPS_SERVER)."?route=extension/payment/kit_payme_cart&f=OrderReturn";
$redirect = str_replace('http://','', $redirect);

$config = array (
'merchant_id' => $this->config->get('payment_kit_payme_merchant_id'),
'order_id' => $out_trade_no,
'total' => round($this->currency->format($order_info['total'], $order_info['currency_code'], $order_info['currency_value'], false)*100), /*(int) $order_info['total']*100,*/
'Redirect' => str_replace('admin/', '', HTTPS_SERVER)."?route=extension/payment/kit_payme_cart&f=OrderReturn",
'Redirect' => $redirect, /*str_replace('admin/', '', HTTPS_SERVER)."?route=extension/payment/kit_payme_cart&f=OrderReturn",*/
//'merchant_key' => $this->config->get('payment_kit_payme_enabled')=='Y'?$this->config->get('payment_kit_payme_merchant_private_key_test'):$this->config->get('payment_kit_payme_merchant_private_key'),
'gateway_url' => $this->config->get('payment_kit_payme_enabled')=='Y'?$this->config->get('payment_kit_payme_checkout_url_test'):$this->config->get('payment_alipay_merchant_private_key'),
'pay_time' => $this->config->get('payment_kit_payme_callback_pay_time'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,47 @@
include_once __DIR__.'/Core/Format.php';
include_once __DIR__.'/Core/Payme.php';
include_once __DIR__.'/Core/PaymeCallback.php';

class ExePaymeCallback {


static function Construct($db_group){

define('LANG', 'ru');

if(isset($_SERVER['PHP_AUTH_USER']))
{
date_default_timezone_set('Asia/Tashkent');

date_default_timezone_set('Asia/Tashkent');

$check=false;

if(isset($_SERVER['PHP_AUTH_USER'])) {

if(isset($_SERVER['PHP_AUTH_PW'])){

define('PHP_AUTH_USER', $_SERVER['PHP_AUTH_USER']);
define('PHP_AUTH_PW', $_SERVER['PHP_AUTH_PW']);
}
else
{

} else {

$a = html_entity_decode(base64_decode( substr($_SERVER["PHP_AUTH_USER"],6)));
list($name, $password) = explode(':', $a);
//exit($password);

define('PHP_AUTH_USER', $name);
define('PHP_AUTH_PW', $password);
define('PHP_AUTH_PW', $password);
}


$check=true;

} else if(isset($_SERVER['REMOTE_USER'])) {

$a = html_entity_decode(base64_decode( substr($_SERVER["REMOTE_USER"],6)));
list($name, $password) = explode(':', $a);

define('PHP_AUTH_USER', $name);
define('PHP_AUTH_PW', $password);

$check=true;
}

if($check) {

$PaymeCallback = new PaymeCallback($db_group);

$Sql['PerformTransaction'][] = array(
Expand Down Expand Up @@ -87,10 +105,9 @@ static function Construct($db_group){
$rezult = $PaymeCallback->Execute(null);
return array('return'=>$rezult, 'status'=>true);
//exit(json_encode($rezult));
}
else
{

} else {

if(!ini_get('register_globals'))
{
if(function_exists('apache_response_headers')){
Expand Down Expand Up @@ -131,7 +148,6 @@ static function Construct($db_group){
//exit(json_encode($Param));
}
}

}
//print_r($db_group);
if(isset($db_group))
Expand Down

0 comments on commit 60753d9

Please sign in to comment.