t_gdb
12/04/2020, 4:09 PMxml.XPath.select({
node : orderNodes[o],
xpath : '*[local-name() = "payments"]/' +
'*[local-name() = "payment"]/*[local-name() = "custom-attributes"]/*[local-name() = "custom-attribute"]'
});
And I get this. But I'm not able to directly have the "testcaptureReconciliationID" ( I would like to select "custom-attribute attribute-id="captureReconciliationID" ).
[
{
name: "custom-attribute",
type: "ELEMENT_NODE",
value: null,
textContent: "6061455329686880904012"
},
{
name: "custom-attribute",
type: "ELEMENT_NODE",
value: null,
textContent: "59.90"
},
{
name: "custom-attribute",
type: "ELEMENT_NODE",
value: null,
textContent: "testcaptureReconciliationID"
}
]
The XML:
<payments>
<payment>
<credit-card>.
<card-type>MasterCard</card-type>
<card-number>XXXX-XXXX-XXXX-4444</card-number>
<card-holder>gggggg</card-holder>
<card-token>aaaaff</card-token>
<expiration-month>4</expiration-month>
<expiration-year>2023</expiration-year>
</credit-card>
<amount>59.90</amount>
<processor-id>CYBERSOURCE_CREDIT</processor-id>
<transaction-id>6061455329686880904012</transaction-id>
<custom-attributes>
<custom-attribute attribute-id="approvalStatus">100</custom-attribute>
<custom-attribute attribute-id="authAmount">59.90</custom-attribute>
<custom-attribute attribute-id="captureReconciliationID">testcaptureReconciliationID</custom-attribute>
</custom-attributes>
</payment>
</payments>
Any ideas ??? thanks a lotbattk
12/04/2020, 4:26 PMt_gdb
12/04/2020, 4:30 PM