0

I have made a payment app in Java Kotlin. My requirement is that a webpage can call my app for payment then after successful payment I can response back that webpage with transaction ID.

From web page, I have called app through Android's Intend feature and made payment successfully. while reverting back to chrome I am facing issue.

If I use HTTP URL intend then it opens new Tab everytime,

 dataUri = Uri.parse("https://URL.com/app.php?amount=2&t_Id=123123123");
 Intent intent = new Intent(Intent.ACTION_VIEW, dataUri);

Another option is to target chrome through Intend again.

 dataUri = Uri.parse("//googlechrome:");
 Intent intent = new Intent(Intent.ACTION_VIEW, dataUri);

It is working but issue I am getting in this is not able to send data. I understand that with intend we are just changing focus back to chrome. I tried Put extra paramteres but it didn't work.

    intent.putExtra("t_Id", "12345");

Can any one suggest a better solution for it?

2
  • What about focusing on the user session the the website rather than a tab? If the payment is made and your app can just return success data to the website with everything related to the user that made de payment
    – esQmo_
    Commented Aug 31, 2023 at 12:27
  • Yes, @esQmo_ if extra parameteres worked then I can pass session ID too. Commented Sep 1, 2023 at 10:56

0