How to add new payment gateway service

I would like to integrate Mobile money transfer (Mpesa) to ERPnext. Most of our transactions are made by Mobile money and we would like whenever a customer makes payment for a particular sales invoice, the invoice status should update from unpaid to paid and this payment should be entered into the specified account appropriately. Could anyone kindly point me in the right direction on how to get started on this. I am kinda new to ERPnext module development. I would appreciate any help.
Thank you

You will need to set-up or have MPESA API settings for you to get it going.

I have Mpesa api settings which is basically in SOAP. Now how do i set this up in ERPnext?

Where you able to integrate Mpesa to Erpnext, I am also interested

Hello, it is something i am working…will update once done

Mute,
I am also interested, plz update us once you have this figured out

In need of this too

Following! Any progress?

Really interested, Mute please update on the progress

I am checking this out more than a year later. Really hoping you were successful… anything?

Well basically, once you have your API details for your payment gateway for
Initiating the payment transaction / creating a charge
Checking payment status / getting updated with payment status, proceed to:

  1. You can create a new app (to preserve your customizations despite erpnext/frappe updates)
  2. Create a doctype to capture API account details (provided by gateway service)
  3. Code in python in the app doctype a couple of methods to be used for:
    i)Create a new payment gateway in system,
    ii)An account in the chart of accounts for incoming payments
    a) when a transaction is initiated and capture the data associated
    b) generating redirect url to gateway based of references, amounts etc,
    c) redirecting user to appropriate payment site
    d) checking payment status,
    e)updating the system and directing user to a success/ failure page accordingly.

Code will vary from gateway to gateway but with these things in place, You will not go wrong. You can also check the paypal integration here.

You can also find for razorpay and stripe integrations. Hope this is helpful…

9 Likes

Please update on progress. How did it go? I am hoping you succeeded

Worked like a a charm…

how were you able to setup this please

I outlined the algorithm above. is there anything you need me to clarify?

I think that is beyond my computer skills… But thank you

How are you able to work it out? Please tell me the instructions to follow. When i am enabling the checkout option in shopping cart settings. Then in frontend of website, the product price is not showing. How to rectify this?