/// <summary> /// API提交 /// </summary> /// <typeparam name="T">结果类型</typeparam> /// <param name="app">App</param> /// <param name="request">请求</param> /// <param name="code">异常结果</param> /// <returns></returns> private async Task <T> SubmitAsync <T>(App app, WeChatPayRequest request, WeChatPayResultCode code) where T : WeChatPayResponse { T response = await WeChatPayClient.ExecuteAsync <T>(app, request); if (!response.Success) { throw new MaxException(code, response.Detail); } return(response); }
public WeChatPayController(WeChatPayClient client) { _client = client; }
public WeChatPayController(WeChatPayClient client, WeChatPayCertificateClient certClient) { _client = client; _certClient = certClient; }