'P' . date('YmdHis') . 'TEST', 'total_amount' => 0.01, 'description' => '测试订单', 'openid' => 'oUmhc3dnq-Z-f7GrVth17frJovX8', ]; $payService = new \addons\shopro\library\pay\PayService('wechat', 'WechatMiniProgram'); echo "PayService created successfully.\n"; try { $result = $payService->pay($order_data); echo "Pay result type: " . (is_object($result) ? get_class($result) : gettype($result)) . PHP_EOL; echo "Pay result json: " . json_encode($result, JSON_UNESCAPED_UNICODE) . PHP_EOL; } catch (\Exception $e) { echo "Pay error: " . $e->getMessage() . PHP_EOL; echo "File: " . $e->getFile() . ":" . $e->getLine() . PHP_EOL; }