Flutterwave / Python-v2

Python library for Flutterwave for Business (F4B) v2 APIs
https://developer.flutterwave.com/
MIT License
21 stars 15 forks source link

uganda mobile money payment keyError: 'txRef' #90

Closed ejangphoebe00 closed 3 years ago

ejangphoebe00 commented 3 years ago

i get this error when ever i try to process payment

corneliusyaovi commented 3 years ago

Hi @phibi3,

Please share your payload here.

ejangphoebe00 commented 3 years ago

def mm_payment(request):

payload = { "amount": "5000", "email": @.*", "phonenumber": "077*****", "IP":"355426087298442", "network":"MTN" }

try: res = rave.UGMobile.charge(payload)

res = rave.UGMobile.verify(res["txRef"])

print(res)

except RaveExceptions.TransactionChargeError as e: print(e.err) print(e.err["flwRef"])

except RaveExceptions.TransactionVerificationError as e: print(e.err["errMsg"]) print(e.err["txRef"])

return render(request, "loading_page.html" )

On Wed, 24 Mar 2021, 18:52 Cornelius Ashley-Osuzoka, < @.***> wrote:

Hi @phibi3 https://github.com/phibi3,

Please share your payload here.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Flutterwave/rave-python/issues/90#issuecomment-805942246, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJVYKIKOR7HRE5VZ2VTV7ETTFIDC5ANCNFSM4ZWVRLWA .

corneliusyaovi commented 3 years ago

Hello @phibi3 ,

The verify method has been updated across all MoMO classes.

This issue has been resolved.