raj kumar

raj kumar

  • 1.6k
  • 357
  • 622

Post json in wcf rest

Jun 22 2016 12:34 PM

User post json file in wcf rest service and i'm create corresponding  class for hold data.But c# object did not hold any data 

 
 
 
 
 
 
 
{

"GMF": {

"-xmlns": "com/firstdata/Merchant/gmfV5.10",

"CreditRequest": {

"CommonGrp": {

"PymtType": "Credit",

"TxnType": "Completion",

"LocalDateTime": "20160622093435",

"TrnmsnDateTime": "20160622093435",

"STAN": "563033",

"RefNum": "6277728423",

"OrderNum": "15537570",

"TPPID": "RHO001",

"TermID": "00000001",

"MerchID": "RCTST0000000065",

"POSEntryMode": "901",

"POSCondCode": "00",

"TermCatCode": "01",

"TermEntryCapablt": "01",

"TxnAmt": "000000000100",

"TxnCrncy": "840",

"TermLocInd": "0",

"CardCaptCap": "1",

"GroupID": "10001"

},

"CardGrp": {

"AcctNum": "4264281511117771",

"CardExpiryDate": "20160430",

"CardType": "Visa"

},

"AddtlAmtGrp": [

{

"AddAmt": "100",

"AddAmtCrncy": "840",

"AddAmtType": "FirstAuthAmt"

},

{

"AddAmt": "100",

"AddAmtCrncy": "840",

"AddAmtType": "TotalAuthAmt"

}

],

"VisaGrp": {

"ACI": "T",

"TransID": "528184792965181",

"VisaBID": "56412",

"VisaAUAR": "000000000000"

},

"OrigAuthGrp": {

"OrigAuthID": "OK0670",

"OrigLocalDateTime": "20130711143526",

"OrigTranDateTime": "20130711143526",

"OrigSTAN": "982992",

"OrigRespCode": "000"

}

}

}

}
 
 
 
 
 
 
public class CommonGrp
{
public string PymtType { get; set; }
public string TxnType { get; set; }
public string LocalDateTime { get; set; }
public string TrnmsnDateTime { get; set; }
public string STAN { get; set; }
public string RefNum { get; set; }
public string OrderNum { get; set; }
public string TPPID { get; set; }
public string TermID { get; set; }
public string MerchID { get; set; }
public string POSEntryMode { get; set; }
public string POSCondCode { get; set; }
public string TermCatCode { get; set; }
public string TermEntryCapablt { get; set; }
public string TxnAmt { get; set; }
public string TxnCrncy { get; set; }
public string TermLocInd { get; set; }
public string CardCaptCap { get; set; }
public string GroupID { get; set; }
}
public class CardGrp
{
public string AcctNum { get; set; }
public string CardExpiryDate { get; set; }
public string CardType { get; set; }
}
public class AddtlAmtGrp
{
public string AddAmt { get; set; }
public string AddAmtCrncy { get; set; }
public string AddAmtType { get; set; }
}
public class VisaGrp
{
public string ACI { get; set; }
public string TransID { get; set; }
public string VisaBID { get; set; }
public string VisaAUAR { get; set; }
}
public class OrigAuthGrp
{
public string OrigAuthID { get; set; }
public string OrigLocalDateTime { get; set; }
public string OrigTranDateTime { get; set; }
public string OrigSTAN { get; set; }
public string OrigRespCode { get; set; }
}
public class CreditRequest
{
public CommonGrp CommonGrp { get; set; }
public CardGrp CardGrp { get; set; }
public List<AddtlAmtGrp> AddtlAmtGrp { get; set; }
public VisaGrp VisaGrp { get; set; }
public OrigAuthGrp OrigAuthGrp { get; set; }
}
public class GMF
{
public string __invalid_name__-xmlns { get; set; }
public CreditRequest CreditRequest { get; set; }
}
public class RootObject
{
public GMF GMF { get; set; }
}
 
 
 
 
 
 
 
 
 
 

Brought to you by:

Answers (1)