Check for Transaction Success

Home Forums UPI API Check for Transaction Success

This topic contains 0 replies, has 1 voice, and was last updated by  rselva 8 months, 2 weeks ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #1823

    rselva
    Participant

    For Info:
    To check if the payment started from 3rd party app via PSP is a success, the 3rd Party app has to check using onActivityResult using code similar to the code (available in UPI tech specs) shown below:

    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) 
    {
    if (requestCode == 1 && resultCode == Activity.RESULT_OK && data != null) 
    {
    HashMap<String, String> credListHashMap = (HashMap<String, 
    String>)data.getSerializableExtra("credBlocks");
    for(String cred : credListHashMap.keySet())
    { 
    try {
    JSONObject credBlock=new 
    JSONObject(credListHashMap.get(cred));
    Log.i("keyId", credBlock.getString("keyId"));
    Log.i("message", credBlock.getString("message"));
    } catch (JSONException e) {
    e.printStackTrace();
    }
    }
    }
    }
    
    • This topic was modified 8 months, 2 weeks ago by  rselva.
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.