I try to get the transaction detail base on Paypal Sdk when user confirm to pay. However, encountered problem for the code below

**problem encountered:**   

Type inference failed: Not enough information to infer parameter T in

fun<T :[ERROR:(name:String) :T!] > getParcelableExtra please specify it explicitly  

for this line: val confirm = data.getParcelableExtra(PaymentActivity.EXTRA\_RESULT\_CONFIRMATION)  

and not sure what this means toString(4):  

val paymentDetails = confirm.toJSONObject().toString(4)  

Thanks

```
override fun onActivityResult(requestCode:Int, resultCode:Int, data:Intent?) {
         super.onActivityResult(requestCode, resultCode, data)

        if(requestCode == my_request_code){

            if(resultCode == Activity.RESULT_OK) {

                if (resultCode == Activity.RESULT_OK)
                {

                    val confirm = data.getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION)

                    if (confirm != null)
                    {
                        try
                        {
                            //Getting the payment details
                            val paymentDetails = confirm.toJSONObject().toString(4)

                        // Log.i("paymentExample", paymentDetails)
                        //Starting a new activity for the payment details and also putting the payment details with intent

                            startActivity(Intent(this, ConfirmationActivity::class.java)
                                .putExtra("PaymentDetails", paymentDetails)
                                .putExtra("PaymentAmount", paymentAmount))
                        }
                        catch (e: JSONException) {
                            Log.e("paymentExample", "an extremely unlikely failure occurred: ", e)
                        }
                   }
              }
          }
     }
}

```