oc-shopaholic / oc-shopaholic-plugin

🛍️ No. 1 e-commerce platform for October CMS
https://shopaholic.one
GNU General Public License v3.0
426 stars 52 forks source link

Custom gateway tutorial #325

Open alex-mokkas opened 3 years ago

alex-mokkas commented 3 years ago

At first, thank you for this great plugin. It's really awesome.

In relation to payment gateways, I'd like to ask you if there is any complete tutorial of creating a custom gateway. I've tried a lot of things, but nothing worked.

  1. Is Omnipay necessary to create a custom gateway?
  2. If Omnipay is necessary, composer.json file needs to be in project's root directory? That means that OctoberCMS needs to be installed with composer.
kharanenka commented 3 years ago

Hi! We now have only very brief docs of how to integrate custom payment gateway. (link)

  1. It is not necessary to use Omnipay package. You can develop completely custom integration
  2. If you want to use Omnipay package, then you must add it to root composer.json file of your project and install it
alex-mokkas commented 3 years ago

And if I install the desired Omnipay package, what else needs to be done? I mean, do I have to integrate it somehow with Shopaholic? Do I need to create my custom payment class?

SebastiaanKloos commented 3 years ago

@alex-mokkas Yes you need to integrate it with Shopaholic. You can take a look at my plugin for reference if you like:

https://github.com/SebastiaanKloos/oc-mollieshopaholic

You should know I used the Omnipay 3 version which is not yet support as my PR is not yet merged

alex-mokkas commented 3 years ago

@kharanenka I have followed the instructions of the link above, but on checkout page after the button click the only thing I get is the "Thank you" message. I'm trying to implement a payment method without Omnipay, but I cannot even make the redirect to the provider's payment page.

What am I missing?