4

When I am using Pay U Money SDKUI in Test environment everything is working fine. However, when I am using the same SDKUI in the Production environment it's giving me an error (5014): Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject

I am successfully able to create hash key from my own server, I'm not able to understand what I am missing. Please help.

public void onPaymentRelatedDetailsResponse(PayuResponse payuResponse) {
        mPayuResponse = payuResponse;
        findViewById(R.id.progress_bar).setVisibility(View.GONE);
        if(payuResponse.isResponseAvailable() && payuResponse.getResponseStatus().getCode() == PayuErrors.NO_ERROR){ // ok we are good to go
            Toast.makeText(this, payuResponse.getResponseStatus().getResult(), Toast.LENGTH_LONG).show();
            if(payuResponse.isStoredCardsAvailable()){
                findViewById(R.id.linear_layout_stored_card).setVisibility(View.VISIBLE);
            }
            if(payuResponse.isNetBanksAvailable()){ // okay we have net banks now.
                findViewById(R.id.linear_layout_netbanking).setVisibility(View.VISIBLE);
            }
            if(payuResponse.isCashCardAvailable()){ // we have cash card too
                findViewById(R.id.linear_layout_cash_card).setVisibility(View.VISIBLE);
            }
            if(payuResponse.isCreditCardAvailable() || payuResponse.isDebitCardAvailable()){
                findViewById(R.id.linear_layout_credit_debit_card).setVisibility(View.VISIBLE);
            }
            if(payuResponse.isEmiAvailable()){
                findViewById(R.id.linear_layout_emi).setVisibility(View.VISIBLE);
            }
            if(payuResponse.isPaisaWalletAvailable() && payuResponse.getPaisaWallet().get(0).getBankCode().contains(PayuConstants.PAYUW)) {
                findViewById(R.id.linear_layout_payumoney).setVisibility(View.VISIBLE);
            }
        }else{
            Toast.makeText(this, "Something went wrong : " + payuResponse.getResponseStatus().getResult(), Toast.LENGTH_LONG).show();
        }

        // no mater what response i get just show this button, so that we can go further.
        findViewById(R.id.linear_layout_verify_api).setVisibility(View.VISIBLE);
    }

I am getting the response

status = "ERROR"
result = "Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject"
code = 5014 
Cœur
  • 37,241
  • 25
  • 195
  • 267
Saveen
  • 702
  • 2
  • 14
  • 34

1 Answers1

-2

Debug the payumoney sdk line by line and you will be able to get exact failure reason. In most of cases there is mismatch in hash. Its a bug in their sdk that errors are not handled properly, as a result above html page is returned.

Prateek Mehta
  • 488
  • 1
  • 8
  • 15