Have a look at
nopCommerce[
^]
There are multiple projects in the
Payment folder that all implement an
IPaymentMethod
interface. There are examples for Payal and various other payment providers.
It's an excellent open source project that I recommend you download and review.