Punch-out payment extension points
To implement punch-out payment integration, you need to create extension code for the following extension points.
Extension point Where the extension point is used Extension code implementation tips Request, Response formats Sample extension code location approve_payment The checkout cart operation (POST cart/@self/checkout) calls the approve_payment extension point to authorize payment. The approve_payment extension code should return the updated financial transaction with its state set to 1 (pending) to initiate punch-out payment. PaymentApproveCmdUEInput, PaymentApproveCmdUEOutput
The approvePayment method in workspace_dir/commerceue-app/src/main/java/com/ibm/commerce/order/ue/rest/PaymentResource.java get_punchout_url The get punch-out payment information operation (GET cart/@self/payment_instruction/punchoutPaymentInfo) calls the get_punchout_url extension point to get the payment form URL. The get_punchout_url extension code should return the payment form URL. GetPunchoutURLCmdUEInput, GetPunchoutURLCmdUEOutput
The getPunchoutURL method in workspace_dir/commerceue-app/src/main/java/com/ibm/commerce/order/ue/rest/PaymentResource.java process_punchout_response The callback operation (POST cart/@self/payment_instruction/callback) calls the process_punchout_response extension point to process callback parameters from the payment service provider. The process_punchout_response extension code should call the payment service provider to verify the callback parameters, return the response parameters with the parameter "punchoutTranResult" set to "successful", "failed" or "invalid", and update the extended data of the payment instruction to include additional information. ProcessPunchoutResponseCmdUEInput, ProcessPunchoutResponseCmdUEOutput
The processPunchoutResponse method in workspace_dir/commerceue-app/src/main/java/com/ibm/commerce/order/ue/rest/PaymentResource.java
Related tasks
Enable punch-out payment