You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can't get SourceTypeModel from Source (Java.Lang.NoSuchMethodError: no non-static method "Lcom/stripe/android/model/Source;.getSourceTypeModel()Lcom/stripe/android/model/StripeJsonModel;)
#2
Hi NAXAM.
I'm implementing stride sdk for payment on xamarin android, so i'm using package Naxam.Stripe.Droid 5.1.1.
And in the package, i can't get value of SourceTypeModel from Source. SourceCardData sourceCardData = (SourceCardData)s.SourceTypeModel;
It always throw exception: {Java.Lang.NoSuchMethodError: no non-static method "Lcom/stripe/android/model/Source;.getSourceTypeModel()Lcom/stripe/android/model/StripeJsonModel;" ...... }
When i compare between native code of Stripe sdk and the generated C# file. I found that return type of method "getSourceTypeModel" is not correct. It should be "StripeSourceTypeModel" instead of "StripeJsonModel".
So I have solution for the issue: we try to update "return type" on RegisterAttribute. [Register ("getSourceTypeModel", "()Lcom/stripe/android/model/StripeSourceTypeModel;", "GetGetSourceTypeModelHandler")] By add some code on file metadata.xml: <remove-node path="/api/package[@name='com.stripe.android.model']/class[@name='Source']/method[@name='getSourceTypeModel' and count(parameter)=0]" /> <add-node path="/api/package[@name='com.stripe.android.model']/class[@name='Source']"> <method name="getSourceTypeModel" return="com.stripe.android.model.StripeSourceTypeModel" abstract="false" native="false" synchronized="false" static="false" final="true" deprecated="not deprecated" visibility="public"> </method> </add-node>
I had tested and it worked. Hope it's useful for you!
The text was updated successfully, but these errors were encountered:
Hi NAXAM.
I'm implementing stride sdk for payment on xamarin android, so i'm using package Naxam.Stripe.Droid 5.1.1.
And in the package, i can't get value of SourceTypeModel from Source.
SourceCardData sourceCardData = (SourceCardData)s.SourceTypeModel;
It always throw exception:
{Java.Lang.NoSuchMethodError: no non-static method "Lcom/stripe/android/model/Source;.getSourceTypeModel()Lcom/stripe/android/model/StripeJsonModel;" ...... }
When i compare between native code of Stripe sdk and the generated C# file. I found that return type of method "getSourceTypeModel" is not correct. It should be "StripeSourceTypeModel" instead of "StripeJsonModel".
So I have solution for the issue: we try to update "return type" on RegisterAttribute.
[Register ("getSourceTypeModel", "()Lcom/stripe/android/model/StripeSourceTypeModel;", "GetGetSourceTypeModelHandler")]
By add some code on file metadata.xml:
<remove-node path="/api/package[@name='com.stripe.android.model']/class[@name='Source']/method[@name='getSourceTypeModel' and count(parameter)=0]" /> <add-node path="/api/package[@name='com.stripe.android.model']/class[@name='Source']"> <method name="getSourceTypeModel" return="com.stripe.android.model.StripeSourceTypeModel" abstract="false" native="false" synchronized="false" static="false" final="true" deprecated="not deprecated" visibility="public"> </method> </add-node>
I had tested and it worked. Hope it's useful for you!
The text was updated successfully, but these errors were encountered: