namespace CampusErrand.Services;
///
/// 微信开放平台服务接口
///
public interface IWeChatService
{
///
/// 调用微信 code2Session 接口获取 session_key 和 openid
///
Task Code2SessionAsync(string code);
///
/// 使用 session_key 解密微信加密数据(手机号)
///
string DecryptPhoneNumber(string sessionKey, string encryptedData, string iv);
}
///
/// 微信 code2Session 返回结果
///
public class WeChatSessionResult
{
public bool Success { get; set; }
public string? SessionKey { get; set; }
public string? OpenId { get; set; }
public string? ErrorMessage { get; set; }
}