How to create a payment gateway like Razorpay - DxMinds

How to create a payment gateway like Razorpay