简体   繁体   中英

Payment Stripe With Asset Unistripe Unity Worked In Development Build But Not In Production Build C# Unity

I have make an app with unity. The app have a payment feature which i used a stripe as my payment gateway. I also use asset from unity call Unistripe to just create a token .

The apps and the payment work well when in development build (where I tick development build and script debugging in player setting and then build and run) But when i untick development build and script debugging for production release the payment is not working.

What could possible cause the payment not working ? Is there something that i am missing in here ? Or is there any setting that i am missing in here ?

Or

Is there any code that i am missing in here ?

Thank You

Note : This apps is a donation. So it is permitted to use a third party payment.

Edited :

This is the error from the log cat :

"java.net.ConnectException: Failed to connect to localhost/127.0.0.1:80" 
 "java.lang.ClassNotFoundException: com.onevcat.UniStripe.UniStripe"

I have found the problem myself. So the problem is there is a class didn't include in the final bundle when build.

So when build the game, i have set the build system to "Grade" and set the minify to "Proguard" .

This setting didn't keep all the class when build. If you want to keep all the class you must set the config in the Proguard_text.txt to keep the file when build.

So to easy solve this problem i just change the build system to "Internal (Deprecated)" since this build system keep all the class.

That's all.

Note : use proguard and change the proguard_text.txt config to keep the "com.onevcat.UniStripe.UniStripe" didn't worked as well. Maybe they are more class didn't include in the final bundle.

For more :

To keep the class Just type :

-keep class com.onevcat.UniStripe.**

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM