payu-intrepos / payumoney-new-sample-app

New Sample App For PayUmoney and PnP SKD integration
40 stars 37 forks source link

Some Error occured #8

Closed nawanirakshit closed 4 years ago

nawanirakshit commented 6 years ago

Greetings I am getting some error occurred error while debugging the application, can you please look into the code below of Android and server side Hash generation. The view is going to next page after generation and the displaying a Toast "Some Error Occurred"

It would be very nice of you to point out the issue Thanks in advance

Android code

Dependency used

    compile('com.payumoney.sdkui:plug-n-play:1.0.0'){
        transitive = true;
        exclude module: 'payumoney-sdk'
    }
    compile 'com.payumoney.core:payumoney-sdk:7.1.0'
 private void launchPayUMoneyFlow(String finalAmount) {

        String merchantKey = "*******";
        String merchantID = "*******";
        String email = SharedPreferenceClass.getEmail();
        String txnId = SharedPreferenceClass.getUserID() + System.currentTimeMillis();

        PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();

        payUmoneyConfig.setDoneButtonText("Continue");
        payUmoneyConfig.setPayUmoneyActivityTitle("Add Money");

        PayUmoneySdkInitializer.PaymentParam.Builder builder = new PayUmoneySdkInitializer.PaymentParam.Builder();

        String phone = SharedPreferenceClass.getMobile();
        String productName = "WalletMoneyAdd";
        String firstName = SharedPreferenceClass.getName().replaceFirst(" ", "");
        String udf1 = "";
        String udf2 = "";
        String udf3 = "";
        String udf4 = "";
        String udf5 = "";
        String udf6 = "";
        String udf7 = "";
        String udf8 = "";
        String udf9 = "";
        String udf10 = "";

        builder.setAmount(Double.parseDouble(finalAmount))
                .setTxnId(txnId)
                .setPhone(phone)
                .setProductName(productName)
                .setFirstName(firstName)
                .setEmail(email)
                .setsUrl("www.google.com") //static URL displayed
                .setfUrl("www.google.com") //static URL displayed
                .setUdf1(udf1)
                .setUdf2(udf2)
                .setUdf3(udf3)
                .setUdf4(udf4)
                .setUdf5(udf5)
//                .setUdf6(udf6)
//                .setUdf7(udf7)
//                .setUdf8(udf8)
//                .setUdf9(udf9)
//                .setUdf10(udf10)
                .setIsDebug(false) //tried with both true and false
                .setKey(merchantKey)
                .setMerchantId(merchantID);

        try {
            mPaymentParams = builder.build();

            generateHashFromServer(mPaymentParams);

        } catch (Exception e) {
            Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();
        }
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        // Result Code is -1 send from Payumoney activity
        Log.d(TAG, "request code " + requestCode + " resultcode " + resultCode);
        if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=
                null) {
            TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager
                    .INTENT_EXTRA_TRANSACTION_RESPONSE);

            ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);

            // Check which object is non-null
            if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {
                if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {
                    //Success Transaction
                } else {
                    //Failure Transaction
                }

                // Response from Payumoney
                String payuResponse = transactionResponse.getPayuResponse();

                // Response from SURl and FURL
                String merchantResponse = transactionResponse.getTransactionDetails();

                new AlertDialog.Builder(this)
                        .setCancelable(false)
                        .setMessage("Payu's Data : " + payuResponse + "\n\n\n Merchant's Data: " + merchantResponse)
                        .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
                            public void onClick(DialogInterface dialog, int whichButton) {
                                dialog.dismiss();
                            }
                        }).show();

            } else if (resultModel != null && resultModel.getError() != null) {
                Log.d(TAG, "Error response : " + resultModel.getError().getTransactionResponse());
            } else {
                Log.d(TAG, "Both objects are null!");
            }
        }
    }

    /**
     * This method generates hash from server.
     *
     * @param paymentParam payments params used for hash generation
     */
    public void generateHashFromServer(PayUmoneySdkInitializer.PaymentParam paymentParam) {
        //nextButton.setEnabled(false); // lets not allow the user to click the button again and again.
        HashMap<String, String> params = paymentParam.getParams();

        // lets create the post params
        StringBuffer postParamsBuffer = new StringBuffer();
        postParamsBuffer.append(concatParams(PayUmoneyConstants.KEY, params.get(PayUmoneyConstants.KEY)));
        postParamsBuffer.append(concatParams(PayUmoneyConstants.AMOUNT, params.get(PayUmoneyConstants.AMOUNT)));
        postParamsBuffer.append(concatParams(PayUmoneyConstants.TXNID, params.get(PayUmoneyConstants.TXNID)));
        postParamsBuffer.append(concatParams(PayUmoneyConstants.EMAIL, params.get(PayUmoneyConstants.EMAIL)));
        postParamsBuffer.append(concatParams("productinfo", params.get(PayUmoneyConstants.PRODUCT_INFO)));
        postParamsBuffer.append(concatParams("firstname", params.get(PayUmoneyConstants.FIRSTNAME)));
        postParamsBuffer.append(concatParams(PayUmoneyConstants.UDF1, params.get(PayUmoneyConstants.UDF1)));
        postParamsBuffer.append(concatParams(PayUmoneyConstants.UDF2, params.get(PayUmoneyConstants.UDF2)));
        postParamsBuffer.append(concatParams(PayUmoneyConstants.UDF3, params.get(PayUmoneyConstants.UDF3)));
        postParamsBuffer.append(concatParams(PayUmoneyConstants.UDF4, params.get(PayUmoneyConstants.UDF4)));
        postParamsBuffer.append(concatParams(PayUmoneyConstants.UDF5, params.get(PayUmoneyConstants.UDF5)));
        postParamsBuffer.append(concatParams(PayUmoneyConstants.SALT, "dmMQWX2ynk"));

        String postParams = postParamsBuffer.charAt(postParamsBuffer.length() - 1) == '&' ? postParamsBuffer.substring(0, postParamsBuffer.length() - 1).toString() : postParamsBuffer.toString();

        System.out.println("PARAMS >> " + postParams);
        GetHashesFromServerTask getHashesFromServerTask = new GetHashesFromServerTask();
        getHashesFromServerTask.execute(postParams);
    }

    protected String concatParams(String key, String value) {
        return key + "=" + value + "&";
    }

    /**
     * This AsyncTask generates hash from server.
     */
    @SuppressLint("StaticFieldLeak")
    private class GetHashesFromServerTask extends AsyncTask<String, String, String> {
        private ProgressDialog progressDialog;

        @Override
        protected void onPreExecute() {
            super.onPreExecute();
            progressDialog = new ProgressDialog(AddMoneyActivity.this);
            progressDialog.setMessage("Please wait...");
            progressDialog.show();
        }

        @Override
        protected String doInBackground(String... postParams) {

            String merchantHash = "";
            try {
                //TODO Below url is just for testing purpose, merchant needs to replace this with their server side hash generation url
//server side API returning the payment_hash
                URL url = new URL("http://skillforce.co.in/api//test"); 

                String postParam = postParams[0];

                byte[] postParamsByte = postParam.getBytes("UTF-8");

                HttpURLConnection conn = (HttpURLConnection) url.openConnection();
                conn.setRequestMethod("POST");
                conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
                conn.setRequestProperty("Content-Length", String.valueOf(postParamsByte.length));
                conn.setDoOutput(true);
                conn.getOutputStream().write(postParamsByte);

                InputStream responseInputStream = conn.getInputStream();
                StringBuffer responseStringBuffer = new StringBuffer();
                byte[] byteContainer = new byte[1024];
                for (int i; (i = responseInputStream.read(byteContainer)) != -1; ) {
                    responseStringBuffer.append(new String(byteContainer, 0, i));
                }

                JSONObject response = new JSONObject(responseStringBuffer.toString());

                Iterator<String> payuHashIterator = response.keys();
                while (payuHashIterator.hasNext()) {
                    String key = payuHashIterator.next();
                    System.out.println("KEY >> " + key);
                    System.out.println("VALUE >> " + response.getString(key));
                    switch (key) {

                        case "payment_hash":
                            merchantHash = response.getString(key);
                            break;

                        default:
                            break;
                    }
                }

            } catch (MalformedURLException e) {
                e.printStackTrace();
            } catch (ProtocolException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } catch (JSONException e) {
                e.printStackTrace();
            }
            return merchantHash;
        }

        @Override
        protected void onPostExecute(String merchantHash) {
            super.onPostExecute(merchantHash);

            progressDialog.dismiss();

            if (merchantHash.isEmpty() || merchantHash.equals("")) {
                Toast.makeText(AddMoneyActivity.this, "Could not generate hash", Toast.LENGTH_SHORT).show();
            } else {
                mPaymentParams.setMerchantHash(merchantHash);
                PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, AddMoneyActivity.this, R.style.AppTheme_default, true);
            }
        }
    }

Server Side code

$k = trim($_POST['key']);
        $s = trim("dmMQWX2ynk");
        $o = trim($_POST['txnid']);
        $n = trim($_POST['firstname']);
        $e = trim($_POST['email']);
        $p = trim($_POST['productinfo']);
        $a = number_format(trim($_POST['amount']), 0);
        $responseHashSeq = "$k|$o|$a|$p|$n|$e||||||$s";
        $hash = hash("sha512", $respnsseHashSeq);
        echo json_encode(array('payment_hash' => $hash));
mayur19 commented 6 years ago

Some error occurred is due to wrong/mismatch hash generation from server. Please get hash generator script from here. I got this script from PayUMoney. It will work for production environment. For sandbox, call payumoney customer care and ask them to issue test credential. Test credentials given in PayUMoney dashboard is not working. Customer Care Number is 01246793000. You can also refer this question. Also read comments. I think question and answer will definitely help you as it contain whole code.

Along with these all make sure :

nawanirakshit commented 6 years ago

Thank you for the kind reply but the issue is still there after using the above questions. i am attaching some of the Log Trace while debugging the application

D/SdkHelper: isvalidEmail : true
D/SdkHelper: isValidNumber : **********
D/SdkHelper: isValidNumber : true
D/hash: cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
D/param :: key - 2t7VQBRU
D/param :: merchantId - 5986178
D/param :: txnid - 571514226794918
D/param :: amount - 50.0
D/param :: surl - http://skillforce.co.in/api/payuurl/
D/param :: furl - http://skillforce.co.in/api/payuurl/
D/param :: productInfo - WalletMoneyAdd
D/param :: email - abc@gmail.com
D/param :: firstName - RakshitNawani
D/param :: phone - **********
D/param :: udf1 - 
D/param :: udf2 - 
D/param :: udf3 - 
D/param :: udf4 - 
D/param :: udf5 - 
D/param :: udf6 - 
D/param :: udf7 - 
D/param :: udf8 - 
D/param :: udf9 - 
D/param :: udf10 - 

Params

key=*******&amount=50.00&txnid=571514226794918&email=abc@gmail.com&productinfo=WalletMoneyAdd&firstname=RakshitNawani&udf1=&udf2=&udf3=&udf4=&udf5=&salt=******* Payment Hash (from server)

a75aa3e52673654438c157f3014a12100f8f04f010135eedf3c255fe7be0c962eaffe2c4680e267566f95684190dec389246f996eed6d51d5db39544786c7a93

Some More data from the PayU team

D/Clevertap: eventData : {"ts":1514226795,"identity":"abc@gmail.com","type":"event","evtData":{"MID":"5986178","d_lang":"English","d_biohw":false,"u_lat":"","sdk_build":"7.1.0","d_scrn_res":"1080 * 1920","uuid":"2d711a1f-2c6b-4aea-aed7-84fcdc2c51d9","d_osv":"7.0","app_name":"MS Online","env":"DEBUG","d_os":"Android","EventSource":"SDK","d_ccid":"in","Platform":"Android","d_ua":"Mozilla\/5.0 (Linux; Android 7.0; Redmi Note 4 Build\/NRD90M; wv) AppleWebKit\/537.36 (KHTML, like Gecko) Version\/4.0 Chrome\/63.0.3239.111 Mobile Safari\/537.36","d_nw_type":"4G","d_ss":"0","app_version_name":"1.0","d_make":"xiaomi","isUserLoggedIn":false,"d_model":"Redmi Note 4","u_lon":"","u_acu":"","app_id":"com.msonline.android","app_version_code":"1","d_mfg":"Xiaomi","package_name":"com.msonline.android","device_id":"c466e16c042e18f","d_rooted":false,"sdk_version":"9","d_locale":"en","ip":"192.168.43.1","d_scrn_sz":"5.5181430535431915"},"evtName":"SDKInit"}

More Code

I/Difference: [ main: SourceFile: 361: onResponse() ] --> URL=/payment/app/v1/addPaymentTime=658
V/FA: Screen exposed for less than 1000 ms. Event not sent. time: 714
V/FA: Activity paused, time: 185214316
D/ADDING MONEY IN WALLET: request code 10000 resultcode 0
V/FA: Activity resumed, time: 185214348
D/FA: Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_previous_class(_pc)=PayUmoneyActivity, firebase_previous_id(_pi)=2876489386981523138, firebase_screen_class(_sc)=AddMoneyActivity, firebase_screen_id(_si)=2876489386981523135}]
D/Clevertap: Response : { "status" : "success" , "processed" : 1 , "unprocessed" : [ ]}
D/Clevertap: OnClevertapEventsLoggedSuccessful : file deleted
mayur19 commented 6 years ago

Have you tried it for production environment ? If production environment is working then you need to call customer care and ask them for testing credential. If production environment gives error then again it is problem of hash mismatch.

nawanirakshit commented 6 years ago

Greetings, I have tried with production as well as with the sandbox environment I did this by using .setIsDebug(false) //tried with both true and false

I have uncommented the code as well as asked me to do and I have also set the proper sURL and fURL but the result is same, can you please review the code and do let me know and if possible instead of "Some Error Occurred" can you please change the response to something meaningful so that we can understand. Thanks

mayur19 commented 6 years ago

Debug will definitely help you. Please share your debug information of 3 things :

  1. mPaymentParams = builder.build(); //which values you are setting up in builder
  2. getHashesFromServerTask.execute(postParams); // which values you are sending to server
  3. JSONObject response = new JSONObject(responseStringBuffer.toString()); //response from server.

One more thing, also send value of $responseHashSeq from server. This all data will help to find out actual error. I know that either generated is wrong or it is mismached with payu's hash.

MNGsulochana commented 6 years ago

Hi,Actually still I am facing this issue "some error occured",In my side if it is the problem with the merchant key ,my old Application with the Pay u money SDK is working,Right now I am trying to implementing by using dependency (latest ) in android side .. Please help me what was the issue exactly

MNGsulochana commented 6 years ago

MY json object response is josnobject: {"status":0,"result":"e21b449e413a0e90e24fa7eca2aff010bb19b15f45ddbdf01654f7e17f38b05f0b8f059e84d2217dd503d1d6a9cc9edf02ff8c6025048008352c091e68bf4b7a","errorCode":null,"responseCode":null}

MNGsulochana commented 6 years ago

this JSON response id for SANDBOX ,even for SANDBOX also I am getting this issue For SANDBOX in onactivityResult I am getting ....../MainActivity: request code 10000 resultcode 0 For PRODUCTION also in onactivityResult I am getting ....../MainActivity: request code 10000 resultcode 0

Please ,help me out..by using latest dependency,I am facing this issue But my Old pay u money sdk is wokring fine with all the merchant details

mayur19 commented 6 years ago

@MNGsulochana Generated hash is wrong. Please refer script from here

ameetpawar00 commented 6 years ago

@MNGsulochana does your problem solved please help same prob with me also log showing data but then getting closed

MNGsulochana commented 6 years ago

hi ,mayur i tried the hash generation script what u posted ,even with that also i am facing the same issue

MNGsulochana commented 6 years ago

private void calculateServerSideHashPayment1() {

String url = "http://demo.oriondigi.com/" + "payumoney_service?token=" + token + "&txnid=" + txnId + "&amount=" + amount + "&firstname=" + firstName + "&email=" + email + "&phone=" + phone + "&productinfo=" + productName ;

Toast.makeText(this, "Please wait... Generating hash from server ... ", Toast.LENGTH_LONG).show();

StringRequest jsonobjectreq=new StringRequest(Request.Method.POST, url, new Response.Listener<String>() {
    @Override
    public void onResponse(String response) {

        try {

    JSONObject jsonObject = new JSONObject(response);

            if(jsonObject.has("status"))
            {

                String status=jsonObject.optString("status");
                Log.d("ererorlistenr_status",status);
                if(status!=null)
        {

                    String hash=jsonObject.getString("result");
                    mPaymentParams.setMerchantHash(hash);

                    if (AppPreference.selectedTheme != -1) {

                        PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, MainActivity.this, AppPreference.selectedTheme, mAppPreference.isOverrideResultScreen());
                    } else {

                        PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, MainActivity.this, R.style.AppTheme_default, mAppPreference.isOverrideResultScreen());
                    }

                }
                else
                {

                    Toast.makeText(MainActivity.this, jsonObject.getString("result"), Toast.LENGTH_SHORT).show();

                }
            }

        } catch (JSONException e) {
            e.printStackTrace();
        }

    }
},
        new Response.ErrorListener() {
            @Override
            public void onErrorResponse(VolleyError error) {

                if (error instanceof NoConnectionError) {
                    Toast.makeText(MainActivity.this,
                            "please check internet connection",
                            Toast.LENGTH_SHORT).show();
                } else {

                    Log.d("ererorlistenr","erlistenr"+error.getMessage());
                    Toast.makeText(MainActivity.this, error.getMessage(), Toast.LENGTH_SHORT).show();

                }

            }
        })
{
    @Override
    protected Map<String, String> getParams() throws AuthFailureError {
        // return super.getParams();

        Map<String, String> params = new HashMap<String, String>();
        params.put(PayUmoneyConstants.KEY,mykey);
        params.put(PayUmoneyConstants.AMOUNT,amount+"");
        params.put(PayUmoneyConstants.TXNID,txnId);
        params.put(PayUmoneyConstants.EMAIL,userEmail);
        params.put(PayUmoneyConstants.PRODUCT_INFO,productName);
        params.put(PayUmoneyConstants.FIRSTNAME,firstName);
        params.put(PayUmoneyConstants.UDF1, udf1);
        params.put(PayUmoneyConstants.UDF2,udf2);
        params.put(PayUmoneyConstants.UDF3,udf3);
        params.put(PayUmoneyConstants.UDF4,udf4);
        params.put(PayUmoneyConstants.UDF5,udf5);

        return params;
    }
};
Volley.newRequestQueue(this).add(jsonobjectreq);

} this is the code i am using to post the values to server,the hash key what ever i am getting from server it is working with old sdk.. Is there any differrence to generate hash key for gradle dependency,,still I confused,& I tried the code what u mentioned for hash generation,still I face this isuue.. And from the logs I am getting my merchant key and merchant id..from the payumoney-sdk as log

MNGsulochana commented 6 years ago

In the server code it self I am using the merchant key and salt.. from android i am not sending these values.. Please help us Mayur sir

mayur19 commented 6 years ago

URL is wrong. You are already sending variables using post method. It should be String url = "http://demo.oriondigi.com/hash.php

After that debug your app and share following information -

  1. mPaymentParams
  2. Params you are sending to server. If possible, do not set any value to udf. Just leave it empty.
mayur19 commented 6 years ago

@MNGsulochana @ameetpawar00 If you are using sandbox mode, then use following test credentials. Test credentials from dashboard are not working.

MID : 4934580 Key : rjQUPktU Salt : e5iIg1jwi8

Below is the test card details for doing a test transaction in the testing mode.

Card No - 5123456789012346 Expiry - 05/2020 CVV - 123

MNGsulochana commented 6 years ago

thanks @mayur19 right now my code is working,

MNGsulochana commented 6 years ago

compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') { transitive = true; } compile 'com.payumoney.sdkui:plug-n-play:1.0.0'


by using this gradle dependency is it possible to customize the UI device-2018-01-05-132333

mayur19 commented 6 years ago

Yes. It is possible. Please read documentation.

MNGsulochana commented 6 years ago

with the documentation we are able to customize the titles and colours only,not whole UI.If I want to change the customize the whole thing is there any way ..please let me know.. If do u have any link please share

MNGsulochana commented 6 years ago

my how to work with the wallet money in this

MNGsulochana commented 6 years ago

apply plugin: 'com.android.application'

android { compileSdkVersion 27 buildToolsVersion '27.0.3' defaultConfig { applicationId "com.oriondigi.sia" minSdkVersion 19 targetSdkVersion 27 versionCode 10 versionName "DEMO-NEW-VERSION" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true flavorDimensions "versionCode" // Enabling multidex support. // multiDexEnabled true }

signingConfigs { dexOptions { // incremental true javaMaxHeapSize "4g" } }

buildTypes {

debug {
    debuggable true
    minifyEnabled false
    useProguard true
    /* applicationIdSuffix ".debug"*/
    //  buildConfigField 'boolean', 'ENABLE_CRASH', 'false'
    //  proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
release {
    debuggable false

    shrinkResources true
    minifyEnabled true
    /* applicationIdSuffix ".release"*/

    proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

    //  proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    //  proguardFiles fileTree('proguard').asList().toArray()
}

}

productFlavors { noExtensions withExtensions } lintOptions { disable 'MissingTranslation' }

}

dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) //noinspection GradleCompatible // implementation 'com.android.support:appcompat-v7:27.0.2'

withExtensionsCompile project(path: ':extension-ffmpeg') implementation 'com.google.android.exoplayer:exoplayer-hls:2.6.1' implementation 'com.google.android.exoplayer:exoplayer:2.6.1' implementation files('src/main/jniLibs/wasabi.jar') //noinspection GradleCompatible implementation 'com.android.support:leanback-v17:27.0.2'

implementation 'com.squareup.picasso:picasso:2.5.2' implementation 'jp.wasabeef:glide-transformations:3.0.1' implementation 'com.github.bumptech.glide:glide:4.3.1'

implementation 'com.squareup.retrofit2:converter-gson:2.3.0'

implementation 'org.apache.directory.studio:org.apache.commons.io:2.4' implementation 'com.squareup.retrofit2:retrofit:2.3.0' implementation 'com.google.code.gson:gson:2.8.1' //noinspection GradleCompatible

// implementation 'com.android.support:support-v4:27.0.2' // compile 'com.android.support:cardview-v7:27.0.2'

testImplementation 'junit:junit:4.12'

// compile 'com.android.support:multidex:1.0.2' implementation 'com.squareup.okhttp3:okhttp:3.9.1' implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1' // annotationProcessor 'com.github.bumptech.glide:compiler:4.1.1' / annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'/

implementation ('com.payumoney.sdkui:plug-n-play:1.0.0'){ transitive = true; exclude module: 'payumoney-sdk' }

implementation 'com.payumoney.core:payumoney-sdk:7.0.1'

}

This is my gradle file for the project after adding payumoney dependency I am getting the error like

Information:Gradle tasks [clean, :sia:generateNoExtensionsDebugSources, :sia:generateNoExtensionsDebugAndroidTestSources, :sia:mockableAndroidJar, :extension-ffmpeg:generateDebugSources, :extension-ffmpeg:generateDebugAndroidTestSources, :extension-ffmpeg:mockableAndroidJar] /home/sulochana/.gradle/caches/transforms-1/files-1.1/appcompat-v7-23.2.1.aar/881e020b641477421beb618a0a79354a/res/values/values.xml Error:(102, 5) error: duplicate value for resource 'attr/rowHeight' with config ''. Error:(102, 5) error: resource previously defined here. Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details Information:BUILD FAILED in 34s Information:3 errors Information:0 warnings Information:See complete output in console

if any idea please help me

Femina1431 commented 6 years ago

Hello, i need help!! I am Doing PayUMoney Integration in android in Test Mode. When i click on Pay Now Button after filling Credit Card Details then no action is performed for transaction....So where will the problem??

MNGsulochana commented 6 years ago

R u getting any toast message or any error?Is it working fine with Debit Card? check the hash key generation and the payment parameters what u r passing to the PayUMoneyFlowManager

Femina1431 commented 6 years ago

I am doing in test mode ...when I fill all the details in credit card section and click on pay now button at that tym no action is performed...means successfully done type alert is not coming

On Wed, May 9, 2018, 22:11 MNGsulochana notifications@github.com wrote:

R u getting any toast message or any error?Is it working fine with Debit Card? check the hash key generation and the payment parameters what u r passing to the PayUMoneyFlowManager

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/payu-intrepos/payumoney-new-sample-app/issues/8#issuecomment-387801079, or mute the thread https://github.com/notifications/unsubscribe-auth/AkTdND4I4JlTtiirzfPoao5fDxs8MmMEks5twxxBgaJpZM4RMVeN .

MNGsulochana commented 6 years ago

R u getting any toast message or any error?Is it working fine with Debit Card? check the hash key generation and the payment parameters what u r passing to the PayUMoneyFlowManager

MNGsulochana commented 6 years ago

hi,how to handle network issues with payumoney..I mean afterr payment if n/w goes down or else before payment if n/w goes down.. or else while entering card details if n/w gone ...

Please help me

ameetpawar00 commented 6 years ago

in which mode your env is

akbarsha03 commented 6 years ago

I don't understand why there are no proper error messages in the Android SDK. It took me some time to debug through the SDK to find out the key is invalid. Alias is there in the dashboard, but I didn't know that was the key until I looked inside the sample app.

sidpal7747 commented 6 years ago

Getting Hash Mismatch Error (Some error occur). Following is my hash sequence. key|txnid|amount|productinfo|firstname|email|||||||||||salt

sushantDhamanekar commented 5 years ago

The sample app doesn't work for sdk version 'com.payumoney.sdkui:plug-n-play:1.4.4.' It says 'Some error occured' on calling 'PayUmoneyFlowManager.startPayUMoneyFlow()'. But if I switch to version 'com.payumoney.sdkui:plug-n-play:1.2.0', it works.

dkchirag commented 5 years ago

Hello all, with sdk version 'com.payumoney.sdkui:plug-n-play:1.4.4.' some error occured on calling "PayUmoneyFlowManager.startPayUMoneyFlow()" & with sdk version 'com.payumoney.sdkui:plug-n-play:1.2.0' getting error like below on calling .startPayUMoenyFlow():

Caused by: java.lang.ClassNotFoundException: Didn't find class "android.webkit.TracingController" on path: DexPathList[[zip file "/data/app/com.android.chrome-LQ0XkazOo1ShH5NWo0n48g==/base.apk"],nativeLibraryDirectories=[/data/app/com.android.chrome-LQ0XkazOo1ShH5NWo0n48g==/lib/arm64, /data/app/com.android.chrome-LQ0XkazOo1ShH5NWo0n48g==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]

Kindly please help

satyajit-m commented 5 years ago

thanks @mayur19 right now my code is working,

Please can you say what modification you did to make it work. Same problem with me "Some Error Occurred"

mayur19 commented 5 years ago

@smohapatra200 Have you gone through this question? Try to compare java functions for hash generation and make sure you are sending all necessary parameters to the PHP script.

satyajit-m commented 5 years ago

@mayur19 Yes I have gone through it. i am using the PayUMoney PnP1.2.0 which i got from the PayUMoney documentation. The default sample app is running in test mode but when i change it to my credentials(key,id&salt) its not working in both sandbox/production mode(I also changed the url). The response from my url is {"result":"1c505cadbbea71fbedc5258d1816495d6f55974d9710c13d53848619c578b0aeac9b0976a53bfbe80bdc33d085bc3f6aff73f313623a94ec15","status":0,"errorCode":null,"responseCode":null} Is this correct? I have used your script to generate the hash

mayur19 commented 5 years ago

@smohapatra200 response is correct. I think there is issue with credentials. I remember that payU gave me universal credentials at that time. Sandbox was not working but production mode was working. I think it is better to schedule a meeting with payU support. They definitely will help you.

Arvi143 commented 5 years ago

@mayur19 same problem with me "Some error occur"

pandeyVishakha commented 4 years ago

I have issue with dependency implementation 'com.payumoney.sdkui:plug-n-play:1.6.0' not syncing with androidX How i can use it?

ameetpawar00 commented 4 years ago

I have issue with dependency implementation 'com.payumoney.sdkui:plug-n-play:1.6.0' not syncing with androidX How i can use it? They have provided a new sample please check it's working https://github.com/payu-intrepos/payumoney-new-sample-app

pandeyVishakha commented 4 years ago

@MNGsulochana @ameetpawar00 If you are using sandbox mode, then use following test credentials. Test credentials from dashboard are not working.

MID : 4934580 Key : rjQUPktU Salt : e5iIg1jwi8

Below is the test card details for doing a test transaction in the testing mode.

Card No - 5123456789012346 Expiry - 05/2020 CVV - 123

@mayur19 these credentials not working for me...any suggestions?

Rahul-Hooda commented 4 years ago

Closing this thread due to no activity

ghost commented 4 years ago

Hi... please any one give me the solution..... the problem is that i am not able to type card details in payumoney... i am using react.js