public override byte[] GetXml() {
   AutoGen.RefundOrderRequest Req = new AutoGen.RefundOrderRequest();
   Req.googleordernumber = _OrderNo;
   Req.reason = _Reason;
   if (_Amount != -1 && _Currency != null) {
     Req.amount = new AutoGen.Money();
     Req.amount.currency = _Currency;
     Req.amount.Value = _Amount;
   }
   if (_Comment != null) {
     Req.comment = _Comment;
   }
   return EncodeHelper.Serialize(Req);
 }
Esempio n. 2
0
 public override byte[] GetXml()
 {
     AutoGen.RefundOrderRequest Req = new AutoGen.RefundOrderRequest();
     Req.googleordernumber = _OrderNo;
     Req.reason            = EncodeHelper.EscapeXmlChars(_Reason);
     if (_Amount != -1 && _Currency != null)
     {
         Req.amount          = new AutoGen.Money();
         Req.amount.currency = _Currency;
         Req.amount.Value    = (Decimal)_Amount;
     }
     if (_Comment != null)
     {
         Req.comment = _Comment;
     }
     return(EncodeHelper.Serialize(Req));
 }
 /// <summary>Method that is called to produce the Xml message
 ///  that can be posted to Google Checkout.</summary>
 public override byte[] GetXml()
 {
     AutoGen.RefundOrderRequest retVal = new AutoGen.RefundOrderRequest();
     retVal.googleordernumber = GoogleOrderNumber;
     retVal.reason            = EncodeHelper.EscapeXmlChars(_reason);
     if (_amount > decimal.MinValue && _currency != null)
     {
         retVal.amount          = new AutoGen.Money();
         retVal.amount.currency = _currency;
         retVal.amount.Value    = _amount; //already checked.
     }
     if (_comment != null)
     {
         retVal.comment = _comment;
     }
     return(EncodeHelper.Serialize(retVal));
 }