Пример #1
0
 /// <remarks/>
 public void GetTransactionDetailsAsync(GetTransactionDetailsReq GetTransactionDetailsReq) {
     this.GetTransactionDetailsAsync(GetTransactionDetailsReq, null);
 }
Пример #2
0
 /// <remarks/>
 public void GetTransactionDetailsAsync(GetTransactionDetailsReq GetTransactionDetailsReq, object userState) {
     if ((this.GetTransactionDetailsOperationCompleted == null)) {
         this.GetTransactionDetailsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetTransactionDetailsOperationCompleted);
     }
     this.InvokeAsync("GetTransactionDetails", new object[] {
                 GetTransactionDetailsReq}, this.GetTransactionDetailsOperationCompleted, userState);
 }
Пример #3
0
        public void GetTransactionDetails(Orders order)
        {
            GetTransactionDetailsRequestType detailRequest = new GetTransactionDetailsRequestType();
            detailRequest.TransactionID = order.TransactionId;
            //PayPal API version
            detailRequest.Version = "2.0";
            GetTransactionDetailsReq request = new GetTransactionDetailsReq();
            request.GetTransactionDetailsRequest = detailRequest;

            GetTransactionDetailsResponseType response = service.GetTransactionDetails(request);

            string sErrors = this.CheckForErrors(response);

            if (sErrors == string.Empty)
            {
                PaymentInfoType payment = response.PaymentTransactionDetails.PaymentInfo;

                order.OrderTotal = GetAmountValue(payment.GrossAmount);
                order.Tax = GetAmountValue(payment.TaxAmount);
                IsSubmissionSuccess = true;
            }
            else
            {
                IsSubmissionSuccess = false;
            }
        }