public void SerializeDeserialize_Refund() { RefundRequestBody refund = new RefundRequestBody("MgrConfirm"); RefundRequestBody deserialized = TestUtilities.SerializeThenDeserialize <RefundRequestBody>(refund); Assert.IsNotNull(deserialized); Assert.IsTrue(TestUtilities.PublicPropertiesAreEqual <RefundRequestBody>(refund, deserialized)); }
public RefundResponseData GetRefund(RefundRequestHeader refundRequestHeader, RefundRequestBody refundRequestBody) { var client = new RestClient(OpenAPI.Payments.EWallets.Refund(_remoteServiceBaseUrl)) { Timeout = -1 }; var request = new RestRequest(Method.POST); request.AddHeader("content-type", refundRequestHeader.ContentType); request.AddHeader("resourceOwnerId", refundRequestHeader.ResourceOwnerId); request.AddHeader("requestUId", refundRequestHeader.RequestUId); request.AddHeader("authorization", refundRequestHeader.Authorization); request.AddHeader("accept-language", refundRequestHeader.AcceptLanguage); request.AddJsonBody(JsonConvert.SerializeObject(refundRequestBody)); IRestResponse response = client.Execute(request); var responseContent = JsonConvert.DeserializeObject <RefundResponseData>(response.Content); var responseJsonString = JsonConvert.DeserializeObject(response.Content); var results = responseContent; results.jsonString = responseJsonString; return(results); }
/// <summary> /// Not Support Alipay /// This endpoint supports the cancellation of a transaction created in WeChatPay (C Scan B). /// </summary> /// <param name="refundRequestHeader">Request Header</param> /// <param name="refundRequestBody">Request Body</param> /// <returns>The cancellation of a transaction created in WeChatPay (C Scan B).</returns> public async Task <RefundResponseData> GetRefundAsync(RefundRequestHeader refundRequestHeader, RefundRequestBody refundRequestBody) { return(await _eWalletsService.GetRefundAsync(refundRequestHeader, refundRequestBody)); }
/// <summary> /// Not Support Alipay /// This endpoint supports the cancellation of a transaction created in WeChatPay (C Scan B). /// </summary> /// <param name="refundRequestHeader">Request Header</param> /// <param name="refundRequestBody">Request Body</param> /// <returns>The cancellation of a transaction created in WeChatPay (C Scan B).</returns> public RefundResponseData GetRefund(RefundRequestHeader refundRequestHeader, RefundRequestBody refundRequestBody) { return(_eWalletsService.GetRefund(refundRequestHeader, refundRequestBody)); }