Example #1
0
 public RefundResponse PostRefund(string orderId, RefundRequest refundRequest)
 {
     return(this.Process <RefundResponse>(
                PayUClientUrlBuilder.BuildOrderRefundsUrl(this.settings.Url, this.settings.ApiVersion, orderId),
                HttpMethod.Post,
                refundRequest));
 }
Example #2
0
 public async Task <RefundResponse> PostRefundAsync(string orderId, RefundRequest refundRequest, CancellationToken ct = default(CancellationToken))
 {
     return(await this.ProcessAsync <RefundResponse>(
                PayUClientUrlBuilder.BuildOrderRefundsUrl(this.settings.Url, this.settings.ApiVersion, orderId),
                HttpMethod.Post,
                ct,
                refundRequest));
 }
 public static void BuildOrderRefundsUrl_CorrectParameters_CorrectBuildedUrl()
 {
     Assert.Equal(new Uri("http://localhost:3000/api/v2.1/orders/orderId/refunds"),
                  PayUClientUrlBuilder.BuildOrderRefundsUrl("http://localhost:3000", "v2.1", "orderId"));
 }
 public static void BuildOrderRefundsUrl_NullEmptyApiVersion_ThrowsArgumentException(string apiVersion, string orderId)
 {
     Assert.Throws <ArgumentException>(() => PayUClientUrlBuilder.BuildOrderRefundsUrl("http://localhost:3000", apiVersion, orderId));
 }