/// <summary>
        /// Charge Credit Card Async.
        /// </summary>
        /// <returns>ANetChargeCreateTransactionResponse instance</returns>
        /// <param name="transaction">TransactionRequest.</param>
        /// <param name="refId">Reference identifier.</param>
        public async Task <ANetChargeTransactionResponse> ChargeAsync(ANetChargeTransactionRequest transaction, string refId)
        {
            var createRequest          = new ANetChargeCreateTransactionRequest();
            var requestBody            = new ANetChargeTransactionRequestBody();
            var merchantAuthentication = getMerchantAuthentication();

            transaction.TransactionType        = ANetTransactionType.authCaptureTransaction;
            requestBody.MerchantAuthentication = merchantAuthentication;
            requestBody.RefId = refId;
            requestBody.TransactionRequest         = transaction;
            createRequest.CreateTransactionRequest = requestBody;
            return(await chargeAsync(createRequest));
        }
        /// <summary>
        /// Charge Credit Card Async.
        /// </summary>
        /// <returns>ANetChargeCreateTransactionResponse instance</returns>
        /// <param name="creditCard">Credit card</param>
        /// <param name="refId">Reference identifier</param>
        /// <param name="amount">Amount</param>
        public async Task <ANetChargeTransactionResponse> ChargeAsync(ANetCreditCard creditCard, string refId, decimal amount)
        {
            var createRequest          = new ANetChargeCreateTransactionRequest();
            var requestBody            = new ANetChargeTransactionRequestBody();
            var merchantAuthentication = getMerchantAuthentication();
            var transaction            = new ANetChargeTransactionRequest();
            var payment = new ANetPayment
            {
                CreditCard = creditCard
            };

            transaction.Payment                = payment;
            transaction.Amount                 = amount;
            transaction.TransactionType        = ANetTransactionType.authCaptureTransaction;
            requestBody.TransactionRequest     = transaction;
            requestBody.MerchantAuthentication = merchantAuthentication;
            requestBody.RefId = refId;
            createRequest.CreateTransactionRequest = requestBody;
            return(await chargeAsync(createRequest));
        }