You should start here: https://devnet.kentico.com/articles/developing-custom-payment-gateway It is made for version 7, but it is valid. Some methods probably have changes but the principle is the same. You can download the example code
as well.
Kentico has a default PN page for paypal \CMS\CMSModules\Ecommerce\CMSPages\PayPalIPN.aspx.cs
You can find the PN example on GitHub It should give you the idea how to work with paymentinfo.
If you want to make a redirect inside process payment method:
// Redirect using javascript
var paymentGatewayUrl = "your url";
ScriptHelper.RegisterClientScriptBlock(PaymentDataForm.Page, typeof(string), "", "<script type='text/javascript'>window.onload = function(){ window.document.forms[0].action='" + paymentGatewayUrl + "';window.document.forms[0].submit(); }; </script>");