This commit is contained in:
aozhiwei 2023-08-02 16:28:33 +08:00
parent 2e0c04673f
commit 935db93ac8

View File

@ -211,6 +211,7 @@ class ShopController extends BaseAuthedController {
return; return;
} }
$secretKey = 'e58f(1dcf22245985c21ff31f2f66ec4a^^TDAFF(Adaf)';
$nowTime = myself()->_getNowTime(); $nowTime = myself()->_getNowTime();
$fiatAmount = $goodsMeta['price']; $fiatAmount = $goodsMeta['price'];
$orderId = OrderId::gen(); $orderId = OrderId::gen();
@ -226,6 +227,21 @@ class ShopController extends BaseAuthedController {
$orderId, $orderId,
$nowTime $nowTime
); );
/*
签名方式:将所有的参数用&连接起来做md5加secret_key
*/
$signStr = implode("&", $params);
$sign = md5($signStr . $secretKey);
array_push(
$params,
$sign
);
myself()->_rspData(
array(
'order_id' => $orderId,
'params' => $params
)
);
} }
public function queryInAppBalance() public function queryInAppBalance()