Enabling punch-out payment
You can enable punch-out payment in starter stores. Punch-out payment is a payment model where a third-party payment service provider processes payments for orders.
Processing payments using third-party payment service providers offers an alternative payment option for customers who prefer to store their payment information with third-party services. Considerations such as credit card authorizations and billing inquiries are handled by the third-party payment service provider. In addition, store owners who do not own a merchant account can still accept credit card transactions during checkout.
There
are two ways to connect to the payment service provider:
- Using a pop-up window to the third-party payment service provider.Order
flow with Punchout Payment in pop-up model:
- Customer checks out from the shopping cart page
- Customer chooses the Punchout payment method and clicks Next.
- Customer clicks the Order button.
- At the order confirmation page, customer clicks the Pay button, a new pop-up browser window appears to direct the customer to the PSP website.
- Customer logs on to the PSP to process payment.
- PSP invokes the PunchoutCallBackCmd of Commerce though URL call. Commerce updates the payment status and order status according to the payment processing result.
- Customer submits the order and OrderProcessCmd is invoked.
- OrderProcessCmd triggers Plug-in's approveAndDeposit API.
- Plug-in returns the status to OrderProcessCmd.
- OrderProcessCmd redirect the customer to OrderConfirmation page.
- Customer clicks Pay button which caused a new window POPed up
to
PunchoutPaymentRedirectView
. PunchoutPaymentRedirectView
invokes the order service which will subsequently invoke the plug-in's getAuthenticationURL API to get the PSP's authentication URL.- Plugin returns a URL with needed parameters to PunchoutPaymentRedirectView .
PunchoutPaymentRedirectView
redirects the customer to this URL.- Customer processes payment on the PSP's website.
- After the payment has been processed on the PSP's website, PSP
redirects the customer to
PunchoutPaymentCallBackCmd
with the result of the payment processing. PunchoutPaymentCallBackCmd
invokes the Plug-in's preprocessProviderResponseData API to get the payment instruction ID from the response data.- Plug-in returns the payment instruction Id.
PunchoutPaymentCallBackCmd
invokes the Plug-in's processProviderResponse API to process the response.- Plug-in returns the Map of the response parameters with the payment result.
PunchoutPaymentCallBackCmd
updates the Payment/Order database according to the payment results.PunchoutPaymentCallBackCmd
redirects the customer toPunchoutPaymentCallBackView
.PunchoutPaymentCallBackView
returns the payment result processing result to the PSP.
- Using a redirect to the third party payment service provider:Order flow with Punchout Payment
in Re-direct model:
- Customer checks out from the shopping cart page.
- Customer chooses the Punchout payment method and clicks Next.
- Customer clicks the Order button.
- Commerce store redirects the browser to the PSP website.
- Customer logs on to the PSP to process payment.
- PSP redirects the browser back to the order confirmation page of Commerce store. Commerce updates the payment status and order status according to the payment processing result.
Detailed flow of the redirect model:
- Customer submits the order and OrderProcessCmd is invoked.
- OrderProcessCmd triggers Plug-in's approveAndDeposit API.
- Plug-in returns the status to OrderProcessCmd.
- OrderProcessCmd redirect the customer to PunchoutPaymentRedirectView.
PunchoutPaymentRedirectView
invokes the order service which will subsequently invoke the plug-in's getAuthenticationURL API to get the PSP's authentication URL.- Plugin returns a URL with needed parameters to PunchoutPaymentRedirectView .
PunchoutPaymentRedirectView
redirects the customer to this URL.- Customer processes payment on the PSP's website.
- After the payment has been processed on the PSP's website, PSP
redirects the customer to
PunchoutPaymentCallBackCmd
with the result of the payment processing. PunchoutPaymentCallBackCmd
invokes the Plug-in's preprocessProviderResponseData API to get the payment instruction ID from the response data.- Plug-in returns the payment instruction Id.
PunchoutPaymentCallBackCmd
invokes the Plug-in's processProviderResponse API to process the response.- Plug-in returns the Map of the response parameters with the payment result.
PunchoutPaymentCallBackCmd
updates the Payment/Order database according to the payment results.PunchoutPaymentCallBackCmd
redirects the customer to PunchoutPaymentCallBackView.PunchoutPaymentCallBackView
returns the payment result processing result to the PSP.PunchoutPaymentCallBackView
redirects the customer to the OrderConfirmation page.