Giter Club home page Giter Club logo

osenco / osen-wc-mpesa Goto Github PK

View Code? Open in Web Editor NEW
94.0 14.0 90.0 843 KB

WordPress Plugin that extends WooCommerce functionality to integrate MPESA for making payments, remittances, checking account balance, transaction status and reversals.

Home Page: https://wcmpesa.co.ke

License: GNU General Public License v3.0

PHP 94.80% JavaScript 4.88% CSS 0.32%
php mpesa mpesa-api payment-gateway woocommerce-plugin woocommerce wordpress-plugin wc-mpesa wordpress woocommerce-functionality wordpress-admin

osen-wc-mpesa's Introduction

       _

_____ ____ | | _______ _______ _______ ______ | _ _/ | | | | __ \ | ____| / ____| / __
| | | | | | | | | | | | | | | | | | | | | | | | | | | /\ / \ | | || | | | | |
__ | || | | | | | | | |/ \ / | | / | | | | | __ | | | | | | | |\ / /| | | | | | | | | | | | | | | | | | \ / | | | | | ____| | | | | | || || || | _/ | |__| || |____/ || || | | | | |___________|

M-Pesa For WooCommerce

WordPress Plugin that extends WooCommerce functionality to integrate M-Pesa for making payments, remittances, checking account balance transaction status and reversals.

M-Pesa Config Futher config

Installation

Getting started with M-Pesa for WooCommerce is very easy. All configuration is done in the WooCommerce settings in the WordPress admin dashboard.

Requirements

Your site/app MUST be running over https for the M-Pesa Instant Payment Notification (IPN) to work.

Auto-installation

Manual Installation

  • First, you need to download the latest release of the plugin from here.
  • Using an FTP program, or your hosting control panel, upload the plugin folder (wc-mpesa) to your WordPress installation’s wp-content/plugins/ directory.
  • Activate the plugin from the Plugins menu within the WordPress admin

That is all. You are now ready to receive and send money using M-Pesa on your WordPress and WooCommerce powered site.

Contributing

  • Fork the repo, do your magic and make a pull request.

Integration Cost

  • Our team of developers are on hand to provide assistance for when you wish to move from Sandbox(test) to Live(production) environment. This assistance is charged a flat fee of KSH 4000/$40

Acknowledgements

  • M-Pesa and the M-Pesa Logo are registered trademarks of Safaricom Ltd
  • WordPress and the WordPress logo are registered trademarks of Automattic Inc.
  • WooCommerce and the WooCommerce logo are registered trademarks of Automattic Inc.

License

This plugin is licensed under the GPLv3 license.

osen-wc-mpesa's People

Contributors

maukoese avatar njengah avatar vgichira avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

osen-wc-mpesa's Issues

register confirmation & validation URLs Error

I get the below error when I click the link "register confirmation & validation URLs"


Notice: Undefined property: stdClass::$ResponseDescription in /var/www/html/htdocs/wordpress/wp-content/plugins/osen-wc-mpesa-master/osen-wc-mpesa.php on line 541
{"Registration status":null}

C2b offline payment, resend stk, order going through

  1. Can't register call back URLs for offline manual payment
  2. When one cancels the stk pin pin prompt on their phone, order still goes through.
  3. When press resend stk. It does so but leaves a browser debug code message
  4. When one presses view mpesa analytics on WooCommerce, the site crashes and one has to disable the plugin.

Invalid Token Error

Hi, I have follwed your instructions keenly but am getting "Failed! MPesa Error 404.001.03: Invalid Access Token" over and over. Any idea why?

(MPesa Error) 404.001.03: Invalid Access Token

Hi Dev team,

First things first, thanks for sharing such a valuable tool with us for free. I truly appreciate it.

Now, I was trying to setup an stk push for a client using your plugin but I am at an impasse.

I keep getting this error: (MPesa Error) 404.001.03: Invalid Access Token.

Despite the fact that all credentials are the same.

What could be the issue?

Could you kindly assist me on this?

Add Mpesa Number Validation

Add input field to confirm mpesa phone number to allow different billing/order number. Add JS to autofill.

Plugin could not be activated because it triggered a fatal error.

Just encountered this issue for the first time ever, please help

Fatal error: require_once(): Failed opening required '/home/timeless/........../public_html/radio/wp-content/plugins/osen-wc-mpesa-master/vendor/autoload.php' (include_path='.:/usr/share/php') in /home/........./public_html/radio/wp-content/plugins/osen-wc-mpesa-master/osen-wc-mpesa.php on line 50

mpesaError

Undefined index

Hi @maukoese
Could you check on these errors.

enable_b2c in /home2/arduinoco/public_html/wp-content/plugins/osen-wc-mpesa-1.19.8/src/Menus/Menu.php on line 19

Notice: Undefined index: enable_b2c in /public_html/wp-content/plugins/osen-wc-mpesa-1.19.8/src/Menus/Menu.php on line 48

Notice: Undefined index: enable_b2c in public_html/wp-content/plugins/osen-wc-mpesa-1.19.8/inc/wc_mpesa_gateway.php on line 49

Also the receipt notification is repeating many times.

image

image

Invalid Access Token

I am getting this error
Failed! M-PESA Error 404.001.03: Invalid Access Token

Invalid Access Token

I have been frequently getting the Invalid Access Token error that resolves in the course of the day. Note that the production configs are all correct. I narrowed it down to the mpesa_token, which I suspect is not updated in time. It might be an isolated issue, so I am raising it in case anyone has a similar problem.

I installed the transient manager to clear the transient variable whenever it comes up. Hope it helps.

Confirming payment... ERROR

Hi @maukoese
Thanks for this nice piece.
i have done a test run on woocommerce but the process is stuck at "Confirming payment..." and it doesnt move past that. check this https://ibb.co/S60pLw5
However, i get an email that the order as done successfully.
Do you know what could be wrong?

thank you

REQUEST: Split payments

Hi Team,
Do you have plans to do split payment feature that allows you to split a transaction between two (2) or more accounts and collect fees on the transaction. This feature is great for marketplace owners who help facilitate services for merchants and collect a commission as revenue.

woocommerce_emails_attach_downloadables() must be an instance of WC_Order

Getting the below error due to woocommerce conflicting with the mpesa plugin. This conflict makes the registration and forget password functionality not work on my wordpress website. See full error log below:

2023-04-10T17:11:53+00:00 CRITICAL Uncaught TypeError: Argument 3 passed to Osen\Woocommerce\Utilities::woocommerce_emails_attach_downloadables() must be an instance of WC_Order, instance of WP_User given, called in /home/site/public_html/wp-includes/class-wp-hook.php on line 310 and defined in /home/site/public_html/wp-content/plugins/osen-wc-mpesa-3.0.1rc/src/Utilities.php:110
Stack trace:
#0 /home/site/public_html/wp-includes/class-wp-hook.php(310): Osen\Woocommerce\Utilities->woocommerce_emails_attach_downloadables(Array, 'customer_reset_...', Object(WP_User))
#1 /home/site/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array)
#2 /home/site/public_html/wp-content/plugins/woocommerce/includes/emails/class-wc-email.php(461): apply_filters('woocommerce_ema...', Array, 'customer_reset_...', Object(WP_User), Object(WC_Email_Customer_Reset_Password))
#3 /home/site/public_html/wp-content/plugins/woocommerce/includes/emails/class-wc-email-customer-reset-password.php(114): WC_Email->get_attachme in /home/site/public_html/wp-content/plugins/osen-wc-mpesa-3.0.1rc/src/Utilities.php on line 110

Endpoints

where should I register as the endpoint in woo commerce?

Callback information not confirming payment in woocommerce

Hi,
Firstly I wanna say thank u for creating the plugin. I am having a problem with checkout after someone has paid. I have registered URLs and validation and confirmation for my till number, and when you pay to the till number I get a response from MPESA with all the details but inside woocommerce the order still remains on the "On Hold" status. Any ideas why?
When I looked at my server there was no database table to hold the transactions. So I created a database table for MPESA and I can see the transactions on my newly created database get written in.
1.)Am I supposed to create the database for mpesa or not?
2.)Oh and another question, are the confirm, validate, reconcile and timeout folders supposed to remain empty?

Auto currency conversion

How do you enable this on the code? i mean when you have a store which sells good on USD how do you auto convert the amount to KES?

Organization Receiving the payment is unavailable

I am getting an error when it comes to STK push. ''Transaction failed, Mpesa cannot process payment.....Organization Receiving the payment is unavailable. Safaricom said that external validation was enabled so it was disabled but still the error persists.

Sandbox not getting callback

Hello. I'd really use your assistance. I'm on sandbox and everything is working fine until after the user pays. The buyer pays using STK push but no callback is made back to the website so as to complete the order.

Unable to register callback URL

I'm working on sandbox, I have put everything correctly but I can't register the callback URL. I get the error 'Could not register M-PESA URLs, try again later'.
Is M-PESA developer portal experiencing issues?
I also tried creating a new app but it keeps failing.
daraja
osen

Error when activating Plugin

I get this error when i activate plugin.
Screenshot 2019-10-02 10 59 05

Even though the plugin gets activated but when i try to register URLS, i get an error as well.
"Could not register M-PESA URLs, try again later."
Whats coursing this error ?
thank you

Connect to daraja

I get this error when testing payment on clients side. Failed! MPesa Error 1: Could not connect to Daraja

image

Payment status

image

Installed and activated the latest version 3.0.1 to resolve the previous issue of payment status but it seems not resolved yet.
Looking forward to your great help as usual.

Look at the attached screenshot.

KopoKopo

Can the same work with kopokopo?

STK Push notification on the site "Confirming receipt, please wait"

Hello, after a phone number is entered and the STK push notification for payment is received, the message on the site may display as "Confirming receipt, please wait" as shown in the attached image. How long does it typically take for the status of the message to update after a successful payment has been made?

Screenshot from 2023-01-02 18-32-07

STK PUSH WORKING BUT RESPONSE RECEIVED CONTAINS AN ERROR

the following is the response from Mpesa after one inputs pin:
{"Body":{"stkCallback":{"MerchantRequestID":"40617-17188129-1","CheckoutRequestID":"ws_CO_22062021155116737510","ResultCode":"SFC_IC0003","ResultDesc":"The operator does not exist."}}}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.