3

当我在测试环境中使用 Pay U Money SDKUI 时,一切正常。但是,当我在生产环境中使用相同的 SDKUI 时,它给了我一个错误 (5014):Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject

我能够成功地从我自己的服务器创建散列密钥,但我无法理解我所缺少的。请帮忙。

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);
    }

我收到了回复

status = "ERROR"
result = "Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject"
code = 5014 
4

1 回答 1

-2

逐行调试payumoney sdk,您将能够获得确切的失败原因。在大多数情况下,哈希值不匹配。这是他们 sdk 中的一个错误,即错误没有得到正确处理,因此返回了上面的 html 页面。

于 2017-06-03T20:43:56.470 回答