private IGatewayResponse SendUnsettledTransactionsRequest(AuthorizeDotNetRequest request)
        {
            var result = string.Empty;
            IGatewayResponse gatewayResponse;

            var authentication = new MerchantAuthenticationType();

            authentication.name           = request.KeyValues[AuthorizeDotNetApi.ApiLogin];
            authentication.transactionKey = request.KeyValues[AuthorizeDotNetApi.TransactionKey];

            using (var webService = new RevStack.AuthorizeDotNet.net.authorize.api.Service())
            {
                webService.Url = request.PostUrl;
                GetUnsettledTransactionListRequestType  listType = new GetUnsettledTransactionListRequestType();
                GetUnsettledTransactionListResponseType response = webService.GetUnsettledTransactionList(authentication, listType, null);

                char del = request.KeyValues[AuthorizeDotNetApi.DelimitCharacter].ToCharArray()[0];

                for (int i = 0; i < response.messages.Length; i++)
                {
                    result = response.messages[i].text + del;
                }

                result          = result.TrimEnd(del);
                gatewayResponse = new GatewayResponse(result, del);
            }

            return(gatewayResponse);
        }
Beispiel #2
0
 /// <remarks/>
 public void GetUnsettledTransactionListAsync(MerchantAuthenticationType merchantAuthentication, GetUnsettledTransactionListRequestType request, object userState) {
     if ((this.GetUnsettledTransactionListOperationCompleted == null)) {
         this.GetUnsettledTransactionListOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetUnsettledTransactionListOperationCompleted);
     }
     this.InvokeAsync("GetUnsettledTransactionList", new object[] {
                 merchantAuthentication,
                 request}, this.GetUnsettledTransactionListOperationCompleted, userState);
 }
Beispiel #3
0
 /// <remarks/>
 public void GetUnsettledTransactionListAsync(MerchantAuthenticationType merchantAuthentication, GetUnsettledTransactionListRequestType request) {
     this.GetUnsettledTransactionListAsync(merchantAuthentication, request, null);
 }
Beispiel #4
0
 public GetUnsettledTransactionListResponseType GetUnsettledTransactionList(MerchantAuthenticationType merchantAuthentication, GetUnsettledTransactionListRequestType request) {
     object[] results = this.Invoke("GetUnsettledTransactionList", new object[] {
                 merchantAuthentication,
                 request});
     return ((GetUnsettledTransactionListResponseType)(results[0]));
 }