Example #1
0
 public AcquirerTrxReq()
 {
     this._signature   = new SignatureType();
     this._transaction = new AcquirerTrxReqTransaction();
     this._merchant    = new AcquirerTrxReqMerchant();
     this._issuer      = new AcquirerTrxReqIssuer();
 }
        /// <summary>
        /// Creates a Merchant object.
        /// </summary>
        /// <typeparam name="T">Type for the Merchant object to create</typeparam>
        /// <returns>Merchant object created from this instance's <see cref="MerchantConfig"/>.</returns>
        private T CreateMerchant <T>() where T : IMerchant, new()
        {
            T merchant = new T();

            CheckMandatory("MerchantId", merchantConfig.MerchantId);
            CheckMandatory("SubId", merchantConfig.SubId);

            merchant.merchantID = merchantConfig.MerchantId;
            merchant.subID      = merchantConfig.SubId;

            AcquirerTrxReqMerchant acquirerTrxReqMerchant = merchant as AcquirerTrxReqMerchant;

            if (acquirerTrxReqMerchant != null)
            {
                acquirerTrxReqMerchant.merchantReturnURL = merchantConfig.merchantReturnUrl.ToString();
            }

            return(merchant);
        }