当前位置: 首页>>代码示例>>PHP>>正文


PHP return_url函数代码示例

本文整理汇总了PHP中return_url函数的典型用法代码示例。如果您正苦于以下问题:PHP return_url函数的具体用法?PHP return_url怎么用?PHP return_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了return_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_code

 /**
  * 生成支付代码
  * @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;
 }
开发者ID:a494008974,项目名称:bzbshop,代码行数:33,代码来源:ips.php

示例2: pay_from

 /**
  * 生成支付代码
  * @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;
 }
开发者ID:dlpc,项目名称:ecshop,代码行数:30,代码来源:pay_alipay.php

示例3: get_code

 /**
  * 生成支付代码
  * @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;
 }
开发者ID:styleyoung,项目名称:taoshop,代码行数:40,代码来源:alipay.php

示例4: get_code

 /**
  * 生成支付代码
  *
  * @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;
 }
开发者ID:noikiy,项目名称:shop-3,代码行数:34,代码来源:tenpay.php

示例5: actionReturn

 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;
 }
开发者ID:rocketyang,项目名称:mincms,代码行数:32,代码来源:SohuController.php

示例6: actionReturn

 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;
 }
开发者ID:rocketyang,项目名称:mincms,代码行数:27,代码来源:GithubController.php

示例7: actionReturn

 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;
 }
开发者ID:rocketyang,项目名称:mincms,代码行数:26,代码来源:SinaController.php

示例8: get_code

 /**
  * 提交函數
  */
 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>';
     }
 }
开发者ID:sac071213,项目名称:dev,代码行数:33,代码来源:ecshop_allpay_atm.php

示例9: __construct

	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');
	}
开发者ID:hxzyzz,项目名称:ddc,代码行数:7,代码来源:Sndapay.class.php

示例10: actionReturn

 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());
         }
     }
 }
开发者ID:rocketyang,项目名称:mincms,代码行数:32,代码来源:TwitterController.php

示例11: get_code

 /**
  * 提交函數
  */
 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']);
 }
开发者ID:sac071213,项目名称:dev,代码行数:32,代码来源:ecshop_ecpay_barcode.php

示例12: get_code

 /**
  * 生成支付代码
  * @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;
 }
开发者ID:nanhuacrab,项目名称:ecshop,代码行数:33,代码来源:chinabank.php

示例13: get_code

 /**
  * 生成支付代码
  * @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;
 }
开发者ID:jinjiang2009,项目名称:exiao_online,代码行数:32,代码来源:ctopay.php

示例14: get_code

 /**
  * 提交函数
  */
 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;
 }
开发者ID:aaron1102,项目名称:ecbank,代码行数:38,代码来源:allpay_card24.php

示例15: get_code

 /**
  * 生成支付代码
  * @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;
 }
开发者ID:Ryan007,项目名称:mybb,代码行数:39,代码来源:yeepay.php


注:本文中的return_url函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。