站点工具

New release available: 2020-07-29 "Hogfather". upgrade now! [51.3] (what's this?)
New release candidate 3 available: 2020-06-09 "Hogfather". upgrade now! [51.2] (what's this?)
New release candidate 2 available: 2020-06-01 "Hogfather". upgrade now! [51.1] (what's this?)
New release candidate available: 2020-06-01 "Hogfather". upgrade now! [51] (what's this?)
Hotfix release available: 2018-04-22c "Greebo". upgrade now! [50.3] (what's this?)
Hotfix release available: 2018-04-22b "Greebo". upgrade now! [50.2] (what's this?)
Hotfix release available: 2018-04-22a "Greebo". upgrade now! [50.1] (what's this?)
New release available: 2018-04-22 "Greebo". upgrade now! [50] (what's this?)
Hotfix release available: 2017-02-19g "Frusterick Manners". upgrade now! [49.7] (what's this?)
Hotfix release available: 2017-02-19f "Frusterick Manners". upgrade now! [49.6] (what's this?)
Hotfix release available: 2017-02-19e "Frusterick Manners". upgrade now! [49.5] (what's this?)
Hotfix release available fixing CVE-2017-12979 and CVE-2017-12980: 2017-02-19d "Frusterick Manners". upgrade now! [49.4] (what's this?)
Hotfix release available fixing CVE-2017-12583: 2017-02-19c "Frusterick Manners". upgrade now! [49.3] (what's this?)
Hotfix release available fixing security token and media manager: 2017-02-19b "Frusterick Manners". upgrade now! [49.2] (what's this?)
Hotfix release available fixing install and media manager issues: 2017-02-19a "Frusterick Manners". upgrade now! [49.1] (what's this?)
New release available: 2017-02-19 "Frusterick Manners". upgrade now! [49] (what's this?)
Hotfix release available: 2016-06-26e "Elenor of Tsort". upgrade now! [48.5] (what's this?)
Hotfix release available fixing CVE-2017-12979 and CVE-2017-12980: 2016-06-26d "Elenor of Tsort". upgrade now! [48.4] (what's this?)
Hotfix release available fixing CVE-2017-12583: 2016-06-26c "Elenor of Tsort". upgrade now! [48.3] (what's this?)
Hotfix release available fixing security token: 2016-06-26b "Elenor of Tsort". upgrade now! [48.2] (what's this?)
Hotfix release available fixing authad issues: 2016-06-26a "Elenor of Tsort". upgrade now! [48.1] (what's this?)
New release available: 2016-06-26 "Elenor of Tsort". upgrade now! [48] (what's this?)
Hotfix release available: 2015-08-10a "Detritus". upgrade now! [47.1] (what's this?)
New release available: 2015-08-10 "Detritus". upgrade now! [47] (what's this?)
Hotfix release available: 2014-09-29d "Hrun". upgrade now! [46.4] (what's this?)
Hotfix release available: 2014-09-29c "Hrun". upgrade now! [46.3] (what's this?)
Hotfix release available to prevent XSS attack via SWF uploads: 2014-09-29b "Hrun". upgrade now! [46.2] (what's this?)
Hotfix release available: 2014-09-29a "Hrun". upgrade now! [46.1] (what's this?)
New release available: 2014-09-29 "Hrun". upgrade now! [46] (what's this?)
Hotfix release available: 2014-05-05e "Ponder Stibbons". upgrade now! [44.5] (what's this?)
Hotfix release available: 2014-05-05d "Ponder Stibbons". upgrade now! [44.4] (what's this?)
Hotfix release available to prevent XSS attack via SWF uploads: 2014-05-05c "Ponder Stibbons". upgrade now! [44.3] (what's this?)
Security Hotfix 2014-05-05b to prevent zero byte attacks on external auth systems is available. upgrade now! [44.2] (what's this?)
Security Hotfix 2014-05-05a for Issue 765 available. upgrade now! [44.1] (what's this?)

weidian_pay

校园微店订单支付接口

1、校园微店订单支付接口

https://m.repai.com/pay/gateway_api/orderid/15位订单号/pay_gateway/支付网关/total_price/1000/order_type/1/appkey/100042/token/防篡改验证串/?order_name=商品名称简介&callback_url=http%3A%2F%2Fb.m.repai.com%2Faaa%2Fbbb%2F

输入参数说明:

  • orderid 【校园微店订单号,生成函数如下:】
<?php
//生成一个15字节长的订单号
function model_item_orderid_create() {
		$orderid = microtime(true);
		$orderid = $orderid * 10000;
		$orderid = $orderid.mt_rand(0,9);
		return $orderid;
	}
?>
  • pay_gateway 【支付网关:2为支付宝WAP网页支付,3为支付宝客户端支付,4为微信支付,5为微博支付,6为中信银行异度支付。目前可以使用的支付网关为2支付宝和4微信
  • appkey 【校园微店iOS为100042,Android为100043;】
  • total_price 【付款金额,以元为单位,精细到分,例如:10元、9.99元】
  • order_type 【订单类型:1为校园微店购物订单,默认填1】
  • order_name 【urlencode的订单名称,例如:康师傅方便面等20件商品】
  • callback_url 【urlencode编码的回调地址(该网址通过服务器内部调用,不会对用户显示),不能含有?、&、=等参数,例如:http://b.m.repai.com/aaa/bbb/,支付完成后,会回调此接口,传递:http://b.m.repai.com/aaa/bbb/?orderid=热拍卖家订单号,此接口拿到orderid后,通过《2、校园微店订单查询接口》查询订单支付状态
  • token 【防篡改验证串,token值的组成为,以PHP代码为例:md5(“RP”.$appkey.$appsecret.$orderid.$total_price.$order_type) 由卖家PHP端生成,其中 $appsecret为密钥,每个appkey对应的不同的密钥,密钥请询问张宴】
  • 同步网页回调,请提供一个回调地址,该网址对用户可见。

示例: https://m.repai.com/pay/gateway_api/orderid/140921454462674/pay_gateway/2/total_price/0.01/order_type/1/appkey/100042/token/335a90ea8183612b35adbbd9a31b362d/?order_name=康师傅方便面&callback_url=http%3A%2F%2Fb.m.repai.com%2Faaa%2Fbbb%2F

输出参数说明:

  • 跳转到同步网页,并异步回调 callback_url 地址。

2、热拍卖家订单查询接口(PHP内部调用)

<?php
require_once("/Data/webapps/m.repai.com/m/phpapi.php"); //PHP引用方式,需要引用的框架入口文件
$result = phpapi_mvc("pay", "weidian_order_info_phpapi", array("orderid" => "140921454462673"));
var_dump($result);
?>

输入参数说明:

  • orderid 【校园微店订单号】

输出参数说明:

示例如下:

array(11) {
	["orderid"]=>
	string(15) "140738589619194"
	["pay_gateway"]=>
	int(2)
	["total_price"]=>
	string(4) "0.01"
	["order_type"]=>
	string(1) "1"
	["appkey"]=>
	string(6) "100042"
	["controller"]=>
	string(3) "pay"
	["action"]=>
	string(11) "gateway_api"
	["parameters"]=>
	string(121) "orderid/140738589619194/pay_gateway/2/total_price/0.01/order_type/1/appkey/100004/token/7ea4a5c865b500a8ce7e4974cbafbdf0/"
	["callback_url"]=>
	string(29) "http://b.m.repai.com/aaa/bbb/"
	["alipay_trade_no"]=>
	string(16) "2014080753985469"
	["is_payment"]=>
	int(1)
}
  • orderid 【校园微店订单号】
  • total_price 【支付金额】
  • pay_gateway 【支付网关:2为支付宝WAP网页支付,3为支付宝客户端支付,4为微信支付,5为微博支付,6为中信银行异度支付】
  • is_payment 【最重要参数:1为成功付款并到账,0为没有完成支付

返回首页

weidian_pay.txt · 最后更改: 2014/08/28 18:15 由 106.2.171.114