JosephineAkello / mpesa_flutter_demo

A simple flutter app explaining integrating Mpesa API with Flutter
3 stars 5 forks source link

organization receiving payment is unavaillable #1

Closed clarenznet closed 3 years ago

clarenznet commented 3 years ago

Hi, I have used your code, I get this error message when I make a payment: transaction failed mpesa cannot complete payment of Ksh to --, organization receiving payment is unavailable. Are you having the same error with yours or its working fine with everything.

JosephineAkello commented 3 years ago

@clarenznet What type of mpesa payment are you making?

Would you also share error screenshots?

clarenznet commented 3 years ago

I solved it by commenting the transaction type. I was getting this error SFC_IC0003. The transaction type that your flutter library was accepting is only CustomerPayBillOnline which is for pay bills I believe but in my case I am using a payment till number which requires CustomerBuyGoodsOnline as the transaction type. So I simply removed the transaction type and ensured that partyB is the Till Number.

businessShortCode: "", //transactionType: TransactionType.CustomerPayBillOnline, amount: , partyA: "+254xxxxxxxx", partyB: "till number", callBackURL: Uri.parse(""), accountReference: "", phoneNumber: "", baseUri: Uri.parse("https://api.safaricom.co.ke"), //baseUrl: "https://sandbox.safaricom.co.ke/", transactionDesc: "", passKey: "");