Exemplo n.º 1
0
 /// <remarks/>
 public void RefundTransactionAsync(RefundTransactionReq RefundTransactionReq) {
     this.RefundTransactionAsync(RefundTransactionReq, null);
 }
Exemplo n.º 2
0
 /// <remarks/>
 public void RefundTransactionAsync(RefundTransactionReq RefundTransactionReq, object userState) {
     if ((this.RefundTransactionOperationCompleted == null)) {
         this.RefundTransactionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRefundTransactionOperationCompleted);
     }
     this.InvokeAsync("RefundTransaction", new object[] {
                 RefundTransactionReq}, this.RefundTransactionOperationCompleted, userState);
 }
Exemplo n.º 3
0
        public void RefundTransaction(string transactionId)
        {
            RefundTransactionRequestType refundRequest = new RefundTransactionRequestType();
            BasicAmountType amount = new BasicAmountType();
            amount.currencyID = CurrencyCodeType.GBP;
            refundRequest.Memo = "Transaction ID: " + transactionId;
            refundRequest.RefundType = RefundType.Full;
            refundRequest.TransactionID = transactionId;
            refundRequest.Version = "2.0";

            RefundTransactionReq request = new RefundTransactionReq();
            request.RefundTransactionRequest = refundRequest;

            try
            {
                RefundTransactionResponseType response = service.RefundTransaction(request);
                string errors = CheckForErrors(response);

                if (errors == string.Empty)
                {
                    IsSubmissionSuccess = true;
                }
                else
                {
                    IsSubmissionSuccess = false;
                    SubmissionError = errors;
                }
            }
            catch(Exception ex)
            {
                throw ex;
            }
        }