uawdijnntqw1x1x1
IP : 13.58.74.131
Hostname : ns1.eurodns.top
Kernel : Linux ns1.eurodns.top 4.18.0-553.5.1.lve.1.el7h.x86_64 #1 SMP Fri Jun 14 14:24:52 UTC 2024 x86_64
Disable Function : mail,sendmail,exec,passthru,shell_exec,system,popen,curl_multi_exec,show_source,eval,open_base
OS : Linux
PATH:
/
home
/
sudancam
/
.trash
/
tyblue.6
/
..
/
catalog
/
controller
/
extension
/
payment
/
alipay.php
/
/
<?php class ControllerExtensionPaymentAlipay extends Controller { public function index() { $data['button_confirm'] = $this->language->get('button_confirm'); $this->load->model('checkout/order'); if(!isset($this->session->data['order_id'])) { return false; } $order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']); $config = array ( 'app_id' => $this->config->get('payment_alipay_app_id'), 'merchant_private_key' => $this->config->get('payment_alipay_merchant_private_key'), 'notify_url' => HTTPS_SERVER . "payment_callback/alipay", 'return_url' => $this->url->link('checkout/success'), 'charset' => "UTF-8", 'sign_type' => "RSA2", 'gateway_url' => $this->config->get('payment_alipay_test') == "sandbox" ? "https://openapi.alipaydev.com/gateway.do" : "https://openapi.alipay.com/gateway.do", 'alipay_public_key' => $this->config->get('payment_alipay_alipay_public_key'), ); $out_trade_no = trim($order_info['order_id']); $subject = trim($this->config->get('config_name')); $total_amount = trim($this->currency->format($order_info['total'], 'CNY', '', false)); $body = '';//trim($_POST['WIDbody']); $payRequestBuilder = array( 'body' => $body, 'subject' => $subject, 'total_amount' => $total_amount, 'out_trade_no' => $out_trade_no, 'product_code' => 'FAST_INSTANT_TRADE_PAY' ); $this->load->model('extension/payment/alipay'); $response = $this->model_extension_payment_alipay->pagePay($payRequestBuilder,$config); $data['action'] = $config['gateway_url'] . "?charset=" . $this->model_extension_payment_alipay->getPostCharset(); $data['form_params'] = $response; return $this->load->view('extension/payment/alipay', $data); } public function callback() { $this->log->write('alipay pay notify:'); $arr = $_POST; $config = array ( 'app_id' => $this->config->get('payment_alipay_app_id'), 'merchant_private_key' => $this->config->get('payment_alipay_merchant_private_key'), 'notify_url' => HTTPS_SERVER . "payment_callback/alipay", 'return_url' => $this->url->link('checkout/success'), 'charset' => "UTF-8", 'sign_type' => "RSA2", 'gateway_url' => $this->config->get('payment_alipay_test') == "sandbox" ? "https://openapi.alipaydev.com/gateway.do" : "https://openapi.alipay.com/gateway.do", 'alipay_public_key' => $this->config->get('payment_alipay_alipay_public_key'), ); $this->load->model('extension/payment/alipay'); $this->log->write('POST' . var_export($_POST,true)); $result = $this->model_extension_payment_alipay->check($arr, $config); if($result) {//check successed $this->log->write('Alipay check successed'); $order_id = $_POST['out_trade_no']; if($_POST['trade_status'] == 'TRADE_FINISHED') { } else if ($_POST['trade_status'] == 'TRADE_SUCCESS') { $this->load->model('checkout/order'); $this->model_checkout_order->addOrderHistory($order_id, $this->config->get('payment_alipay_order_status_id')); } echo "success"; //Do not modified or deleted }else { $this->log->write('Alipay check failed'); //chedk failed echo "fail"; } } }
/home/sudancam/.trash/tyblue.6/../catalog/controller/extension/payment/alipay.php