/// <summary>
        /// Captures payment
        /// </summary>
        /// <param name="order">Order</param>
        /// <param name="processPaymentResult">Process payment result</param>
        public void Capture(Order order, ref ProcessPaymentResult processPaymentResult)
        {
            string googleOrderNumber = processPaymentResult.AuthorizationTransactionId;

            GCheckout.OrderProcessing.ChargeOrderRequest chargeOrderRequest = new GCheckout.OrderProcessing.ChargeOrderRequest(googleOrderNumber);
            GCheckoutResponse chargeOrderResponse = chargeOrderRequest.Send();

            if (chargeOrderResponse.IsGood)
            {
                processPaymentResult.PaymentStatus            = PaymentStatusEnum.Paid;
                processPaymentResult.CaptureTransactionResult = chargeOrderResponse.ResponseXml;
            }
            else
            {
                processPaymentResult.Error = chargeOrderResponse.ErrorMessage;
            }
        }
        /// <summary>
        /// Captures payment
        /// </summary>
        /// <param name="capturePaymentRequest">Capture payment request</param>
        /// <returns>Capture payment result</returns>
        public CapturePaymentResult Capture(CapturePaymentRequest capturePaymentRequest)
        {
            var result = new CapturePaymentResult();

            string googleOrderNumber   = capturePaymentRequest.Order.AuthorizationTransactionId;
            var    chargeOrderRequest  = new GCheckout.OrderProcessing.ChargeOrderRequest(googleOrderNumber);
            var    chargeOrderResponse = chargeOrderRequest.Send();

            if (chargeOrderResponse.IsGood)
            {
                result.NewPaymentStatus         = PaymentStatus.Paid;
                result.CaptureTransactionResult = chargeOrderResponse.ResponseXml;
            }
            else
            {
                result.AddError(chargeOrderResponse.ErrorMessage);
            }

            return(result);
        }
        /// <summary>
        /// Captures payment
        /// </summary>
        /// <param name="capturePaymentRequest">Capture payment request</param>
        /// <returns>Capture payment result</returns>
        public CapturePaymentResult Capture(CapturePaymentRequest capturePaymentRequest)
        {
            var result = new CapturePaymentResult();

            string googleOrderNumber = capturePaymentRequest.Order.AuthorizationTransactionId;
            var chargeOrderRequest = new GCheckout.OrderProcessing.ChargeOrderRequest(googleOrderNumber);
            var chargeOrderResponse = chargeOrderRequest.Send();
            if (chargeOrderResponse.IsGood)
            {
                result.NewPaymentStatus = PaymentStatus.Paid;
                result.CaptureTransactionResult = chargeOrderResponse.ResponseXml;
            }
            else
            {
                result.AddError(chargeOrderResponse.ErrorMessage);
            }

            return result;
        }
 /// <summary>
 /// Captures payment (from admin panel)
 /// </summary>
 /// <param name="order">Order</param>
 /// <param name="processPaymentResult">Process payment result</param>
 public void Capture(Order order, ref ProcessPaymentResult processPaymentResult)
 {
     string googleOrderNumber = processPaymentResult.AuthorizationTransactionID;
     GCheckout.OrderProcessing.ChargeOrderRequest chargeOrderRequest = new GCheckout.OrderProcessing.ChargeOrderRequest(googleOrderNumber);
     GCheckoutResponse chargeOrderResponse = chargeOrderRequest.Send();
     if (chargeOrderResponse.IsGood)
     {
         processPaymentResult.PaymentStatus = PaymentStatusEnum.Paid;
         processPaymentResult.CaptureTransactionResult = chargeOrderResponse.ResponseXml;
     }
     else
     {
         processPaymentResult.Error = chargeOrderResponse.ErrorMessage;
     }
 }