支付逻辑测试
This commit is contained in:
@@ -80,6 +80,13 @@ class Wechat
|
|||||||
*/
|
*/
|
||||||
public function payment()
|
public function payment()
|
||||||
{
|
{
|
||||||
|
$userId = $GLOBALS['data']['userid'];
|
||||||
|
if (empty($userId)) {
|
||||||
|
return show("未登录!", NEED_LOGIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
$user = AppUser::find($userId);
|
||||||
|
|
||||||
$notifyUrl = Route::buildUrl('wechat/paid')
|
$notifyUrl = Route::buildUrl('wechat/paid')
|
||||||
->suffix(false)
|
->suffix(false)
|
||||||
->domain(true);
|
->domain(true);
|
||||||
@@ -91,7 +98,7 @@ class Wechat
|
|||||||
'total_fee' => 100,
|
'total_fee' => 100,
|
||||||
'notify_url' => $notifyUrl,
|
'notify_url' => $notifyUrl,
|
||||||
'trade_type' => 'JSAPI',
|
'trade_type' => 'JSAPI',
|
||||||
'openid' => '$openid',
|
'openid' => $user->openid,
|
||||||
]);
|
]);
|
||||||
dump($unify);
|
dump($unify);
|
||||||
// $prepayId = $unify->prepay_id;
|
// $prepayId = $unify->prepay_id;
|
||||||
|
|||||||
Reference in New Issue
Block a user