Getting Exception after successfully payment while get data from from intent

Hello,
i am using poynt sdk,in which i get an exception after successfully payment done.
I get an exception at below line.
Payment payment = data.getParcelableExtra(Intents.INTENT_EXTRAS_PAYMENT);

I am getting below exception
RuntimeException: Failure delivering result ResultInfo{who=null, request=13132, result=-1, data=Intent { act=poynt.intent.action.COLLECT_PAYMENT_RESULT (has extras) }} to activity {com.poyntmobileallinone.app/com.poyntmobileallinone.app.SampleActivity}

So is there any things i missing before get that data?
Please help me for that.

Thanks in advance.

1 Like

Have you implemented onActivityResult method in your Activity?

also make sure you are using the right api-model version:

PoyntOS SDK Version: 1.2.8
Poynt API Model Version: 1.2.32

Hi Dennis,
yes,I already add that.
In that i set below code.
if (requestCode == COLLECT_PAYMENT_REQUEST) {
if (resultCode == Activity.RESULT_OK) {
if (data != null) {
Payment payment = data
.getParcelableExtra(Intents.INTENT_EXTRAS_PAYMENT);
}
}
}

Hi Praveen,
I use eclipse for that whole project thus i have to migrate that code to eclipse.
But after that we are migrate whole code in Android Studio.

So in that i use below jar files for poynt sdk.
android-api-model-1.2.16.jar
nimbus-jose-jwt-2.13.1.jar
pgsdk.jar
classes.jar

And add that jar dependency to our project.

Now In that My payment completed successfully from poynt terminal but while getting data from intent object i get an error.

You are using an old version (1.2.16) - hence the reason why you are getting the error (Parcel errors). You need to upgrade to 1.2.32.

If you are using gradle files use the following dependencies:
// Poynt SDK and Model Dependencies
compile ‘co.poynt.api:android-api-model:1.2.32@jar’
compile ‘co.poynt.android.sdk:poynt-sdk:1.2.8@aar’

// JWT dependencies - if you want to parse JWTs
compile ‘net.jcip:jcip-annotations:1.0@jar’
compile ‘com.nimbusds:nimbus-jose-jwt:2.26@jar’
compile ‘net.minidev:json-smart:1.2@jar’

If you are using maven -add them to your pom file. If you are using good old ant, please download the new versions from our nexus repository.

Thanks Pravenn.
Let me try that.
I will update that library

Hi Praveen,
I Tried to found that jar
android-api-model-1.2.32.jar
but cant found.

Also i tried to add that dependency but my project get an error at compile time.

So can you please help me for that jar file?

This working for me
compile ‘co.poynt.api:android-api-model:1.2.32@jar’
compile ‘co.poynt.android.sdk:poynt-sdk:1.2.8@aar’

compile 'net.jcip:jcip-annotations:1.0@jar'
compile 'com.nimbusds:nimbus-jose-jwt:2.26@jar'
compile 'net.minidev:json-smart:1.2@jar'
1 Like

Hello ,
can you help me please I have the same problem , i get an exception after successful payment

Payment payment = data.getParcelableExtra(Intents.INTENT_EXTRAS_PAYMENT) ;
Exception :

java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=78668, result=-1, data=Intent { act=poynt.intent.action.COLLECT_PAYMENT_RESULT (has extras) }} to activity {com.creova.irsel.ova/com.creova.irsel.ova.activity.SampleActivity}: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: ������co.po

Hi there,

Are you using our developer unit or emulator? If it’s the former, can you post the last 4 digits of your serial #?
Also what version of android-api-model are you using in your build.gradle?

hi , I use
compile ‘co.poynt.api:android-api-model:1.2.32@jar’
compile ‘co.poynt.android.sdk:poynt-sdk:1.2.8@aar’

// JWT dependencies - if you want to parse JWTs
compile 'net.jcip:jcip-annotations:1.0@jar'
compile 'com.nimbusds:nimbus-jose-jwt:2.26@jar'
compile 'net.minidev:json-smart:1.2@jar'

Please update your Poynt dependencies to what I have below and try again:

    compile 'co.poynt.api:android-api-model:1.2.36@jar'
    compile 'co.poynt.android.sdk:poynt-sdk:1.2.9@aar'

thank you it 's work