yxy/y-wechat

微信相关工具

1.0.3 2025-03-14 06:24 UTC

This package is not auto-updated.

Last update: 2025-04-11 06:48:04 UTC


README

小程序相关


/**
 * Mini 小程序相关功能
 *
 * @method static Application getApp() 获取小程序Application
 * @method static array login(string $code) 获取登录信息
 * @method static mixed phoneNumber(string $code) 获取手机号
 * @method static array getQrCode(string $data, string $page = 'pages/index/index', int $width = 500, bool $check_path = false, int $env_version = 1) 获取二维码
 */
 
/**
 * Pay 支付相关功能
 *
 * @method static Application getApp() 获取支付Application
 * @method static array payData(string $order_no, int $total, string $open_id, string $description, string $notify, string $signType = "RSA") 获取支付信息
 * @method static ResponseInterface payNotify(callable $callback) 支付回调
 * @method static mixed refund(string $wechat_order, string $out_refund_no, float $refund, float $total, string $notify) 退款
 * @method static ResponseInterface refundNotify(callable $callback) 退款回调
 * @method static ResponseInterface withdrawal(string $out_batch_no, array $list, string $batch_name, string $batch_remark) 退款回调
 */
 
/**
 * Off 公众号相关
 *
 * @method static Application getApp() 获取公众号Application
 * @method static ResponseInterface getOffServe() 公众号验签
 * @method static Message getDecryptedMessage() 获取解密数据
 * @method static mixed getUser(string $openid) 获取用户
 * @method static void followEvent(callable $callable) 公众号关注事件
 * @method static ResponseInterface|Response pushMessage(string $toUser, string $templateId, array $data = [], string $appid = "", string $page = "") 公众号发送模板消息
 * @method static string oauth(string $callback_url, string $scope = 'snsapi_base') 公众号授权
 * @method static array oauthUser() 获取公众号授权后的用户信息
 */