wxpayConfig); $data = [ // 商户订单号 'mch_billno' => $order_number, // 红包发送者名称 'send_name' => $send_name, // 接受红包的用户openid 're_openid' => $openid, // 红包发放总人数,固定为1 'total_num' => 1, // 付款金额,单位分 'total_amount' => (int)($money * 100), // 红包祝福语 'wishing' => $wishing, // 可不传,不传则由 SDK 取当前客户端 IP // 'client_ip' => getClientIp(), // 活动名称 'act_name' => $act_name, // 备注信息 'remark' => $remark ]; if (!empty($scene_id)) { $data['scene_id'] = $scene_id; } $result = $payment->redpack->sendNormal($data); // 记录日志 $uid = defined('UID') ? UID : ''; platformLog($data, $result, 'easywechat_wxpay_send_normal_redpack_uid_' . $uid); return $result; } /** * 查询红包信息 * @param string $order_number 订单号 * @date 2022-11-04 */ public function queryRedpack($order_number) { $payment = Factory::payment($this->wxpayConfig); $result = $payment->redpack->info($order_number); // 记录日志 $uid = defined('UID') ? UID : ''; platformLog($order_number, $result, 'easywechat_wxpay_query_redpack_uid_' . $uid); return $result; } }