|
|
@@ -7,6 +7,7 @@ use App\Models\MemberModel;
|
|
|
use App\Models\UserModel;
|
|
|
use App\Services\RedisService;
|
|
|
use App\Services\SnapshotService;
|
|
|
+use App\Services\WechatService;
|
|
|
use Illuminate\Support\Facades\Session;
|
|
|
|
|
|
/**
|
|
|
@@ -30,8 +31,17 @@ class TestController extends BaseController
|
|
|
}
|
|
|
|
|
|
public function index(){
|
|
|
-
|
|
|
-
|
|
|
+ $prepayId = 'wx201410272009395522657a690389285100';
|
|
|
+ $unified['nonce_str'] = '5K8264ILTKCH16CQ2502SI8ZNMTM67VS';
|
|
|
+ $time = '1414561699';
|
|
|
+ $data = [
|
|
|
+ "appId" => 'wx8888888888888888',
|
|
|
+ "timeStamp" => "{$time}", //这里是字符串的时间戳,不是int,所以需加引号
|
|
|
+ "nonceStr" => isset($unified['nonce_str']) ? trim($unified['nonce_str']) : WechatService::createNonceStr(32),
|
|
|
+ "package" => "prepay_id=" . $prepayId,
|
|
|
+ ];
|
|
|
+ $result = WechatService::getPaySignV3($data);
|
|
|
+var_dump($result);
|
|
|
return message(1005,'true',['ddd'=> []]);
|
|
|
|
|
|
}
|