public function GetPayUrl($input) { if ($input->GetTrade_type() == "NATIVE") { $result = WxPayApi::unifiedOrder($input); return $result; } }
/** * * 生成直接支付url,支付url有效期为2小时,模式二 * @param UnifiedOrderInput $input */ public static function getPayUrl($input) { $notify = new NativePay(); $result = $notify->GetPayUrl($input); $url = $result["code_url"]; return $url; }