Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the Safecharge wrapper with a configured HttpClient and server information.
 /// </summary>
 /// <param name="configuredHttpClient">httpClient to get the client's properties from</param>
 /// <param name="merchantInfo">Merchant inforamtion</param>
 public Safecharge(
     HttpClient configuredHttpClient,
     MerchantInfo merchantInfo)
 {
     this.merchantInfo = merchantInfo;
     this.safechargeRequestExecutor = new SafechargeRequestExecutor(configuredHttpClient);
     this.sessionToken = this.GetSessionToken();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the Safecharge wrapper with a default Safecharge's HttpClient and server information.
 /// </summary>
 /// <param name="merchantKey">The secret merchant key obtained by the Merchant during integration process with Safecharge</param>
 /// <param name="merchantId">Merchant id in the Safecharge's system</param>
 /// <param name="siteId">Merchant site id in the Safecharge's system</param>
 /// <param name="serverHost">The Safecharge's server address to send the request to</param>
 /// <param name="algorithmType">The hashing algorithm used to generate the checksum</param>
 public Safecharge(
     string merchantKey,
     string merchantId,
     string siteId,
     string serverHost,
     HashAlgorithmType algorithmType)
 {
     this.merchantInfo = new MerchantInfo(merchantKey, merchantId, siteId, serverHost, algorithmType);
     this.safechargeRequestExecutor = new SafechargeRequestExecutor();
     this.sessionToken = this.GetSessionToken();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the Safecharge wrapper with a default Safecharge's HttpClient and server information.
 /// </summary>
 /// <param name="merchantInfo">Merchant inforamtion</param>
 public Safecharge(MerchantInfo merchantInfo)
 {
     this.merchantInfo = merchantInfo;
     this.safechargeRequestExecutor = new SafechargeRequestExecutor();
     this.sessionToken = this.GetSessionToken();
 }