|
@@ -115,7 +115,7 @@ class Wechat extends Api
|
|
|
$plan_id = WechatPlan::where('price',$price)->value('plan_id');
|
|
|
$p_id = WechatPlan::where('price',$price)->value('id');
|
|
|
$plan_id=11;
|
|
|
- try {
|
|
|
+// try {
|
|
|
// $notify_url=Request::instance()->domain() . "/api/wechat/notify/" . $cid; //回调接口
|
|
|
$app_id='wx5681205d1ef4d9d3';
|
|
|
$mch_id ='1623907696';
|
|
@@ -146,9 +146,8 @@ class Wechat extends Api
|
|
|
'version' => $version,
|
|
|
|
|
|
);
|
|
|
- var_dump($uid);
|
|
|
- var_dump($price);
|
|
|
- var_dump($array);
|
|
|
+
|
|
|
+
|
|
|
ksort($array);
|
|
|
$xml='';
|
|
|
foreach ($array as $key => $value){
|
|
@@ -160,6 +159,7 @@ class Wechat extends Api
|
|
|
@file_put_contents("quanju.txt", $sign.'签名');
|
|
|
$url='https://api.mch.weixin.qq.com/papay/entrustweb?'.$xml.'&sign='. $sign;
|
|
|
@file_put_contents("quanju.txt", $url.'链接');
|
|
|
+ var_dump($url);
|
|
|
// $response = $this->curl_get($url);
|
|
|
// $url=$this->OfficialAccountSigning($app_id,$mch_id,$plan_id,$contract_code,$request_serial,$contract_display_account,$notify_url,$version,$sign,$timestamp);
|
|
|
// @file_put_contents("quanju.txt", $response.'返回链接');
|
|
@@ -178,9 +178,10 @@ class Wechat extends Api
|
|
|
]);
|
|
|
die();
|
|
|
return 1;
|
|
|
- } catch (Exception $e) {
|
|
|
- @file_put_contents("error.txt", $e->getFile() . '-', $e->getLine(), '-' . $e->getMessage());
|
|
|
- }
|
|
|
+// } catch (Exception $e) {
|
|
|
+// var_dump($e->getMessage());
|
|
|
+// @file_put_contents("error.txt", $e->getFile() . '-', $e->getLine(), '-' . $e->getMessage());
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
public function generateRandomString($length) {
|