In the context of a purchase in e-commerce, consider an integration that manages payment processing through the following steps:

See below the description of the steps:
The flow starts when an order is received with an identification code (ClientID).
The POST request is forwarded to the /simple endpoint.
The response received is logged.
With the ClientID, the system queries an internal service to get more details.
The GET query is performed on a purchases endpoint, passing the ClientID as a parameter.
The request response is logged.
The received information is processed and formatted using a transformation tool, JSONata. The applied transformation is logged for verification.
IMPORTANT:
- The instructions to create a new JSON object are in the
extractTotal.jsonatafile, available in the Resources folder.- The
extractTotal.jsonatafile is referenced in the flow script along with theclasspath(snippet above).- See below the content of the
extractTotal.jsonatafile:
The processed data is then sent to an external service to make the payment.
First, the transformed message body is converted to JSON format, and the Content-Type headers (defined as application/json) and Authorization (with an example token) are configured.
Then, a POST request is made to the payment endpoint.
The response received is logged.
After payment processing, the result is combined with the ClientID and transformed again to update the payment status in an internal service.
The adjusted message body is converted to JSON format and sent in a POST request to a status endpoint.
IMPORTANT:
- The instructions to create a new JSON object are in the
statusPayload.jsonatafile, available in the Resources folder.- The
statusPayload.jsonatafile is referenced in the flow script along with theclasspath(snippet above).- See below the content of the
statusPayload.jsonatafile:
The system sends a final confirmation to indicate that the payment was successful.
The HTTP response code is set to 200, and the response body confirms the success of the operation.
In addition, the content of the final response is logged.
See below the complete script of the integration flow:
IMPORTANT: Advanced parameters of EIPs and components are not yet available in the steps configuration form in the Diagram tab. To add them, use the Source Code tab.
We use cookies to enhance your experience on our site. By continuing to browse, you agree to our use of cookies.Learn more