Look at the construction of one of the payment modules for guidance

includes/modules/payment/