The easiest way to do this is to look at another payment module
for instance com.salesmanager.core.business.modules.integration.payment.impl.StripePayment
1) have to implement PaymentModule interface which requires to add code for
validateModuleConfiguration : When creating a UI from the admin this method will be invoked for validating payment configuration
authorize : when doing an authorize on the payment
authorizeAndCapture : when you want to process a payement
capture : when you want to process a payment that was captures
refund : yep for refund
2) create a configuration for this payment module in integrationmodules.json with gateway details
{
"module": "PAYMENT",
"code": "stripe",
"type":"creditcard",
"version":"",
"regions": ["US","CA","GB","AU","FI","DK","IE","NO","SE"],
"image":"stripe.png",
"configuration":[{"env":"TEST","scheme":"https","host":"
www.stripe.com","port":"443","uri":"/"},{"env":"PROD","scheme":"https","host":"
www.stripe.com","port":"443","uri":"/"}]
}
** don't forget to reload data
If you want to build a UI in the admin to let you configure your payment you should look as an example shopizer\sm-shop\src\main\webapp\pages\admin\payment\stripe.jsp
Create a jsp havint he name <payment code>.jsp and drop it in webapp/pages/admin/payment
Upon submission you configurations will be saved in the DB and ready to be used at runtime in your PaymentModule class