This commit is contained in:
aozhiwei 2019-08-21 19:42:32 +08:00
parent 05cfc7c51c
commit d5a109e2f1
2 changed files with 14 additions and 2 deletions

@ -1 +1 @@
Subproject commit f401b4f89a47b3f4d2835a647d68ad11deac9275 Subproject commit 7ecf558df93a2656631782e76c6d35697da72808

View File

@ -412,10 +412,22 @@ class PayController{
$itemid = $_REQUEST['itemid']; $itemid = $_REQUEST['itemid'];
$itemnum = $_REQUEST['itemnum']; $itemnum = $_REQUEST['itemnum'];
$params = array(
'account_id' => $_REQUEST['account_id'],
'itemid' => 1,
'itemnum' => 1,
'price' => 0.01
);
$timestamp = time();
$params['sign'] = phpcommon\md5Sign($params, '06ba97e28ea905b0b7ed5477746b07f1', $timestamp);
$params['timestamp'] = $timestamp;
$iv = 'wx1dd2f605f4f8496b';
$key = 'c868a478c81ff3c168b35d703f787d3c';
$str_encoded = '2001_' . base64_encode(phpcommon\aesEncrypt(json_encode($params), $iv, $key));
echo json_encode(array( echo json_encode(array(
'errcode' => 0, 'errcode' => 0,
'errmsg'=> '', 'errmsg'=> '',
'data' => 'hello' 'data' => $str_encoded
)); ));
} }
} }