Jagapathibabu Banoth

Jagapathibabu Banoth

  • 1.5k
  • 170
  • 12.7k

Billpayment in Multiple transaction in asp.net

Dec 18 2023 10:29 AM

Normal Class:
--------------
 public class BillerInfoResponse
    {
                [XmlElement(ElementName = "responseCode")]
        public int ResponseCode { get; set; }

        [XmlElement(ElementName = "biller")]
        public Biller Biller { get; set; }

        [XmlElement(ElementName = "errorInfo")]
        public ErrorInfo ErrorInfo { get; set; }
    }


string response = @"<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?>
                                        <billerInfoResponse><responseCode>000</responseCode><biller>VODA00000NATVA<billerId></billerId><billerName>Vi Postpaid</billerName><billerCategory>Mobile Postpaid</billerCategory><billerAdhoc>false</billerAdhoc><billerCoverage>IND</billerCoverage><billerFetchRequiremet>MANDATORY</billerFetchRequiremet><billerPaymentExactness>Exact</billerPaymentExactness><billerSupportBillValidation>NOT_SUPPORTED</billerSupportBillValidation><supportPendingStatus>No</supportPendingStatus><supportDeemed>Yes</supportDeemed><billerTimeout></billerTimeout><billerInputParams><paramInfo><paramName>Mobile Number</paramName><dataType>ALPHANUMERIC</dataType><isOptional>false</isOptional><minLength>10</minLength><maxLength>10</maxLength><regEx>^[6-9]{1}[0-9]{9}$</regEx>
                    <visibility>true</visibility></paramInfo><paramInfo><paramName>Pack Name</paramName><dataType>ALPHANUMERIC</dataType><isOptional>false</isOptional><minLength>27</minLength><maxLength>50</maxLength><regEx>^[a-zA-Z0-9 ()+%.]{27,50}$</regEx><values>Zee5 3 Months Pack(Rs. 399),Zee5 12 Months Pack(Rs.699 + 10% discount)</values><visibility>true</visibility></paramInfo></billerInputParams></biller></billerInfoResponse>

BillerId's are:

---------------

Note:<biller>VODA00000NATVA<billerId>
     <biller>VODA00000NATFR<billerId>
Logic Here:
-----------
             if (response != null && response != "")
                    {
                        XmlSerializer serializer = new XmlSerializer(typeof(BillerInfoResponse));
                        using (TextReader reader = new StringReader(response))
                        {
                            List<string> responseList = new List<string> { response };
                            BillerInfoResponse objTransactionEnquiry = (BillerInfoResponse)serializer.Deserialize(reader);

                            foreach (string multipleResponse in responseList)

                            {                           
                                BillerInfoResponse copiedResponse = new BillerInfoResponse();
                                copiedResponse.ResponseCode = objTransactionEnquiry.ResponseCode;
                       }
                }
           }

My Requrement is : multiple Transaction done in fraction of second In  that time multiple billerId is getting In that time how can i Store that BillerId's in data base from fornt end the above logic i have to tryed but not getting how can i solve this issue.


Answers (1)