/** * * 生成直接支付url,支付url有效期为2小时,模式二 * @param UnifiedOrderInput $input */ public function GetPayUrl($input) { if ($input->GetTrade_type() == "NATIVE") { $result = WechatPayApi::unifiedOrder($input); return $result; } }
/** * * 回复通知 * @param bool $needSign 是否需要签名输出 */ private final function ReplyNotify($needSign = true) { //如果需要签名 if ($needSign == true && $this->GetReturn_code($return_code) == "SUCCESS") { $this->SetSign(); } WechatPayApi::replyNotify($this->ToXml()); }