AnsweredAssumed Answered

Parsing XML Data - Multiple Records in Element

Question asked by MattLeach on Jul 31, 2018
Latest reply on Aug 2, 2018 by fmpdude

Our solution is integrated with a 3rd party payment system which communicates via XML.

 

We are in the process of implementing a new feature with the payment system to allow for installment plans and recurring payments. The problem I am having is with the results.

 

The payment system will provide the status for all payments run on one of these plans on a given day. This issue I am having is that there are multiple results within the same element in the XML structure.

 

Here is an example of their response, the text in red is where there is a single element with multiple results:

<?xml version="1.0"?>

<GatewayResponse>

<ResponseCode>008</ResponseCode>

<ResponseDescription>Report Complete</ResponseDescription>

<TransactionID>000000260484</TransactionID>

<TotalRecords>89</TotalRecords>

<TotalPages>9</TotalPages>

<CurrentPageSize>10</CurrentPageSize>

<BatchDetailsResponse>Recurring Plan ID First Payment Date Last Payment Date Scheduled Date Payment Number Total Payments Payment Type Payment Frequency Account Number Expiration Date Expiration Date Days Remaining Amount Transaction Date Transaction Time Transaction ID Batch Number Account Number Source Response Code Response Description Approval Code AVS Response Code Card Code Response ECI Type

11522914 8-31-2011 7-31-2012 7-31-2012 12 12 Payment Card Monthly XXXXXXXXXXXX6781 1215 1245 199.99 7-31-2012 00:00:02 000000112912 995 Alias Lookup 0 Approval 805995   Recurring

11522916 8-31-2011 7-31-2012 7-31-2012 12 12 Payment Card Monthly XXXXXXXXXXXX6781 1212 150 199.99 7-31-2012 00:00:02 000000112913 995 Alias Lookup 0 Approval 805695   Recurring

11522917 8-31-2011 7-31-2012 7-31-2012 12 12 Payment Card Monthly XXXXXXXXXXXX6781 1212 150 199.99 7-31-2012 00:00:02 000000112911 995 Alias Lookup 0 Approval 806244   Installments

11522918 8-03-2011 12-03-2013 12-3-2013 29 29 Payment Card Monthly XXXXXXXXXXXX6781 1212 0 199.99 12-3-2013 00:00:03 000000259624 1124 Alias Lookup 10 Invalid Expiration Date 805848   Recurring

11522919 8-31-2011 9-13-2011 9-13-2011 21 21 Payment Card Daily XXXXXXXXXXXX6781 1212 472 50.00 9-24-2013 11:44:41 000000254371 1423 Track1 0 Approval 879777   Recurring

11522920 8-03-2011 8-14-2011 8-14-2011 12 12 Payment Card Daily XXXXXXXXXXXX6781 1212 502 199.99 8-14-2011 10:00:02 000000089054 643 Alias Lookup 0 Approval 805330   Recurring

11522921 8-03-2011 2-22-2012 2-22-2012 204 204 Payment Card Daily XXXXXXXXXXXX6781 1212 310 199.99 2-22-2012 12:00:01 000000100100 847 Alias Lookup 0 Approval 804956   Recurring

11522922 8-03-2011 8-14-2011 8-14-2011 12 12 Payment Card Daily XXXXXXXXXXXX6781 1212 502 19.99 8-14-2011 10:00:02 000000089052 643 Alias Lookup 0 Approval 805049   Recurring

11522923 8-03-2011 8-14-2011 8-14-2011 12 12 Payment Card Daily XXXXXXXXXXXX6781 1212 502 24.99 8-14-2011 10:00:02 000000089053 643 Alias Lookup 0 Approval 805204   Recurring

11522924 8-31-2011 7-31-2012 7-31-2012 12 12 Payment Card Monthly XXXXXXXXXXXX6781 1215 1245 199.99 7-31-2012 00:00:05 000000112914 995 Alias Lookup 0 Approval 808185   Recurring </BatchDetailsResponse>

</GatewayResponse>

 

My question is, is it possible to parse this element so that I can take the information for each payment, take the data and post it to a record in FileMaker?

 

Thank you for any assistance.

Outcomes