Hey @np glad you asked this.
I suggest you follow our core payment package of (vendor)Paypal, follow the same pattern as its made.
Breaking the process in simple steps:
- Create a folder for your new payment gateway and use composer init command to initialize composer.json in it.
- Make your own vendor payment's package by using a service provider.
- Register the package in config/app.php.
- Register your package in project's root composer.json file.
- Follow the same declaration used in service provider file of Paypal in your own service provider also to turn up translations, migrations, views, assets.
or follow laravel's own guide to create a package Guide
- create an entry point of class for your own payment method by extending Bagisto's abstract class called Payment. Its present in packages/webkul/payments/payments
- Define your own routes and controllers and then check the checkout process and use browser console for debugging the checkout process.
Kindly ask any issue, if you find some trouble in making a package.