'Flutter: how to get payment status in UPI payment by android intent through deeplinking

I am trying to make UPI payment by android intent through deep link by launching URL

  void _pay() async {
    String _url='upi://pay?pa=name@upi&pn=Name&am=1&tn=Test Payment&cu=INR';
    var result = await launch(_url);
    debugPrint(result.toString());
    if (result ==true) {
      print("Done");
    } else if (result ==false){
      print("Fail");
    }
  }

After opening the UPI app and making payment how would i know that payment was succesful or not, how to get the payment status?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source