去除测试代码

This commit is contained in:
wong
2025-09-24 15:05:50 +08:00
parent 1cc5605291
commit 5a1c0321a6

View File

@@ -200,34 +200,7 @@ class PaymentService
*/
public function notify()
{
//$rawBody = file_get_contents('php://input');
$rawBody = '<xml><bank_type><![CDATA[OTHERS]]></bank_type>
<cash_fee><![CDATA[1]]></cash_fee>
<charset><![CDATA[UTF-8]]></charset>
<coupon_fee><![CDATA[0]]></coupon_fee>
<fee_type><![CDATA[CNY]]></fee_type>
<mch_id><![CDATA[1030239780]]></mch_id>
<mdiscount><![CDATA[0]]></mdiscount>
<nonce_str><![CDATA[8c8993d51c1f4afcb4f8a265c4fe2084]]></nonce_str>
<op_user_id><![CDATA[1030239780]]></op_user_id>
<openid><![CDATA[o8jhotw0PnO8TLuRT9WurJ9dhpPU]]></openid>
<out_trade_no><![CDATA[20250924142316868008]]></out_trade_no>
<out_transaction_id><![CDATA[4200002761202509243272187350]]></out_transaction_id>
<pay_result><![CDATA[0]]></pay_result>
<result_code><![CDATA[0]]></result_code>
<sign><![CDATA[9F324511AF49B6261F62B1004D6350BF]]></sign>
<sign_type><![CDATA[MD5]]></sign_type>
<status><![CDATA[0]]></status>
<sub_appid><![CDATA[wx753bec1f52890a42]]></sub_appid>
<sub_openid><![CDATA[o6SVY6LB1obH6KD2uAtDMkqM9cgg]]></sub_openid>
<third_order_no><![CDATA[288550038027202509242227783238]]></third_order_no>
<time_end><![CDATA[20250924142412]]></time_end>
<total_fee><![CDATA[1]]></total_fee>
<trade_type><![CDATA[pay.wechat.jspay]]></trade_type>
<transaction_id><![CDATA[202509248102020491536020483421]]></transaction_id>
<version><![CDATA[2.0]]></version>
</xml>';
$rawBody = file_get_contents('php://input');
$payload = $this->parseXmlOrRaw($rawBody);
if (!is_array($payload) || empty($payload)) {
return json_encode(['code' => 500, 'msg' => 'XML解析错误']);