newtonmunene99 / mpesa-dart

A dart wrapper around mpesa daraja api
https://pub.dev/packages/mpesa
MIT License
21 stars 15 forks source link

Mpesa Till number #3

Closed JohnM-Kahura closed 3 years ago

JohnM-Kahura commented 3 years ago

Can I use this package for till number

newtonmunene99 commented 3 years ago

Hi yes. This is specifically made for till numbers and playbills. With Till Numbers it might take some extra configuration.

On Mon, 4 Oct 2021, 11:11 pm JohnM-Kahura, @.***> wrote:

Can I use this package for till number

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/newtonmunene99/mpesa-dart/issues/3, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG7KKJPXVKTRXAMRZD4E6YDUFIC6RANCNFSM5FKFJVWA .

JohnM-Kahura commented 3 years ago

can I just edit the package source code and replace the transaction type with ConsumerBuyGoodsonline .will this work and is there a specifc test business short code provided for Till number by safaricom. If am wrong could you please guide me on how to integrate it with till number

newtonmunene99 commented 3 years ago

You don't need to edit the source code, just pass CustomerBuyGoodsOnline e.g.

mpesa
            .lipaNaMpesa(
                phoneNumber: "",
                amount: 1,
                businessShortCode: "",
                callbackUrl: "",
                transactionType: "CustomerBuyGoodsOnline"
            )

For the test business code, see here https://developer.safaricom.co.ke/FAQs#:~:text=online%20Short%20code%20%3D-,174379,-(FOR%20LIPA%20NA