예제 #1
0
 public OrderResponse PostOrder(OrderRequest order)
 {
     return(this.Process <OrderResponse>(
                PayUClientUrlBuilder.BuildPostOrderUrl(this.settings.Url, this.settings.ApiVersion),
                HttpMethod.Post,
                order));
 }
예제 #2
0
 public OrderCardTokenResponse PostTrustedOrder(OrderRequest order, TrustedMerchant trustedMerchant)
 {
     return(this.Process <OrderCardTokenResponse>(
                PayUClientUrlBuilder.BuildPostOrderUrl(this.settings.Url, this.settings.ApiVersion),
                HttpMethod.Post,
                order,
                trustedMerchant));
 }
예제 #3
0
 public async Task <OrderResponse> PostOrderAsync(OrderRequest order, CancellationToken ct = default(CancellationToken))
 {
     return(await this.ProcessAsync <OrderResponse>(
                PayUClientUrlBuilder.BuildPostOrderUrl(this.settings.Url, this.settings.ApiVersion),
                HttpMethod.Post,
                ct,
                order));
 }
 public static void BuildPostOrderUrl_CorrectApiVersion_CorrectBuildedUrl()
 {
     Assert.Equal(new Uri("http://localhost:3000/api/v2.1/orders/"),
                  PayUClientUrlBuilder.BuildPostOrderUrl("http://localhost:3000", "v2.1"));
 }
 public static void BuildPostOrderUrl_NullEmptyApiVersion_ThrowsArgumentException(string apiVersion)
 {
     Assert.Throws <ArgumentException>(() => PayUClientUrlBuilder.BuildPostOrderUrl("http://localhost:3000", apiVersion));
 }