attach) && $notify->attach) { return HookService::listen('wechat_pay_success_' . strtolower($notify->attach), $notify->out_trade_no, $notify, true, self::class); } return false; } /** * 抖音支付成功后 * @param $notify * @return bool|mixed */ public static function douyinPaySuccess($notify) { if (isset($notify['cp_extra']) && $notify['cp_extra']) { return HookService::listen('wechat_pay_success_' . strtolower($notify['cp_extra']), $notify['cp_orderno'], $notify, true, self::class); } return false; } /** * 快熟支付成功后 * @param $notify * @return bool|mixed */ public static function kuaishouPaySuccess($notify) { if (isset($notify['attach']) && $notify['attach']) { return HookService::listen('wechat_pay_success_' . strtolower($notify['attach']), $notify['out_order_no'], $notify, true, self::class); } return false; } /** * 商品订单支付成功后 微信公众号 * @param $orderId * @param $notify * @return bool */ public static function wechatPaySuccessGoods($orderId, $notify) { try { if (StoreOrderWapModel::be(['order_id' => $orderId, 'paid' => 1, 'type' => 2])) return true; return StoreOrderWapModel::payGoodsSuccess($orderId); } catch (\Exception $e) { return false; } } /** * 专题订单支付成功后 微信公众号 支付宝 * @param $orderId * @param $notify * @return bool */ public static function wechatPaySuccessSpecial($orderId, $notify) { try { if (StoreOrderWapModel::be(['order_id' => $orderId, 'paid' => 1])) return true; return StoreOrderWapModel::paySuccess($orderId); } catch (\Exception $e) { return false; } } /** * 会员订单支付成功后 微信公众号 支付宝 * @param $orderId * @param $notify * @return bool */ public static function wechatPaySuccessMember($orderId, $notify) { try { if (StoreOrderWapModel::be(['order_id' => $orderId, 'paid' => 1])) return true; return StoreOrderWapModel::payMeSuccess($orderId); } catch (\Exception $e) { return false; } } /** * 活动报名订单支付成功后 微信公众号 支付宝 * @param $orderId * @param $notify * @return bool */ public static function wechatPaySuccessSignup($orderId, $notify) { try { if (EventSignUp::be(['order_id' => $orderId, 'paid' => 1])) return true; return EventSignUp::paySuccess($orderId); } catch (\Exception $e) { return false; } } /** * 试卷订单支付成功后 微信公众号 支付宝 * @param $orderId * @param $notify * @return bool */ public static function wechatPaySuccessTestpaper($orderId, $notify) { try { if (TestPaperOrder::be(['order_id' => $orderId, 'paid' => 1])) return true; return TestPaperOrder::payTestPaperSuccess($orderId); } catch (\Exception $e) { return false; } } /** * 资料订单支付成功后 微信公众号 支付宝 * @param $orderId * @param $notify * @return bool */ public static function wechatPaySuccessDatadownload($orderId, $notify) { try { if (DataDownloadOrder::be(['order_id' => $orderId, 'paid' => 1])) return true; return DataDownloadOrder::payDataDownloadSuccess($orderId); } catch (\Exception $e) { return false; } } /** * 商品订单支付成功后 小程序 * @param $orderId * @param $notify * @return bool */ public static function wechatPaySuccessProductr($orderId, $notify) { try { if (StoreOrderRoutineModel::be(['order_id' => $orderId, 'paid' => 1])) return true; return StoreOrderRoutineModel::paySuccess($orderId); } catch (\Exception $e) { return false; } } /** * 用户充值成功后 * @param $orderId * @param $notify * @return bool */ public static function wechatPaySuccessRecharge($orderId, $notify) { try { if (UserRecharge::be(['order_id' => $orderId, 'paid' => 1])) return true; return UserRecharge::rechargeSuccess($orderId); } catch (\Exception $e) { return false; } } /** * 使用余额支付订单时 * @param $userInfo * @param $orderInfo */ public static function yuePayProduct($userInfo, $orderInfo) { } /** * 微信支付订单退款 * @param $orderNo * @param array $opt */ public static function wechatPayOrderRefund($orderNo, array $opt) { WechatService::payOrderRefund($orderNo, $opt); } /** * 微信支付充值退款 * @param $orderNo * @param array $opt */ public static function userRechargeRefund($orderNo, array $opt) { WechatService::payOrderRefund($orderNo, $opt); } }