|
|
@@ -327,12 +327,12 @@ class WxService extends BaseService
|
|
|
if (200 === $resp->getStatusCode()) {
|
|
|
$resp_data = json_decode($resp->getBody()->__toString(), true);
|
|
|
$res = [
|
|
|
- 'appid' => $config['appid'],
|
|
|
+ "appid" => $config['appid'],
|
|
|
"partnerid" => $config['mch_id'],
|
|
|
"prepayid" => $resp_data['prepay_id'],
|
|
|
- 'package' => "Sign=WXPay",
|
|
|
- 'noncestr' => Formatter::nonce(),
|
|
|
- 'timestamp' => time(),
|
|
|
+ "package" => "Sign=WXPay",
|
|
|
+ "noncestr" => Formatter::nonce(),
|
|
|
+ "timestamp" => time(),
|
|
|
];
|
|
|
$res['sign'] = $this->sign($res['appid'] . "\n" . $res["timestamp"] . "\n" . $res["noncestr"] . "\n" . $res["prepayid"] . "\n", $config["mch_private_key_file_path"]);
|
|
|
return $this->ok($res);
|