POST API Example
The example shown here demonstrates how to create a POST service to request a payment settlement.
<MtxRestServices xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns='http://www.matrixxsw.com/XML_Schema/rest_service' xsi:schemaLocation='http://www.matrixxsw.com/XML_Schema/rest_service http://www.matrixxsw.com/XML_Schema/rest_service.xsd rest_service.xsd ../rest_service.xsd'>
<info>
<class>SettleRequest</class>
<filename>src/main/resources/rest/extension.xml</filename>
<date>2019-12-02</date>
</info>
<path_array>
<path url='/bapi/example_settle'>
<service id='POST'>
<name>ExampleSettle</name>
<description>charging settle (old payment)</description>
<request>ExampleRequestSettle</request>
<response>PaymentMsgResponse</response>
<code_generation>
<mapping>readData</mapping>
<mapping>attachVersion 2</mapping>
<patch>route = setRoute(route)</patch>
<callout_statement>
se.example.mtx.rsgateway.bapi.api.payment.ExampleSettle svc = (se.example.mtx.rsgateway.bapi.api.payment.ExampleSettle)m_appContext.getBean("ExampleSettleService")
</callout_statement>
<callout_statement>svc.exampleSettle(reqMsg, rspMsg);</callout_statement>
</code_generation>
<MetadataArray>
<metadata>
<name>mtx:result_filter</name>
<type>string</type>
<value>{include: [ "_resultCode", "_resultText", "ReceiptId", "SessionId" ],
exclude: ["ResultCodes", "_resultType", "ResultText", "Result"]}
</value>
</metadata>
</MetadataArray>
</service>
</path>
</path_array>
</MtxRestServices>