How to develop a new payment method

We have a new online payment gateway using credit card and desire to integrate it with the InvoicePlane. We will develop an InvoicePlane module but not able to find any related documents. Any directions please?

@cgsmith already implemented new payment methods but he is not responding anymore…

All stuff related to the online payments can be found in

  • application/libraries/merchant.php and application/libraries/merchant folder
  • application/modules/guest/controllers/payment_handler.php

Hi @Kovah, I didnt see other notifications except for this one come through.

@nvphuc I have some work I have done and can provide guidance where necessary to assist you with developing the module.

Hi @Kovah, I can see the existing PayPal payment method there so I have tried to play with it before develop my payment method but getting some issues:

  1. I have enabled it from the Merchant Account setting but not sure how attach it to the invoice so customer can pay through it.
  2. The Merchant Account setting is used for PayPal only so for My Payment Method where to place it’s setting and how?

Hi @cgsmith, could you please share me a document guideline or any sample code so I can develop our payment method.
Thanks in advance for your supports.

Hi @Kovah and @cgsmith
For question 1, I can see the link when set the invoice to Sent status.

For question 2, I see we have single payment setting page which use for all payment method. My Payment Method need 1 more setting such as Merchant Number. Is there any way to add it without touching the core?

I have one more question that how can we enable user interface for capture and refund features? For example in Paypal payment method, these functions are available but how we can trigger them?

Hi @nvphuc - I did not see your reply from 3 days ago… I don’t know why I didn’t get an alert on that.

Here is the fork/branch I was working on for InvoicePlane: https://github.com/cgsmith/InvoicePlane/commits/feature/stripe-integration

If you’d like - I can discuss with you via Skype about any specifics or getting the dev site up and running. My ID is cgsmith105 - I am on GMT -5.

@cgsmith Would you like to create a pull request for the new payment gateway feature? I would take care of it.

Hi @nvphuc and @kovah Pull Request 307 has the development work on integrating with omnipay in it.

@nvphuc I merged the pull request and will implement all available payment gateways of Omnipay. I would suggest waiting some days until I finished this feature. If something is missing then you can implement one on your own.

Thanks @Koval for the info.
Currently, InvoicePlane uses unity payment setting page for all online payment methods. Looks like the setting page is specific for PayPal. I hope better if InvoicePlane can support separate setting for each payment gateway.