SimplePunchout plug-in

The SimplePunchout plug-in is a sample plug-in that is used by the Madisons starter store to demonstrate payment using the punch-out model. When the SimplePunchout plug-in is used, a new browser window opens displaying the third-party payment Web site.

Note: SimplePunchout plug-in can only be used to demo or sample punch-out payment support of IBM® Websphere Commerce. It is used against a payment gateway simulator; it cannot be used to connect to real payment gateways such as PayPal.

Methods

The SimplePunchout plug-in follows the Payment plug-in specification and implements the PunchoutPlugin interface.

The SimplePunchout plug-in implements the following APIs:
Note: approveAndDeposit is classical payment API; the other methods are unique to the PunchoutPlugin interface.
approveAndDeposit(PluginContext, FinancialTransaction, boolean)
This method is used to "approve and deposit" the amount for the order, it only locally set the payment processing to pending. Later in the PunchoutPaymentCallBackCmd, the payment status will be updated to success or fail according to the result from the third-party system.
getAuthenticationURL(PluginContext, PaymentInstruction)
This method builds the URL for the third-party payment system that is used to punch-out (or to redirect to).
initAuthenticationSession(PluginContext, PaymentInstruction)
This method is used to initialize the authentication session.
Note: Since SimplePunchout plug-in works with the simulator and does not need an authentication session, this method is not used by the SimplePunchout plug-in.
preprocessProviderResponseData(PluginContext, Map)
This method is used to parse the unique ID - corresponding to the PPCPAYINST_ID on Websphere Commerce side - from the third-party payment system's call-back URL.
processProviderResponse(PluginContext, PaymentInstruction, Map)
This method is used to check whether this callback request is a real and valid request from the correct third-party payment system, and then parses the result of the payment processing.