2017-01-09 2 views
-3

Hallo Ich möchte paytm integrieren, habe ich eine Probe von Paytm. Ich habe mein Entwicklerkonto auf paytm erstellt und die App-Anmeldedaten, Händlerdetails usw. erhalten. Aber es scheint nicht zu funktionieren. Es zeigt den Fehler an: Oops! Session expired due to inctivity our system encounted an obstacle. Bitte zeig mir die Schritte. Hier ist mein CodePaytm Brieftasche Integration Android

public void onStartTransaction(View view) { 
    PaytmPGService Service = PaytmPGService.getStagingService(); 
    Map<String, String> paramMap = new HashMap<String, String>(); 

    // these are mandatory parameters 

    paramMap.put("ORDER_ID", ((EditText) findViewById(R.id.order_id)).getText().toString()); 
    paramMap.put("MID", ((EditText) findViewById(R.id.merchant_id)).getText().toString()); 
    paramMap.put("CUST_ID", ((EditText) findViewById(R.id.customer_id)).getText().toString()); 
    paramMap.put("CHANNEL_ID", ((EditText) findViewById(R.id.channel_id)).getText().toString()); 
    paramMap.put("INDUSTRY_TYPE_ID", ((EditText) findViewById(R.id.industry_type_id)).getText().toString()); 
    paramMap.put("WEBSITE", ((EditText) findViewById(R.id.website)).getText().toString()); 
    paramMap.put("TXN_AMOUNT", ((EditText) findViewById(R.id.transaction_amount)).getText().toString()); 
    paramMap.put("THEME", ((EditText) findViewById(R.id.theme)).getText().toString()); 
    paramMap.put("EMAIL", ((EditText) findViewById(R.id.cust_email_id)).getText().toString()); 
    paramMap.put("MOBILE_NO", ((EditText) findViewById(R.id.cust_mobile_no)).getText().toString()); 
    PaytmOrder Order = new PaytmOrder(paramMap); 

    PaytmMerchant Merchant = new PaytmMerchant(
      "https://pguat.paytm.com/paytmchecksum/paytmCheckSumGenerator.jsp", 
      "https://pguat.paytm.com/paytmchecksum/paytmCheckSumVerify.jsp"); 

    Service.initialize(Order, Merchant, null); 

    Service.startPaymentTransaction(this, true, true, 
      new PaytmPaymentTransactionCallback() { 
       @Override 
       public void someUIErrorOccurred(String inErrorMessage) { 
        // Some UI Error Occurred in Payment Gateway Activity. 
        // // This may be due to initialization of views in 
        // Payment Gateway Activity or may be due to // 
        // initialization of webview. // Error Message details 
        // the error occurred. 
       } 

       @Override 
       public void onTransactionSuccess(Bundle inResponse) { 
        // After successful transaction this method gets called. 
        // // Response bundle contains the merchant response 
        // parameters. 
        Log.e("LOG", "Payment Transaction is successful " + inResponse); 
        Toast.makeText(getApplicationContext(), "Payment Transaction is successful ", Toast.LENGTH_LONG).show(); 
       } 

       @Override 
       public void onTransactionFailure(String inErrorMessage, 
         Bundle inResponse) { 
        // This method gets called if transaction failed. // 
        // Here in this case transaction is completed, but with 
        // a failure. // Error Message describes the reason for 
        // failure. // Response bundle contains the merchant 
        // response parameters. 
        Log.e("LOG", "Payment Transaction Failed " + inErrorMessage); 
        Toast.makeText(getBaseContext(), "Payment Transaction Failed ", Toast.LENGTH_LONG).show(); 
       } 

       @Override 
       public void networkNotAvailable() { // If network is not 
                // available, then this 
                // method gets called. 

        Log.e("LOG", "Payment Transaction Network Not Available !!!!!!!~~~~~~~~~"); 
       } 

       @Override 
       public void clientAuthenticationFailed(String inErrorMessage) { 
        // This method gets called if client authentication 
        // failed. // Failure may be due to following reasons // 
        // 1. Server error or downtime. // 2. Server unable to 
        // generate checksum or checksum response is not in 
        // proper format. // 3. Server failed to authenticate 
        // that client. That is value of payt_STATUS is 2. // 
        // Error Message describes the reason for failure. 

        Log.e("LOG", "~~~~~~~~~~~~~ Payment Transaction Client Auth Failed ~~~~~~~~~" + inErrorMessage); 
       } 

       @Override 
       public void onErrorLoadingWebPage(int iniErrorCode, 
         String inErrorMessage, String inFailingUrl) { 

       } 

       // had to be added: NOTE 
       @Override 
       public void onBackPressedCancelTransaction() { 
        // TODO Auto-generated method stub 
       } 

      }); 
} 

Bitte überprüfen logcat Antwort: -

 INDUSTRY_TYPE_ID=Retail&CHANNEL_ID=WAP&CHECKSUMHASH=Y1gNn%2BSaRMBSkv8WKLHGO0lchmnAqL10YeRZGQkYQv02iIfCa6qeoKZpAhJh8%2BTVP1uXvZuB5PnwM6AZe3LJ4q9oIB%2B1voaX7vjc%2FmjGg%2B4%3D&MOBILE_NO=pawan3&TXN_AMOUNT=1&MID=Bright17797484586497&EMAIL=pawandeepkaurkalsi%40gmail.com&THEME=merchant&payt_STATUS=1&CUST_ID=CUST23657&WEBSITE=BrightRootsPaytm&ORDER_ID=ORDER100004939 
01-09 17:44:01.953 14201-14201/com.example.merchantapp I/cr_Ime: ImeThread is enabled. 
01-09 17:44:01.954 14201-16142/com.example.merchantapp W/cr_media: Requires BLUETOOTH permission 
01-09 17:44:02.009 14201-14201/com.example.merchantapp D/PGSDK: Page started loading https://pguat.paytm.com/oltp-web/processTransaction 
01-09 17:44:02.011 14201-14201/com.example.merchantapp D/PGSDK: Progress dialog started 
01-09 17:44:02.033 14201-16176/com.example.merchantapp E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY) 
01-09 17:44:02.063 14201-16176/com.example.merchantapp W/VideoCapabilities: Unrecognized profile/level 32768/2 for video/mp4v-es 
01-09 17:44:02.063 14201-16176/com.example.merchantapp I/VideoCapabilities: Unsupported profile 8 for video/mp4v-es 
01-09 17:44:02.063 14201-16176/com.example.merchantapp I/VideoCapabilities: Unsupported profile 8 for video/mp4v-es 
01-09 17:44:02.063 14201-16176/com.example.merchantapp I/VideoCapabilities: Unsupported profile 8 for video/mp4v-es 
01-09 17:44:02.063 14201-16176/com.example.merchantapp I/VideoCapabilities: Unsupported profile 8 for video/mp4v-es 
01-09 17:44:02.064 14201-16176/com.example.merchantapp I/VideoCapabilities: Unsupported profile 8 for video/mp4v-es 
01-09 17:44:02.064 14201-16176/com.example.merchantapp I/VideoCapabilities: Unsupported profile 8 for video/mp4v-es 
01-09 17:44:02.100 14201-16176/com.example.merchantapp I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es 
01-09 17:44:02.783 14201-14201/com.example.merchantapp W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 14201 
01-09 17:44:03.145 14201-14201/com.example.merchantapp E/chromium: [ERROR:interface_registry.cc(99)] Failed to locate a binder for interface: autofill::mojom::AutofillDriver 
01-09 17:44:04.293 14201-14201/com.example.merchantapp D/PGSDK: Page finished loading https://pguat.paytm.com/oltp-web/processTransaction 
01-09 17:44:04.294 14201-14201/com.example.merchantapp D/PGSDK: Progress dialog ended 
+0

setzen Sie Ihre Fehlerprotokolle und erwähnt auf die Methode als auch, dass Fehler zurückgegeben – Stallion

+0

Achten Sie darauf, nicht irgendwo prod Umgebung statt Inszenierung verwendet haben. – Rohit5k2

+0

@ Rohit5k2 Check logcat bitte –

Antwort

0

Bitte folgen Sie den Schritten für paytm zu integrieren.

Schritt sind unten angegeben. 1.Download PGSDK-Bibliothek von http://paywithpaytm.com/developer/#web_plugin oder https://github.com/Paytm-Payments/Paytm_Android_App_Kit

2.Client Seite Zertifikat (Optional: von PAYTM Web zur Verfügung stellen). Passwort für das clientseitige Zertifikat. (Optional: von PAYTM Web zur Verfügung gestellt). Clientseitige Zertifikatsdatei in Raw-Ordner hinzufügen. Wenn der rohe Ordner nicht vorhanden ist, erstellen Sie einen rohen Ordner im Ordner "res".

3. Fügen Sie die INTERNET- und ACCESS_NETWORK_STATE-Berechtigungen zu Ihrer AndroidManifest.xml hinzu. Diese beiden Berechtigungen sind erforderlich, damit der PBSDK-Dienst ausgeführt werden kann. AndroidManifest.xml

4.Fügen Sie PaytmPGActivity in Ihre AndroidManifest.xml-Datei ein, und diese Aktivität ist bereits in Ihrer PGSDK vorhanden. Diese Aktivität führt alle Transaktionsinformationen aus und bietet Ihnen einen Rückruf.

Folgen Sie dieser link Hoffnung, das hilft. :)

+0

Warum werden doppelte Inhalte eingefügt? Besser, den Link zu kommentieren, von dem Sie [ursprünglichen Inhalt] kopiert haben (http://www.totheinew.com/blog/integrating-paytm-wallet-sdk-in-android-application/)! – Piyush

+0

ok entschuldigung für ein überzeugen. –