|
@@ -54,13 +54,18 @@ class jspay implements IPay
|
|
|
$input->SetTrade_type("JSAPI");
|
|
|
$input->SetOpenid($this->mOpenId);
|
|
|
$input->SetSpbill_create_ip(util::real_ip());
|
|
|
+ Log::record("1",Log::DEBUG);
|
|
|
|
|
|
$order = WxPayApi::unifiedOrder($input);
|
|
|
|
|
|
+ Log::record("2",Log::DEBUG);
|
|
|
+
|
|
|
if(!array_key_exists("appid", $order)
|
|
|
|| !array_key_exists("prepay_id", $order)
|
|
|
|| $order['prepay_id'] == "")
|
|
|
{
|
|
|
+ Log::record("3",Log::DEBUG);
|
|
|
+
|
|
|
throw new WxPayException("参数错误");
|
|
|
}
|
|
|
|
|
@@ -72,6 +77,8 @@ class jspay implements IPay
|
|
|
$jsapi->SetPackage("prepay_id=" . $order['prepay_id']);
|
|
|
$jsapi->SetSignType("MD5");
|
|
|
$jsapi->SetPaySign($jsapi->MakeSign());
|
|
|
+ Log::record("4",Log::DEBUG);
|
|
|
+
|
|
|
|
|
|
return array("data" => $jsapi->GetValues());
|
|
|
}
|