Flutter Paynow SDK Now Available


#1

I’ve tried to put together an API for Flutter, it’s still a work in progress and i am welcoming all contributions & PRs :slight_smile:

Here is the link to the repo

Try it out and give feedback please.:slight_smile:


Flutter, datrt paynow sdk
#3

hi, I’ve been using the api for a few days now. the payments have been successful but when i make a payment request, status.paid returns false immediately after. i don’t know why the delay doesn’t kick in.


#4

Hi there, thank you for using the api

I looked at the flutter example code and I noticed the code for delay is as follows

                        Future.delayed(Duration(seconds: 20~/2));
                        // Check Transaction status from pollUrl
                        paynow.checkTransactionStatus(response.pollUrl)
                          ..then((StatusResponse status){
                            print(status.paid);
                          });

The fix is quite simple, it seems I just forgot to await the delay so if you change the line

Future.delayed(Duration(seconds: 20~/2);

To

await Future.delayed(Duration(seconds: 20~/2);

Everything should work fine. Hope this helps


#5

@cvusi76

NOTE: It is not recommended to poll from the app, best alternative would be to use a cloud function. I will be posting a tutorial on this soon.


#6

Much appreciated. I wanted to ask if you know of or have tried a method integrating the other payment methods into the api? I am trying to make vpayments on option inside of the flutter application .


#7

The method ‘SendMobile’ isn’t defined for the type 'Payment’
thank you, i’m trying it out and i seem to get stuck on this error


#8

Hi sorry for the late reply it seems you are calling sendMobile on payment instead of paynow


#9

Hi. I keep getting StatusResponse(paid: false… even if the money gets deducted. May you kindly assist