示例#1
0
 /// <summary>
 /// For testing.
 /// </summary>
 public PayPalExpressCheckout(PayPalConfiguration configuration, IHttpClient httpClient,
     IPayPalRequestBuilder requestBuilder, IPayPalResponseParser responseParser)
 {
     if (configuration == null) throw new ArgumentNullException("configuration");
     if (httpClient == null) throw new ArgumentNullException("httpClient");
     if (requestBuilder == null) throw new ArgumentNullException("requestBuilder");
     if (responseParser == null) throw new ArgumentNullException("responseParser");
     _configuration = configuration;
     _httpClient = httpClient;
     _requestBuilder = requestBuilder;
     _responseParser = responseParser;
 }
示例#2
0
 /// <summary>
 /// For testing.
 /// </summary>
 public PayPalMassPay(PayPalConfiguration configuration, IHttpClient httpClient,
                      IPayPalRequestBuilder requestBuilder, IPayPalResponseParser responseParser)
 {
     if (configuration == null)
     {
         throw new ArgumentNullException("configuration");
     }
     if (httpClient == null)
     {
         throw new ArgumentNullException("httpClient");
     }
     if (requestBuilder == null)
     {
         throw new ArgumentNullException("requestBuilder");
     }
     if (responseParser == null)
     {
         throw new ArgumentNullException("responseParser");
     }
     _configuration  = configuration;
     _httpClient     = httpClient;
     _requestBuilder = requestBuilder;
     _responseParser = responseParser;
 }