Use proper done callback.
Allow to validate XML against XSD.

Create paymentState and shipmentState in XML always.