/** * 生成支付代码 * @param array $order 订单信息 * @param array $payment 支付方式信息 */ function get_code($order, $payment) { $billstr = date('His', time()); $datestr = date('Ymd', time()); $mer_code = $payment['ips_account']; $billno = str_pad($order['log_id'], 10, '0', STR_PAD_LEFT) . $billstr; $amount = sprintf("%0.02f", $order['order_amount']); $strcert = $payment['ips_key']; $strcontent = $billno . $amount . $datestr . 'RMB' . $strcert; // 签名验证串 // $signmd5 = MD5($strcontent); $def_url = '<br /><form style="text-align:center;" action="https://pay.ips.com.cn/ipayment.aspx" method="post" target="_blank">'; $def_url .= "<input type='hidden' name='Mer_code' value='" . $mer_code . "'>\n"; $def_url .= "<input type='hidden' name='Billno' value='" . $billno . "'>\n"; $def_url .= "<input type='hidden' name='Gateway_type' value='" . $payment['ips_currency'] . "'>\n"; $def_url .= "<input type='hidden' name='Currency_Type' value='RMB'>\n"; $def_url .= "<input type='hidden' name='Lang' value='" . $payment['ips_lang'] . "'>\n"; $def_url .= "<input type='hidden' name='Amount' value='" . $amount . "'>\n"; $def_url .= "<input type='hidden' name='Date' value='" . $datestr . "'>\n"; $def_url .= "<input type='hidden' name='DispAmount' value='" . $amount . "'>\n"; $def_url .= "<input type='hidden' name='OrderEncodeType' value='2'>\n"; $def_url .= "<input type='hidden' name='RetEncodeType' value='12'>\n"; $def_url .= "<input type='hidden' name='Merchanturl' value='" . return_url(basename(__FILE__, '.php')) . "'>\n"; $def_url .= "<input type='hidden' name='SignMD5' value='" . $signmd5 . "'>\n"; $def_url .= "<input type='submit' value='" . $GLOBALS['_LANG']['pay_button'] . "'>"; $def_url .= "</form><br />"; return $def_url; }
/** * 生成支付代码 * @param array $order 订单信息 * @param array $payment 支付方式信息 */ function pay_from($order, $payment) { //dump($payment); if (!defined('EC_CHARSET')) { $charset = 'utf-8'; } else { $charset = EC_CHARSET; } $extra_common_param = $order['text1']; $parameter = array('extra_common_param' => $extra_common_param, 'service' => 'create_direct_pay_by_user', 'partner' => $payment['cfg_id'], '_input_charset' => $charset, 'notify_url' => BG_return_url(basename(__FILE__, '.php')), 'return_url' => return_url(basename(__FILE__, '.php')), 'subject' => $order['order_sn'], 'out_trade_no' => $order['order_sn'], 'price' => $order['order_amount'], 'quantity' => 1, 'payment_type' => 1, 'logistics_type' => 'EXPRESS', 'logistics_fee' => 0, 'logistics_payment' => 'BUYER_PAY_AFTER_RECEIVE', 'seller_email' => $payment['cfg_value'], "paymethod" => 'bankPay', "defaultbank" => $order['pay_num']); ksort($parameter); reset($parameter); $param = ''; $sign = ''; foreach ($parameter as $key => $val) { $param .= "{$key}=" . urlencode($val) . "&"; $sign .= "{$key}={$val}&"; } $param = substr($param, 0, -1); $sign = substr($sign, 0, -1) . $payment['cfg_key']; //$sign = substr($sign, 0, -1). ALIPAY_AUTH; $button = '<div style="text-align:center"><input type="button" onclick="window.open(\'' . $payment['cfg_gate'] . '?' . $param . '&sign=' . md5($sign) . '&sign_type=MD5\')" value="' . $GLOBALS['_LANG']['pay_button'] . '" /></div>'; //dump(htmlentities($button)); return $button; }
/** * 生成支付代码 * @param array $order 订单信息 * @param array $payment 支付方式信息 */ function get_code($order, $payment) { if (!defined('EC_CHARSET')) { $charset = 'utf-8'; } else { $charset = EC_CHARSET; } $real_method = $payment['alipay_pay_method']; switch ($real_method) { case '0': $service = 'trade_create_by_buyer'; break; case '1': $service = 'create_partner_trade_by_buyer'; break; case '2': $service = 'create_direct_pay_by_user'; break; } $extend_param = 'isv^sh22'; $parameter = array('extend_param' => $extend_param, 'service' => $service, 'partner' => $payment['alipay_partner'], '_input_charset' => $charset, 'notify_url' => return_url(basename(__FILE__, '.php')), 'return_url' => return_url(basename(__FILE__, '.php')), 'subject' => $order['order_sn'], 'out_trade_no' => $order['order_sn'] . $order['log_id'], 'price' => $order['order_amount'], 'quantity' => 1, 'payment_type' => 1, 'logistics_type' => 'EXPRESS', 'logistics_fee' => 0, 'logistics_payment' => 'BUYER_PAY_AFTER_RECEIVE', 'seller_email' => $payment['alipay_account']); ksort($parameter); reset($parameter); $param = ''; $sign = ''; foreach ($parameter as $key => $val) { $param .= "{$key}=" . urlencode($val) . "&"; $sign .= "{$key}={$val}&"; } $param = substr($param, 0, -1); $sign = substr($sign, 0, -1) . $payment['alipay_key']; //$sign = substr($sign, 0, -1). ALIPAY_AUTH; $button = '<div style="text-align:center"><input type="button" onclick="window.open(\'https://mapi.alipay.com/gateway.do?' . $param . '&sign=' . md5($sign) . '&sign_type=MD5\')" value="' . $GLOBALS['_LANG']['pay_button'] . '" /></div>'; return $button; }
/** * 生成支付代码 * * @param array $order 订单信息 * @param array $payment 支付方式信息 */ function get_code($order, $payment) { $init_url = 'https://wap.tenpay.com/cgi-bin/wappayv2.0/wappay_init.cgi'; $gateway = 'https://wap.tenpay.com/cgi-bin/wappayv2.0/wappay_gate.cgi'; // 初始化 $data = array('ver' => '2.0', 'charset' => 1, 'bank_type' => 0, 'desc' => $order['order_sn'], 'bargainor_id' => $payment['bargainor_id'], 'sp_billno' => $order['order_sn'] . 'O' . $order['log_id'], 'total_fee' => $order['order_amount'] * 100, 'fee_type' => 1, 'notify_url' => return_url(basename(__FILE__, '.php'), array('type' => 0)), 'callback_url' => return_url(basename(__FILE__, '.php'), array('type' => 1))); // 字典排序 ksort($data); reset($data); // 生成签名 $sign = ''; foreach ($data as $key => $vo) { if ($vo !== '') { $sign .= $key . '=' . $vo . '&'; } } $sign .= 'key=' . $payment['tenpay_key']; $data['sign'] = strtoupper(md5($sign)); // 交易初始化 $result = Http::doPost($init_url, $data); $xml = (array) simplexml_load_string($result); if (isset($xml['err_info'])) { return '<div style="color:red; text-align: center">错误信息:' . $xml['err_info'] . '</div>'; } /* 生成支付按钮 */ $button = '<div><input type="button" class="btn btn-info ect-btn-info ect-colorf ect-bg" onclick="window.open(\'' . $gateway . '?token_id=' . $xml['token_id'] . '\')" value="' . L('pay_button') . '" class="c-btn3" /></div>'; return $button; }
function actionReturn() { $code = $_GET['code']; $postdata = http_build_query(array('grant_type' => 'authorization_code', 'client_id' => $this->app_key, 'client_secret' => $this->app_secret, 'redirect_uri' => urlencode($this->url), 'code' => $code)); $opts = array('http' => array('method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $postdata)); $context = stream_context_create($opts); $data = file_get_contents(Sohu::url_access_token(), false, $context); $data = json_decode($data); // $data = json_decode($data); // $access_token = $data->access_token; dump($data); exit; if ($access_token) { try { $this->auth = OAuth2::provider($this->type, array('id' => $this->app_key, 'secret' => $this->app_secret)); $token = Token::factory('access', array('access_token' => $access_token)); $info = $this->auth->get_user_info($token); if (!$info) { flash('error', __('login error')); $this->redirect(return_url()); exit; } $r = $this->member_get_third_set_user($info, $this->oauth_id, $access_token); flash('success', __('login success')); $this->redirect(return_url()); } catch (OAuthException $e) { flash('error', __('login error')); $this->redirect(return_url()); } } exit; }
function actionReturn($code) { $url = "https://github.com/login/oauth/access_token?client_id=" . $this->app_key . "&redirect_uri=" . urlencode($this->url) . "&client_secret=" . $this->app_secret . "&code=" . $_GET['code'] . ""; $content = file_get_contents($url); $s = $content; $s = explode('&', $s); $d = explode('=', $s[0]); $access_token = $d[1]; if ($access_token) { try { $this->auth = OAuth2::provider($this->type, array('id' => $this->app_key, 'secret' => $this->app_secret)); $token = Token::factory('access', array('access_token' => $access_token)); $info = $this->auth->get_user_info($token); $uid = $info['uid']; $me['id'] = $uid; $me['name'] = $info['name']; $me['email'] = $info['emial']; $r = $this->member_get_third_set_user($me, $this->oauth_id, $access_token); flash('success', __('login success')); $this->redirect(return_url()); } catch (OAuthException $e) { flash('error', __('login error')); $this->redirect(return_url()); } } exit; }
function actionReturn() { $o = new \SaeTOAuthV2($this->app_key, $this->app_secret); if ($_REQUEST['code']) { $keys = array(); $keys['code'] = $_REQUEST['code']; $keys['redirect_uri'] = $this->url; try { $token = $o->getAccessToken('code', $keys); $access_token = $token['access_token']; $c = new \SaeTClientV2($this->app_key, $this->app_secret, $access_token); $uid_get = $c->get_uid(); $uid = $uid_get['uid']; $me = $c->show_user_by_id($uid); $me['name'] = $me['screen_name']; $me['options'] = array('url' => $me['profile_url']); $r = $this->member_get_third_set_user($me, $this->oauth_id, $access_token); flash('success', __('login success')); $this->redirect(return_url()); } catch (OAuthException $e) { flash('error', __('login error')); $this->redirect(return_url()); } } exit; }
/** * 提交函數 */ function get_code($order, $payment) { $isTestMode = $payment['ecshop_allpay_atm_test_mode'] == 'Yes'; $this->ServiceURL = $isTestMode ? "http://payment-stage.allpay.com.tw/Cashier/AioCheckOut" : "https://payment.allpay.com.tw/Cashier/AioCheckOut"; $this->HashKey = trim($payment['ecshop_allpay_atm_key']); $this->HashIV = trim($payment['ecshop_allpay_atm_iv']); $this->MerchantID = trim($payment['ecshop_allpay_atm_account']); $szRetUrl = return_url(basename(__FILE__, '.php')) . "&log_id=" . $order['log_id'] . "&order_id=" . $order['order_id']; $szRetUrl = str_ireplace('/mobile/', '/', $szRetUrl); $this->Send['ReturnURL'] = $szRetUrl . '&background=1'; $this->Send['ClientBackURL'] = $GLOBALS['ecs']->url(); $this->Send['OrderResultURL'] = $szRetUrl; $this->Send['MerchantTradeNo'] = $order['order_sn']; $this->Send['MerchantTradeDate'] = date('Y/m/d H:i:s'); $this->Send['TotalAmount'] = round($order['order_amount']); $this->Send['TradeDesc'] = "AllPay_ECShop_Module"; $this->Send['ChoosePayment'] = PaymentMethod::ATM; $this->Send['Remark'] = ''; $this->Send['ChooseSubPayment'] = PaymentMethodItem::None; $this->Send['NeedExtraPaidInfo'] = ExtraPaymentInfo::No; $this->Send['DeviceSource'] = DeviceType::PC; array_push($this->Send['Items'], array('Name' => $GLOBALS['_LANG']['text_goods'], 'Price' => round($order['order_amount']), 'Currency' => $GLOBALS['_LANG']['text_currency'], 'Quantity' => 1, 'URL' => '')); $this->SendExtend['ExpireDate'] = 3; $this->SendExtend['PaymentInfoURL'] = $szRetUrl . '&pi=true'; try { return $this->CheckOutString($GLOBALS['_LANG']['pay_button']); } catch (Exception $e) { return '<script language="text/javascript">alert("' . $e->getMessage() . '");</script>'; } }
public function __construct($config = array()) { if (!empty($config)) $this->set_config($config); $this->config['gateway_url'] = 'http://netpay.sdo.com/paygate/default.aspx'; $this->config['gateway_method'] = 'POST'; $this->config['notify_url'] = return_url('sndapay',1); $this->config['return_url'] = return_url('sndapay'); }
function actionReturn() { if (!$_GET['oauth_token']) { return false; } $this->auth->setToken($_GET['oauth_token']); $token = $this->auth->getAccessToken(array('oauth_verifier' => $_GET['oauth_verifier'])); $this->auth->setToken($token->oauth_token, $token->oauth_token_secret); $response = $this->auth->get('/account/verify_credentials.json'); $info = $response->response; if ($response->code != 200) { flash('error', __('comm.response error')); $this->redirect(url('site/index')); } $access_token = serialize(array($token->oauth_token, $token->oauth_token_secret)); if ($access_token) { try { $uid = $info['id']; $me['id'] = $uid; $me['name'] = $info['name']; $me['email'] = $info['email']; $me['nickname'] = $info['screen_name']; $me['options'] = array('time_zone' => $info['time_zone']); $r = $this->member_get_third_set_user($me, $this->oauth_id, $access_token); flash('success', __('login success')); $this->redirect(return_url()); } catch (OAuthException $e) { flash('error', __('login error')); $this->redirect(return_url()); } } }
/** * 提交函數 */ function get_code($order, $payment) { $isTestMode = $payment['ecshop_ecpay_barcode_test_mode'] == 'Yes'; $this->ServiceURL = $isTestMode ? "https://payment-stage.ecpay.com.tw/Cashier/AioCheckOut" : "https://payment.ecpay.com.tw/Cashier/AioCheckOut"; $this->HashKey = trim($payment['ecshop_ecpay_barcode_key']); $this->HashIV = trim($payment['ecshop_ecpay_barcode_iv']); $this->MerchantID = trim($payment['ecshop_ecpay_barcode_account']); $szRetUrl = return_url(basename(__FILE__, '.php')) . "&log_id=" . $order['log_id'] . "&order_id=" . $order['order_id']; $szRetUrl = str_ireplace('/mobile/', '/', $szRetUrl); $this->Send['ReturnURL'] = $szRetUrl . '&background=1'; $this->Send['ClientBackURL'] = $GLOBALS['ecs']->url(); $this->Send['OrderResultURL'] = $szRetUrl; $this->Send['MerchantTradeNo'] = $order['order_sn']; $this->Send['MerchantTradeDate'] = date('Y/m/d H:i:s'); $this->Send['TotalAmount'] = intval($order['order_amount']); $this->Send['TradeDesc'] = "ECPay_ECShop_Module"; $this->Send['ChoosePayment'] = PaymentMethod::BARCODE; $this->Send['Remark'] = ''; $this->Send['ChooseSubPayment'] = PaymentMethodItem::None; $this->Send['NeedExtraPaidInfo'] = ExtraPaymentInfo::No; $this->Send['DeviceSource'] = DeviceType::PC; array_push($this->Send['Items'], array('Name' => $GLOBALS['_LANG']['text_goods'], 'Price' => intval($order['order_amount']), 'Currency' => $GLOBALS['_LANG']['text_currency'], 'Quantity' => 1, 'URL' => '')); $this->SendExtend['Desc_1'] = ''; $this->SendExtend['Desc_2'] = ''; $this->SendExtend['Desc_3'] = ''; $this->SendExtend['Desc_4'] = ''; $this->SendExtend['PaymentInfoURL'] = $szRetUrl . '&pi=true'; return $this->CheckOutString($GLOBALS['_LANG']['pay_button']); }
/** * 生成支付代码 * @param array $order 订单信息 * @param array $payment 支付方式信息 */ function get_code($order, $payment) { $data_vid = trim($payment['chinabank_account']); $data_orderid = $order['order_sn']; $data_vamount = $order['order_amount']; $data_vmoneytype = 'CNY'; $data_vpaykey = trim($payment['chinabank_key']); $data_vreturnurl = return_url(basename(__FILE__, '.php')); if (empty($order['order_id'])) { $remark1 = "voucher"; //商户需要在支付结果通知中转发的商户参数二 } else { $remark1 = ''; } $MD5KEY = $data_vamount . $data_vmoneytype . $data_orderid . $data_vid . $data_vreturnurl . $data_vpaykey; $MD5KEY = strtoupper(md5($MD5KEY)); $def_url = '<br /><form style="text-align:center;" method=post action="https://pay3.chinabank.com.cn/PayGate" target="_blank">'; $def_url .= "<input type=HIDDEN name='v_mid' value='" . $data_vid . "'>"; $def_url .= "<input type=HIDDEN name='v_oid' value='" . $data_orderid . "'>"; $def_url .= "<input type=HIDDEN name='v_amount' value='" . $data_vamount . "'>"; $def_url .= "<input type=HIDDEN name='v_moneytype' value='" . $data_vmoneytype . "'>"; $def_url .= "<input type=HIDDEN name='v_url' value='" . $data_vreturnurl . "'>"; $def_url .= "<input type=HIDDEN name='v_md5info' value='" . $MD5KEY . "'>"; $def_url .= "<input type=HIDDEN name='remark1' value='" . $remark1 . "'>"; $def_url .= "<input type=submit value='" . $GLOBALS['_LANG']['pay_button'] . "'>"; $def_url .= "</form>"; return $def_url; }
/** * 生成支付代码 * @param array $order 订单信息 * @param array $payment 支付方式信息 */ function get_code($order, $payment) { $MD5key = $payment['MD5key']; //MD5私钥 $MerNo = $payment['MerNo']; //商户号 $BillNo = $order['log_id']; //订单号 $Currency = $payment['Currency']; //币种 $Amount = $order['order_amount']; //金额 $DispAmount = 0; //外币金额 $Language = $payment['Language']; //语言 $ReturnURL = return_url(basename(__FILE__, '.php')); //返回地址 $Remark = "From ECShop order sn : " . $order['order_sn']; //备注 $md5src = $MerNo . $BillNo . $Currency . $Amount . $Language . $ReturnURL . $MD5key; //校验源字符串 $MD5info = strtoupper(md5($md5src)); //MD5检验结果 $button = '<form action="http://219.133.36.139/payment/Interface" method="post">' . " <input type='hidden' name='MerNo' value='" . $MerNo . "'>" . " <input type='hidden' name='Currency' value='" . $Currency . "'>" . " <input type='hidden' name='BillNo' value='" . $BillNo . "'>" . " <input type='hidden' name='Amount' value='" . $Amount . "'>" . " <input type='hidden' name='DispAmount' value='" . $DispAmount . "'>" . " <input type='hidden' name='ReturnURL' value='" . $ReturnURL . "'>" . " <input type='hidden' name='Language' value='" . $Language . "'>" . " <input type='hidden' name='MD5info' value='" . $MD5info . "'>" . " <input type='hidden' name='Remark' value='" . $Remark . "'>" . " <input type='submit' name='b1' value='" . $GLOBALS['_LANG']['pay_button'] . "'>" . "</form>"; return $button; }
public function __construct($config = array()) { if (!empty($config)) $this->set_config($config); $this->config['gateway_url'] = 'https://mas.sdo.com/web-acquire-channel/cashier30.htm'; $this->config['gateway_method'] = 'POST'; $this->config['notify_url'] = return_url('sndapay',1); $this->config['return_url'] = return_url('sndapay'); }
/** * 提交函数 */ function get_code($order, $payment) { $c_mid = trim($payment['allpay_card24_account']); $log_id = $order['log_id']; $order_id = $order['order_sn']; $c_orderamount = $order['order_amount']; $c_returl = return_url(basename(__FILE__, '.php')) . "?log_id=" . $log_id; $c_returl = str_replace('respond', 'allpay_response', $c_returl); $key = trim($payment['allpay_card24_key']); $iv = trim($payment['allpay_card24_iv']); $goods = order_goods($order['order_id']); foreach ($goods as $good) { //先上架商品 $product .= "#" . $good['goods_name']; } $product = substr($product, 1); $date = date('Y/m/d H:i:s'); $desc = "Allpay_Ecshop_Module"; $input_array = array('ChoosePayment' => 'Credit', 'ClientBackURL' => $GLOBALS['ecs']->url(), 'ItemName' => $product, 'MerchantID' => $c_mid, 'MerchantTradeDate' => $date, 'MerchantTradeNo' => $order_id, 'PaymentType' => 'aio', 'ReturnURL' => $c_returl, 'TotalAmount' => intval($c_orderamount), 'TradeDesc' => $desc, 'CreditInstallment' => 24, 'InstallmentAmount' => intval($c_orderamount)); ksort($input_array); $checkvalue = "HashKey=" . $key . "&" . urldecode(http_build_query($input_array)) . "&HashIV=" . $iv; $checkvalue = urlencode($checkvalue); $checkvalue = strtolower($checkvalue); $checkvalue = md5($checkvalue); $gateway = "https://payment.allpay.com.tw/Cashier/AioCheckOut"; //$gateway = "http://payment-stage.allpay.com.tw/Cashier/AioCheckOut"; $def_url = '<form style="text-align:center;" method=post action="' . $gateway . '">'; foreach ($input_array as $param => $value) { $def_url .= "<input type='hidden' name='{$param}' value='{$value}'>"; } $def_url .= "<input type='hidden' name='CheckMacValue' value='" . $checkvalue . "'>"; $def_url .= "<input type='submit' value='" . $GLOBALS['_LANG']['pay_button'] . "'>"; $def_url .= "</form><br />"; return $def_url; }
/** * 生成支付代码 * @param array $order 订单信息 * @param array $payment 支付方式信息 */ function get_code($order, $payment) { $data_merchant_id = $payment['yp_account']; $data_order_id = $order['order_sn']; $data_amount = $order['order_amount']; $message_type = 'Buy'; $data_cur = 'CNY'; $product_id = ''; $product_cat = ''; $product_desc = ''; $address_flag = '0'; $data_return_url = return_url(basename(__FILE__, '.php')); $data_pay_key = $payment['yp_key']; $data_pay_account = $payment['yp_account']; $mct_properties = $order['log_id']; $def_url = $message_type . $data_merchant_id . $data_order_id . $data_amount . $data_cur . $product_id . $product_cat . $product_desc . $data_return_url . $address_flag . $mct_properties; $MD5KEY = hmac($def_url, $data_pay_key); $def_url = "\n<form action='https://www.yeepay.com/app-merchant-proxy/node' method='post' target='_blank'>\n"; $def_url .= "<input type='hidden' name='p0_Cmd' value='" . $message_type . "'>\n"; $def_url .= "<input type='hidden' name='p1_MerId' value='" . $data_merchant_id . "'>\n"; $def_url .= "<input type='hidden' name='p2_Order' value='" . $data_order_id . "'>\n"; $def_url .= "<input type='hidden' name='p3_Amt' value='" . $data_amount . "'>\n"; $def_url .= "<input type='hidden' name='p4_Cur' value='" . $data_cur . "'>\n"; $def_url .= "<input type='hidden' name='p5_Pid' value='" . $product_id . "'>\n"; $def_url .= "<input type='hidden' name='p6_Pcat' value='" . $product_cat . "'>\n"; $def_url .= "<input type='hidden' name='p7_Pdesc' value='" . $product_desc . "'>\n"; $def_url .= "<input type='hidden' name='p8_Url' value='" . $data_return_url . "'>\n"; $def_url .= "<input type='hidden' name='p9_SAF' value='" . $address_flag . "'>\n"; $def_url .= "<input type='hidden' name='pa_MP' value='" . $mct_properties . "'>\n"; $def_url .= "<input type='hidden' name='hmac' value='" . $MD5KEY . "'>\n"; $def_url .= "<input type='submit' value='" . $GLOBALS['_LANG']['pay_button'] . "'>"; $def_url .= "</form>\n"; return $def_url; }
public function __construct($config = array()) { if (!empty($config)) $this->set_config($config); $this->config['gateway_url'] = 'https://pay3.chinabank.com.cn/PayGate'; $this->config['gateway_method'] = 'POST'; $this->config['return_url'] = return_url('chinabank'); pc_base::load_app_func('alipay'); }
public function __construct($config = array()) { $this->config = $config; $this->config['gateway_url'] = 'https://www.alipay.com/cooperate/gateway.do?'; $this->config['gateway_method'] = 'POST'; $this->config['notify_url'] = return_url('chinabank', 1); $this->config['return_url'] = return_url('chinabank'); }
/** * 提交函数 */ function get_code($order, $payment) { $c_mid = trim($payment['ecbank_webatm_account']); $c_order = $order['log_id']; $c_name = trim($order['consignee']); $c_address = trim($order['address']); $c_tel = trim($order['tel']); $c_post = trim($order['zipcode']); $c_email = trim($order['email']); $c_orderamount = trim(intval($order['order_amount'])); $c_ymd = date('Ymd', time()); $c_moneytype = "0"; $c_retflag = "1"; $c_returl = return_url(basename(__FILE__, '.php')); $notifytype = "0"; $c_language = $payment['ecbank_webatm_language']; $c_memo1 = $order['log_id']; $c_memo2 = $order['log_id']; $def_url = '<br /><form style="text-align:center;" method=post action="https://ecbank.com.tw/gateway.php">'; $def_url .= "<input type='hidden' name='mer_id' value='" . $c_mid . "'>"; $def_url .= "<input type='hidden' name='payment_type' value='web_atm'>"; $def_url .= "<input type='hidden' name='setbank' value='ESUN'>"; $def_url .= "<input type='hidden' name='od_sob' value='" . $c_order . "'>"; $def_url .= "<input type='hidden' name='amt' value='" . $c_orderamount . "'>"; // $def_url .= "<input type='hidden' name='return_url' value='".rawurlencode($c_returl)."'>"; $def_url .= "<input type='hidden' name='return_url' value='" . $c_returl . "'>"; $def_url .= "<input type='hidden' name='c_name' value='" . $c_name . "'>"; $def_url .= "<input type='hidden' name='c_address' value='" . $c_address . "'>"; $def_url .= "<input type='hidden' name='c_tel' value='" . $c_tel . "'>"; $def_url .= "<input type='hidden' name='c_post' value='" . $c_post . "'>"; $def_url .= "<input type='hidden' name='email' value='" . $c_email . "'>"; $def_url .= "<input type='hidden' name='c_ymd' value='" . $c_ymd . "'>"; $def_url .= "<input type='hidden' name='c_moneytype' value='" . $c_moneytype . "'>"; $def_url .= "<input type='hidden' name='c_retflag' value='" . $c_retflag . "'>"; $def_url .= "<input type='hidden' name='c_language' value='" . $c_language . "'>"; $def_url .= "<input type='hidden' name='c_memo1' value='" . $c_memo1 . "'>"; $def_url .= "<input type='hidden' name='c_memo2' value='" . $c_memo2 . "'>"; $def_url .= "<input type='hidden' name='notifytype' value='" . $notifytype . "'>"; $temp = order_goods($order['order_id']); //判斷是否使用電子發票 if ($payment['ecbank_webatm_inv_active'] == "1") { $def_url .= "<input type='hidden' name='inv_active' value='1'>"; $def_url .= "<input type='hidden' name='inv_mer_id' value='" . $payment['ecbank_webatm_inv_mer_id'] . "'>"; $def_url .= "<input type='hidden' name='inv_semail' value='" . $c_email . "'>"; for ($i = 0; $i < count($temp); $i++) { $def_url .= "<input type='hidden' name='prd_name[]' value='" . $temp[$i]['goods_name'] . "'>"; $def_url .= "<input type='hidden' name='prd_qry[]' value='" . intval($temp[$i]['goods_number']) . "'>"; $def_url .= "<input type='hidden' name='prd_price[]' value='" . intval($temp[$i]['goods_price']) . "'>"; } $def_url .= "<input type='hidden' name='prd_name[]' value=運費>"; $def_url .= "<input type='hidden' name='prd_qry[]' value=1>"; $def_url .= "<input type='hidden' name='prd_price[]' value='" . intval($order['shipping_fee']) . "'>"; } $def_url .= "<input type='submit' value='" . $GLOBALS['_LANG']['pay_button'] . "'>"; $def_url .= "</form><br />"; return $def_url; }
/** * 生成支付代码 * @param array $order 订单信息 * @param array $payment 支付方式信息 */ function get_code($order, $payment) { if (!defined('EC_CHARSET')) { $charset = 'utf-8'; } else { $charset = EC_CHARSET; } $gateway = 'http://wappaygw.alipay.com/service/rest.htm?'; /************************功能开始**************************/ //请求业务数据 $req_data = '<direct_trade_create_req>' . '<subject>' . $order['order_sn'] . '</subject>' . '<out_trade_no>' . $order['order_sn'] . '_' . $order['log_id'] . '</out_trade_no>' . '<total_fee>' . $order['order_amount'] . '</total_fee>' . '<seller_account_name>' . $payment['alipay_account'] . '</seller_account_name>' . '<call_back_url>' . return_url(basename(__FILE__, '.php')) . '</call_back_url>' . '<notify_url>' . $this->return_alipay_wap_url() . '</notify_url>' . '<out_user>' . $order['consignee'] . '</out_user>' . '<merchant_url>' . $GLOBALS['ecs']->url() . '</merchant_url>' . '<pay_expire>3600</pay_expire>' . '</direct_trade_create_req>'; $parameter = array('service' => 'alipay.wap.trade.create.direct', 'format' => 'xml', 'v' => '2.0', 'partner' => $payment['alipay_partner'], 'req_id' => date('Ymdhis') . rand(1000, 9999), 'sec_id' => 'MD5', 'req_data' => $req_data, "_input_charset" => $charset); ksort($parameter); reset($parameter); $param = ''; $sign = ''; foreach ($parameter as $key => $val) { $param .= "{$key}=" . urlencode($val) . "&"; $sign .= "{$key}={$val}&"; } $param = substr($param, 0, -1); $sign = substr($sign, 0, -1) . $payment['alipay_key']; /************************功能分割**************************/ //请求授权接口 $result = $this->post($gateway, $param . '&sign=' . md5($sign)); $result = urldecode($result); //URL转码 $result_array = explode('&', $result); //根据 & 符号拆分 //重构数组 $new_result_array = $temp_item = array(); if (is_array($result_array)) { foreach ($result_array as $vo) { $temp_item = explode('=', $vo, 2); //根据 & 符号拆分 $new_result_array[$temp_item[0]] = $temp_item[1]; } } /************************功能分割**************************/ $xml = simplexml_load_string($new_result_array['res_data']); $request_token = (array) $xml->request_token; //请求交易接口 $parameter = array('service' => 'alipay.wap.auth.authAndExecute', 'format' => 'xml', 'v' => $new_result_array['v'], 'partner' => $new_result_array['partner'], 'sec_id' => $new_result_array['sec_id'], 'req_data' => '<auth_and_execute_req><request_token>' . $request_token[0] . '</request_token></auth_and_execute_req>', 'request_token' => $request_token[0], '_input_charset' => $charset); ksort($parameter); reset($parameter); $param = ''; $sign = ''; foreach ($parameter as $key => $val) { $param .= "{$key}=" . urlencode($val) . "&"; $sign .= "{$key}={$val}&"; } $param = substr($param, 0, -1); $sign = substr($sign, 0, -1) . $payment['alipay_key']; /************************生成支付链接**************************/ $button = '<div style="text-align:center"><input type="button" onclick="window.open(\'' . $gateway . $param . '&sign=' . md5($sign) . '\')" value="' . $GLOBALS['_LANG']['pay_button'] . '" class="c-btn3" /></div>'; return $button; }
/** * 提交函数 */ function get_code($order, $payment) { //include_once(ROOT_PATH.'includes/iconv/cls_iconv.php'); //$iconv = new Chinese(ROOT_PATH); $c_mid = trim($payment['gw_ecpay_union_account']); //$c_order = $order['order_sn']; $c_order = $order['log_id']; $c_name = trim($order['consignee']); $c_address = trim($order['address']); $c_tel = trim($order['tel']); $c_post = trim($order['zipcode']); $c_email = trim($order['email']); $c_orderamount = $order['order_amount']; $c_ymd = date('Ymd', time()); $c_moneytype = "0"; $c_retflag = "1"; $c_returl = return_url(basename(__FILE__, '.php')); $bk_posturl = return_url(basename(__FILE__, '.php')); $notifytype = "0"; $c_language = $payment['gw_ecpay_union_language']; $c_memo1 = $order['log_id']; $c_memo2 = $order['log_id']; //$srcStr = $c_mid . $c_order . $c_orderamount . $c_ymd . $c_moneytype . $c_retflag . $c_returl . $c_paygate . $c_memo1 . $c_memo2 . $notifytype . $c_language . $c_pass; //$c_signstr = md5($srcStr); $def_url = '<br /><form style="text-align:center;" method=post action="https://ecpay.com.tw/form_Sc_to5.php">'; $def_url .= "<input type='hidden' name='client' value='" . $c_mid . "'>"; $def_url .= "<input type='hidden' name='act' value='auth'>"; $def_url .= "<input type='hidden' name='od_sob' value='" . $c_order . "'>"; $def_url .= "<input type='hidden' name='名稱' value='" . $c_name . "'>"; $def_url .= "<input type='hidden' name='地址' value='" . $c_address . "'>"; $def_url .= "<input type='hidden' name='電話' value='" . $c_tel . "'>"; $def_url .= "<input type='hidden' name='email' value='" . $c_email . "'>"; $def_url .= "<input type='hidden' name='amount' value='" . $c_orderamount . "'>"; $def_url .= "<input type='hidden' name='時間' value='" . $c_ymd . "'>"; $def_url .= "<input type='hidden' name='mallurl' value='" . $bk_posturl . "'>"; $def_url .= "<input type='hidden' name='CUPus' value='1'>"; $def_url .= "<input type='hidden' name='bk_posturl' value='" . $c_returl . "'>"; $temp = order_goods($order['order_id']); //判斷是否使用電子發票 if ($payment['gw_ecpay_union_inv_active'] == "1") { $def_url .= "<input type='hidden' name='inv_active' value='1'>"; $def_url .= "<input type='hidden' name='inv_mer_id' value='" . $payment['gw_ecpay_union_mer_id'] . "'>"; $def_url .= "<input type='hidden' name='inv_semail' value='" . $c_email . "'>"; for ($i = 0; $i < count($temp); $i++) { $def_url .= "<input type='hidden' name='prd_name[]' value='" . $temp[$i]['goods_name'] . "'>"; $def_url .= "<input type='hidden' name='prd_qry[]' value='" . intval($temp[$i]['goods_number']) . "'>"; $def_url .= "<input type='hidden' name='prd_price[]' value='" . intval($temp[$i]['goods_price']) . "'>"; } $def_url .= "<input type='hidden' name='prd_name[]' value=運費>"; $def_url .= "<input type='hidden' name='prd_qry[]' value=1>"; $def_url .= "<input type='hidden' name='prd_price[]' value='" . intval($order['shipping_fee']) . "'>"; } $def_url .= "<input type='submit' value='" . $GLOBALS['_LANG']['pay_button'] . "'>"; $def_url .= "</form><br />"; return $def_url; }
public function __construct($config = array()) { if (!empty($config)) { $this->set_config($config); } $this->config['gateway_url'] = 'https://gw.tenpay.com/gateway/pay.htm'; $this->config['gateway_method'] = 'POST'; $this->config['notify_url'] = return_url('tenpay', 1); $this->config['return_url'] = return_url('tenpay'); }
public function __construct($config = array()) { if (!empty($config)) { $this->set_config($config); } $this->config['gateway_url'] = 'https://pay3.chinabank.com.cn/PayGate'; $this->config['gateway_method'] = 'POST'; $this->config['return_url'] = return_url('chinabank'); Loader::func('pay:alipay'); }
/** * 生成支付代码 * * @param array $order * 订单信息 * @param array $payment * 支付方式信息 */ function get_code($order, $payment) { if (!defined('EC_CHARSET')) { $charset = 'utf-8'; } else { $charset = EC_CHARSET; } $gateway = 'http://wappaygw.alipay.com/service/rest.htm?'; // 请求业务数据 $req_data = '<direct_trade_create_req>' . '<subject>' . $order['order_sn'] . '</subject>' . '<out_trade_no>' . $order['order_sn'] . 'O' . $order['log_id'] . '</out_trade_no>' . '<total_fee>' . $order['order_amount'] . '</total_fee>' . '<seller_account_name>' . $payment['alipay_account'] . '</seller_account_name>' . '<call_back_url>' . return_url(basename(__FILE__, '.php'), array('type' => 0)) . '</call_back_url>' . '<notify_url>' . return_url(basename(__FILE__, '.php'), array('type' => 1)) . '</notify_url>' . '<out_user>' . $order['consignee'] . '</out_user>' . '<merchant_url>' . __URL__ . '</merchant_url>' . '<pay_expire>3600</pay_expire>' . '</direct_trade_create_req>'; $parameter = array('service' => 'alipay.wap.trade.create.direct', 'format' => 'xml', 'v' => '2.0', 'partner' => $payment['alipay_partner'], 'req_id' => $order['order_sn'] . $order['log_id'], 'sec_id' => 'MD5', 'req_data' => $req_data, "_input_charset" => $charset); ksort($parameter); reset($parameter); $param = ''; $sign = ''; foreach ($parameter as $key => $val) { $param .= "{$key}=" . urlencode($val) . "&"; $sign .= "{$key}={$val}&"; } $param = substr($param, 0, -1); $sign = substr($sign, 0, -1) . $payment['alipay_key']; // 请求授权接口 $result = Http::doPost($gateway, $param . '&sign=' . md5($sign)); $result = urldecode($result); // URL转码 $result_array = explode('&', $result); // 根据 & 符号拆分 // 重构数组 $new_result_array = $temp_item = array(); if (is_array($result_array)) { foreach ($result_array as $vo) { $temp_item = explode('=', $vo, 2); // 根据 & 符号拆分 $new_result_array[$temp_item[0]] = $temp_item[1]; } } $xml = simplexml_load_string($new_result_array['res_data']); $request_token = (array) $xml->request_token; // 请求交易接口 $parameter = array('service' => 'alipay.wap.auth.authAndExecute', 'format' => 'xml', 'v' => $new_result_array['v'], 'partner' => $new_result_array['partner'], 'sec_id' => $new_result_array['sec_id'], 'req_data' => '<auth_and_execute_req><request_token>' . $request_token[0] . '</request_token></auth_and_execute_req>', 'request_token' => $request_token[0], '_input_charset' => $charset); ksort($parameter); reset($parameter); $param = ''; $sign = ''; foreach ($parameter as $key => $val) { $param .= "{$key}=" . urlencode($val) . "&"; $sign .= "{$key}={$val}&"; } $param = substr($param, 0, -1); $sign = substr($sign, 0, -1) . $payment['alipay_key']; /* 生成支付按钮 */ //$button = '<script type="text/javascript" src="'.__PUBLIC__.'/js/ap.js"></script><div><input type="button" class="btn btn-info ect-btn-info ect-colorf ect-bg l-pay-btn" onclick="javascript:_AP.pay(\'' . $gateway . $param . '&sign=' . md5($sign) . '\')" value="' . L('pay_button') . '" class="c-btn3" /></div>'; $button = '<script type="text/javascript" src="' . __PUBLIC__ . '/js/ap.js"></script><input type="button" class="btn btn-info ect-btn-info ect-colorf ect-bg l-pay-btn" onclick="javascript:_AP.pay(\'' . $gateway . $param . '&sign=' . md5($sign) . '\')" value="' . L('pay_button') . '" class="c-btn3" />'; return $button; }
/** * 生成支付代码 * @param array $order 订单信息 * @param array $payment 支付方式信息 */ function get_code($order, $payment) { $data_order_id = $order['log_id']; $data_amount = $order['order_amount']; $data_return_url = return_url(basename(__FILE__, '.php')); $data_pay_account = $payment['paypalcn_account']; $data_notify_url = return_url(basename(__FILE__, '.php')); $cancel_return = $GLOBALS['ecs']->url(); $def_url = '<br /><form style="text-align:center;" action="https://www.paypal.com/cgi-bin/webscr" method="post">' . "<input type='hidden' name='cmd' value='_xclick'>" . "<input type='hidden' name='business' value='{$data_pay_account}'>" . "<input type='hidden' name='return' value='{$data_return_url}'>" . "<input type='hidden' name='amount' value='{$data_amount}'>" . "<input type='hidden' name='invoice' value='{$data_order_id}'>" . "<input type='hidden' name='charset' value='utf-8'>" . "<input type='hidden' name='no_shipping' value='1'>" . "<input type='hidden' name='no_note' value='0'>" . "<input type='hidden' name='currency_code' value='CNY'>" . "<input type='hidden' name='notify_url' value='{$data_notify_url}'>" . "<input type='hidden' name='rm' value='2'>" . "<input type='hidden' name='cancel_return' value='{$cancel_return}'>" . "<input type='submit' value='" . $GLOBALS['_LANG']['paypalcn_button'] . "'>" . "</form><br />"; return $def_url; }
/** * 生成支付代码 * @param array $order 订单信息 * @param array $payment 支付方式信息 */ function get_code($order, $payment) { $c_mid = trim($payment['c_mid']); //商户编号,在申请商户成功后即可获得,可以在申请商户成功的邮件中获取该编号 $c_order = $order['order_sn']; //商户网站依照订单号规则生成的订单号,不能重复 $c_name = ""; //商户订单中的收货人姓名 $c_address = ""; //商户订单中的收货人地址 $c_tel = ""; //商户订单中的收货人电话 $c_post = ""; //商户订单中的收货人邮编 $c_email = ""; //商户订单中的收货人Email $c_orderamount = $order['order_amount']; //商户订单总金额 if (!empty($order['add_time'])) { $c_ymd = local_date('Ymd', $order['add_time']); } else { $c_ymd = local_date('Ymd', gmtime()); } //$c_ymd = substr($order['order_sn'], 0, 8); //商户订单的产生日期,格式为"yyyymmdd",如20050102 $c_moneytype = $payment['c_moneytype']; //支付币种,0为人民币 $c_retflag = "1"; //商户订单支付成功后是否需要返回商户指定的文件,0:不用返回 1:需要返回 $c_paygate = empty($payment['c_paygate']) ? '' : trim($payment['c_paygate']); //如果在商户网站选择银行则设置该值,具体值可参见《云网支付@网技术接口手册》附录一;如果来云网支付@网选择银行此项为空值。 $c_returl = return_url(basename(__FILE__, '.php')); //如果c_retflag为1时,该地址代表商户接收云网支付结果通知的页面,请提交完整文件名(对应范例文件:GetPayNotify.php) $c_memo1 = abs(crc32(trim($payment['c_memo1']))); //商户需要在支付结果通知中转发的商户参数一 if (empty($order['order_id'])) { $c_memo2 = "voucher"; //商户需要在支付结果通知中转发的商户参数二 } else { $c_memo2 = ''; } $c_pass = trim($payment['c_pass']); //支付密钥,请登录商户管理后台,在帐户信息-基本信息-安全信息中的支付密钥项 $notifytype = "0"; //0普通通知方式/1服务器通知方式,空值为普通通知方式 $c_language = trim($payment['c_language']); //对启用了国际卡支付时,可使用该值定义消费者在银行支付时的页面语种,值为:0银行页面显示为中文/1银行页面显示为英文 $srcStr = $c_mid . $c_order . $c_orderamount . $c_ymd . $c_moneytype . $c_retflag . $c_returl . $c_paygate . $c_memo1 . $c_memo2 . $notifytype . $c_language . $c_pass; //说明:如果您想指定支付方式(c_paygate)的值时,需要先让用户选择支付方式,然后再根据用户选择的结果在这里进行MD5加密,也就是说,此时,本页面应该拆分为两个页面,分为两个步骤完成。 //--对订单信息进行MD5加密 //商户对订单信息进行MD5签名后的字符串 $c_signstr = md5($srcStr); $def_url = '<form name="payForm1" action="https://www.cncard.net/purchase/getorder.asp" method="POST" target="_blank">' . "<input type=\"hidden\" name=\"c_mid\" value=\"{$c_mid}\" />" . "<input type=\"hidden\" name=\"c_order\" value=\"{$c_order}\" />" . "<input type=\"hidden\" name=\"c_name\" value=\"{$c_name}\" />" . "<input type=\"hidden\" name=\"c_address\" value=\"{$c_address}\" />" . "<input type=\"hidden\" name=\"c_tel\" value=\"{$c_tel}\" />" . "<input type=\"hidden\" name=\"c_post\" value=\"{$c_post}\" />" . "<input type=\"hidden\" name=\"c_email\" value=\"{$c_email}\" />" . "<input type=\"hidden\" name=\"c_orderamount\" value=\"{$c_orderamount}\" />" . "<input type=\"hidden\" name=\"c_ymd\" value=\"{$c_ymd}\" />" . "<input type=\"hidden\" name=\"c_moneytype\" value=\"{$c_moneytype}\" />" . "<input type=\"hidden\" name=\"c_retflag\" value=\"{$c_retflag}\" />" . "<input type=\"hidden\" name=\"c_paygate\" value=\"{$c_paygate}\" />" . "<input type=\"hidden\" name=\"c_returl\" value=\"{$c_returl}\" />" . "<input type=\"hidden\" name=\"c_memo1\" value=\"{$c_memo1}\" />" . "<input type=\"hidden\" name=\"c_memo2\" value=\"{$c_memo2}\" />" . "<input type=\"hidden\" name=\"c_language\" value=\"{$c_language}\" />" . "<input type=\"hidden\" name=\"notifytype\" value=\"{$notifytype}\" />" . "<input type=\"hidden\" name=\"c_signstr\" value=\"{$c_signstr}\" />" . "<input type=\"submit\" name=\"submit\" value=\"" . $GLOBALS['_LANG']['cncard_button'] . "\" />" . "</form>"; return $def_url; }
/** * 生成支付代码 * @param array $order 订单信息 * @param array $payment 支付方式信息 */ function get_code($order, $payment) { $data_order_id = $order['log_id']; $data_amount = $order['order_amount']; $data_return_url = return_url(basename(__FILE__, '.php'), array('type' => 0)); $data_pay_account = $payment['paypal_account']; $currency_code = $payment['paypal_currency']; $data_notify_url = return_url(basename(__FILE__, '.php'), array('type' => 1)); $cancel_return = __URL__; $def_url = '<br /><form style="text-align:center;" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">' . "<input type='hidden' name='cmd' value='_xclick'>" . "<input type='hidden' name='business' value='{$data_pay_account}'>" . "<input type='hidden' name='item_name' value='{$order['order_sn']}'>" . "<input type='hidden' name='amount' value='{$data_amount}'>" . "<input type='hidden' name='currency_code' value='{$currency_code}'>" . "<input type='hidden' name='return' value='{$data_return_url}'>" . "<input type='hidden' name='invoice' value='{$data_order_id}'>" . "<input type='hidden' name='charset' value='utf-8'>" . "<input type='hidden' name='no_shipping' value='1'>" . "<input type='hidden' name='no_note' value=''>" . "<input type='hidden' name='notify_url' value='{$data_notify_url}'>" . "<input type='hidden' name='rm' value='2'>" . "<input type='hidden' name='cancel_return' value='{$cancel_return}'>" . "<input type='submit' value='" . L('paypal_button') . "' class='btn btn-info' style='padding:0.8rem'>" . "</form><br />"; return $def_url; }
public function __construct($config = array()) { $this->config = $config; if ($this->config['paypal_sandbox_mode']) { $this->config['gateway_url'] = "https://www.sandbox.paypal.com/cgi-bin/webscr"; } else { $this->config['gateway_url'] = "https://www.paypal.com/cgi-bin/webscr"; } $this->config['gateway_method'] = 'POST'; $record = intval($this->config['record']); $this->config['notify_url'] = return_url('paypal', $record); $this->config['return_url'] = return_url('paypal', $record); }
public function __construct($config = array()) { if (!empty($config)) $this->set_config($config); if ($this->config['service_type']==1) $this->config['service'] = 'trade_create_by_buyer'; elseif($this->config['service_type']==2) $this->config['service'] = 'create_direct_pay_by_user'; else $this->config['service'] = 'create_partner_trade_by_buyer'; $this->config['gateway_url'] = 'https://www.alipay.com/cooperate/gateway.do?_input_charset='.CHARSET; $this->config['gateway_method'] = 'POST'; $this->config['notify_url'] = return_url('alipay',1); $this->config['return_url'] = return_url('alipay'); pc_base::load_app_func('alipay'); }
/** * 生成支付代码 * @param array $order 订单信息 * @param array $payment 支付方式信息 */ function get_code($order, $payment) { $data_order_id = $order['log_id']; $data_amount = $order['order_amount']; $data_return_url = return_url('xpay'); $data_tid = $payment['xpay_tid']; $data_key = md5("{$payment['xpay_key']}:{$data_amount},{$data_order_id},{$data_tid},bank,,sell,,2.0"); $def_url = '<br /><form style="text-align:center;" method=post action="http://pay.xpay.cn/pay.aspx">'; $def_url .= "<input type=hidden name=tid value='{$data_tid}'>"; // 商户交易号 $def_url .= "<input type=hidden name=bid value='{$data_order_id}'>"; // 订单号 $def_url .= "<input type=hidden name=prc value='{$data_amount}'>"; // 订单总金额 $def_url .= "<input type=hidden name=card value='bank'>"; // 默认支付方式 $def_url .= "<input type=hidden name=scard value=''>"; // 支持支付种类 $def_url .= "<input type=hidden name=actioncode value='sell'>"; // 交易码 $def_url .= "<input type=hidden name=actionParameter value=''>"; // 业务代码参数 $def_url .= "<input type=hidden name=ver value='2.0'>"; // 版本号 $def_url .= "<input type=hidden name=md value='{$data_key}'>"; // 订单MD5校验码 $def_url .= "<input type=hidden name=url value='{$data_return_url}'>"; // 支付交易完成后返回到该url,支付结果以get方式发送 $def_url .= "<input type='hidden' name='pdt' value='{$data_order_id}'>"; // 产品名称或交易说明 $def_url .= "<input type='hidden' name='type' value=''>"; // 产品类型或交易分类 $def_url .= "<input type='hidden' name='username' value=''>"; // 消费购买用户名 $def_url .= "<input type='hidden' name='lang' value='gb2312'>"; // 语言 $def_url .= "<input type='hidden' name='remark1' value=''>"; // 备注字段 $def_url .= "<input type='hidden' name='disableemail' value=''>"; // 隐藏交易邮箱 $def_url .= "<input type='hidden' name='disablealert' value=''>"; // 隐藏弹窗提示 $def_url .= "<input type='hidden' name='sitename' value=''>"; // 商户网站名称 $def_url .= "<input type='hidden' name='siteurl' value=''>"; // 商户网站域名 $def_url .= "<input type=submit value='" . $GLOBALS['_LANG']['xpay_button'] . "'>"; $def_url .= "</form>"; return $def_url; }