XiaoCongGame / sdk-smart-lib

The Android library project for Xiaocong SDK
0 stars 1 forks source link

Crash: Crash after successful payment #4

Closed thedmd closed 10 years ago

thedmd commented 10 years ago

After successful payment (according to logs) xcsdk-smart-demo crashed before reaching onActivityResult() which suggest crash occurred somewhere in xcsdk-smart-lib.

 53: I/SELinux ( 8153): Function: selinux_android_load_priority [0], There is no sepolicy file.
 54: I/SELinux ( 8153):
 55: I/SELinux ( 8153): Function: selinux_android_load_priority , loading version is VE=SEPF_GT-I9505_4.4.2_0010
 56: I/SELinux ( 8153):
 57: I/SELinux ( 8153):
 58: I/SELinux ( 8153): selinux_android_seapp_context_reload: seapp_contexts file is loaded from /data/security/spota/seapp_contexts
 59: D/dalvikvm( 8153): Late-enabling CheckJNI
101: W/ApplicationPackageManager( 8153): getCSCPackageItemText()
113: E/MoreInfoHPW_ViewGroup( 8153): Parent view is not a TextView
126: I/Adreno-EGL( 8153): <qeglDrvAPI_eglInitialize:381>: EGL 1.4 QUALCOMM build:  (CL3869936)
127: I/Adreno-EGL( 8153): OpenGL ES Shader Compiler Version: 17.01.11.SPL
128: I/Adreno-EGL( 8153): Build Date: 01/17/14 Fri
129: I/Adreno-EGL( 8153): Local Branch:
130: I/Adreno-EGL( 8153): Remote Branch:
131: I/Adreno-EGL( 8153): Local Patches:
132: I/Adreno-EGL( 8153): Reconstruct Branch:
134: D/OpenGLRenderer( 8153): Enabling debug mode 0
265: W/ApplicationPackageManager( 8153): getCSCPackageItemText()
269: E/MoreInfoHPW_ViewGroup( 8153): Parent view is not a TextView
282: E/ViewRootImpl( 8153): sendUserActionEvent() mView == null
376: W/ApplicationPackageManager( 8153): getCSCPackageItemText()
525: W/ApplicationPackageManager( 8153): getCSCPackageItemText()
526: E/MoreInfoHPW_ViewGroup( 8153): Parent view is not a TextView
868: W/ApplicationPackageManager( 8153): getCSCPackageItemText()
878: D/XcServiceClient( 8153): http://data.xiaocong.tv/gamecenter/me.json?access_token=4db4d5ea-f810-4563-bc38-5541298a65ef&method=me
886: D/ProgressBar( 8153): updateDrawableBounds: left = 0
887: D/ProgressBar( 8153): updateDrawableBounds: top = 0
888: D/ProgressBar( 8153): updateDrawableBounds: right = 102
889: D/ProgressBar( 8153): updateDrawableBounds: bottom = 102
992: D/XcServiceClient( 8153): {"userName":"11260001","userId":1418853}
993: I/XcUtils ( 8153): Server: GT-I9505#jfltexx#jflte#
994: E/接口  ( 8153): {"head":{"server":"GT-I9505#jfltexx#jflte#","method":"payment","hardware":"40:F3:08:FF:70:5C","user":1418853,"version":"3.3"},"body":{"sign":"9fbdd5b2b8553fa9247ec5fe2f83a08d","amount":"1","pkgName":"tv.xiaocong.sdk.demo","orderNo":"20140424153505","accessToken":"4db4d5ea-f810-4563-bc38-5541298a65ef","signType":"md5","partnerId":"100028","mark":"good boy","notifyUrl":"http:\/\/wwww.abc.com","goodsDes":"Sword"}}
1003: E/Payment ( 8153): {"message":"成功","status":200,"data":{"outOrderNumber":"20140424153505","payType":"3,5","userMoney":0}}
1004: E/getGameinfomation( 8153): com.xiaocong.xcobject.PaymentRequset@42e56260
1021: W/ApplicationPackageManager( 8153): getCSCPackageItemText()
1025: D/dalvikvm( 8153): GC_FOR_ALLOC freed 1167K, 28% free 19505K/27088K, paused 37ms, total 38ms
1026: I/dalvikvm-heap( 8153): Grow heap (frag case) to 32.131MB for 9884176-byte allocation
1027: D/dalvikvm( 8153): GC_FOR_ALLOC freed 130K, 21% free 29035K/36744K, paused 18ms, total 18ms
1028: I/dalvikvm-heap( 8153): Grow heap (frag case) to 103.203MB for 74649616-byte allocation
1029: D/AbsListView( 8153): Get MotionRecognitionManager
1031: D/dalvikvm( 8153): GC_FOR_ALLOC freed 22K, 7% free 102020K/109648K, paused 16ms, total 16ms
1034: D/dalvikvm( 8153): GC_FOR_ALLOC freed 13K, 3% free 111902K/114972K, paused 20ms, total 20ms
1035: D/AbsListView( 8153): onVisibilityChanged() is called, visibility : 8
1036: D/AbsListView( 8153): unregisterIRListener() is called
1037: D/AbsListView( 8153): Get MotionRecognitionManager
1038: E/Choses_payWays_Activity( 8153): 3,5////20140424153505
1039: E/types.length( 8153): 2
1040: D/AbsListView( 8153): onVisibilityChanged() is called, visibility : 4
1041: D/AbsListView( 8153): unregisterIRListener() is called
1042: D/AbsListView( 8153): onVisibilityChanged() is called, visibility : 4
1043: D/AbsListView( 8153): unregisterIRListener() is called
1044: D/AbsListView( 8153): onVisibilityChanged() is called, visibility : 0
1045: D/AbsListView( 8153): unregisterIRListener() is called
1046: D/AbsListView( 8153): onVisibilityChanged() is called, visibility : 0
1047: D/AbsListView( 8153): unregisterIRListener() is called
1048: I/Choreographer( 8153): Skipped 44 frames!  The application may be doing too much work on its main thread.
1049: D/AbsListView( 8153): unregisterIRListener() is called
1050: D/AbsListView( 8153): unregisterIRListener() is called
1051: I/dalvikvm-heap( 8153): Clamp target GC heap from 141.098MB to 128.000MB
1052: D/dalvikvm( 8153): GC_FOR_ALLOC freed 25K, 3% free 126403K/129444K, paused 19ms, total 19ms
1053: I/dalvikvm-heap( 8153): Forcing collection of SoftReferences for 4036912-byte allocation
1054: I/dalvikvm-heap( 8153): Clamp target GC heap from 141.089MB to 128.000MB
1055: D/dalvikvm( 8153): GC_BEFORE_OOM freed 78K, 3% free 126325K/129444K, paused 31ms, total 31ms
1056: E/dalvikvm-heap( 8153): Out of memory on a 4036912-byte allocation.
1057: I/dalvikvm( 8153): "main" prio=5 tid=1 RUNNABLE
1058: I/dalvikvm( 8153):   | group="main" sCount=0 dsCount=0 obj=0x41893ea0 self=0x417924c8
1059: I/dalvikvm( 8153):   | sysTid=8153 nice=-11 sched=0/0 cgrp=apps handle=1074467156
1060: I/dalvikvm( 8153):   | state=R schedstat=( 0 0 0 ) utm=324 stm=126 core=1
1061: I/dalvikvm( 8153):   at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
1062: I/dalvikvm( 8153):   at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:677)
1063: I/dalvikvm( 8153):   at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:507)
1064: I/dalvikvm( 8153):   at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:872)
1065: I/dalvikvm( 8153):   at android.content.res.Resources.loadDrawable(Resources.java:3024)
1066: I/dalvikvm( 8153):   at android.content.res.Resources.getDrawable(Resources.java:1586)
1067: I/dalvikvm( 8153):   at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:176)
1068: I/dalvikvm( 8153):   at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:973)
1069: I/dalvikvm( 8153):   at android.graphics.drawable.Drawable.createFromXml(Drawable.java:913)
1070: I/dalvikvm( 8153):   at android.content.res.Resources.loadDrawable(Resources.java:3006)
1071: I/dalvikvm( 8153):   at android.content.res.Resources.getDrawable(Resources.java:1586)
1072: I/dalvikvm( 8153):   at android.view.View.setBackgroundResource(View.java:16144)
1073: I/dalvikvm( 8153):   at com.xiaocong.util.MySimpleAdapter.getView(MySimpleAdapter.java:209)
1074: I/dalvikvm( 8153):   at android.widget.AbsListView.obtainView(AbsListView.java:2715)
1075: I/dalvikvm( 8153):   at android.widget.GridView.onMeasure(GridView.java:1049)
1076: I/dalvikvm( 8153):   at android.view.View.measure(View.java:17387)
1077: I/dalvikvm( 8153):   at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:719)
1078: I/dalvikvm( 8153):   at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:455)
1079: I/dalvikvm( 8153):   at android.view.View.measure(View.java:17387)
1080: I/dalvikvm( 8153):   at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:719)
1081: I/dalvikvm( 8153):   at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:455)
1082: I/dalvikvm( 8153):   at android.view.View.measure(View.java:17387)
1083: I/dalvikvm( 8153):   at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5352)
1084: I/dalvikvm( 8153):   at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
1085: I/dalvikvm( 8153):   at android.view.View.measure(View.java:17387)
1086: I/dalvikvm( 8153):   at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5352)
1087: I/dalvikvm( 8153):   at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1410)
1088: I/dalvikvm( 8153):   at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
1089: I/dalvikvm( 8153):   at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
1090: I/dalvikvm( 8153):   at android.view.View.measure(View.java:17387)
1091: I/dalvikvm( 8153):   at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5352)
1092: I/dalvikvm( 8153):   at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
1093: I/dalvikvm( 8153):   at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2533)
1094: I/dalvikvm( 8153):   at android.view.View.measure(View.java:17387)
1095: I/dalvikvm( 8153):   at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2211)
1096: I/dalvikvm( 8153):   at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1350)
1097: I/dalvikvm( 8153):   at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1547)
1098: I/dalvikvm( 8153):   at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1234)
1099: I/dalvikvm( 8153):   at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6465)
1100: I/dalvikvm( 8153):   at android.view.Choreographer$CallbackRecord.run(Choreographer.java:803)
1101: I/dalvikvm( 8153):   at android.view.Choreographer.doCallbacks(Choreographer.java:603)
1102: I/dalvikvm( 8153):   at android.view.Choreographer.doFrame(Choreographer.java:573)
1103: I/dalvikvm( 8153):   at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:789)
1104: I/dalvikvm( 8153):   at android.os.Handler.handleCallback(Handler.java:733)
1105: I/dalvikvm( 8153):   at android.os.Handler.dispatchMessage(Handler.java:95)
1106: I/dalvikvm( 8153):   at android.os.Looper.loop(Looper.java:157)
1107: I/dalvikvm( 8153):   at android.app.ActivityThread.main(ActivityThread.java:5356)
1108: I/dalvikvm( 8153):   at java.lang.reflect.Method.invokeNative(Native Method)
1109: I/dalvikvm( 8153):   at java.lang.reflect.Method.invoke(Method.java:515)
1110: I/dalvikvm( 8153):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
1111: I/dalvikvm( 8153):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
1112: I/dalvikvm( 8153):   at dalvik.system.NativeStart.main(Native Method)
1113: I/dalvikvm( 8153):
1114: D/skia    ( 8153): --- allocation failed for scaled bitmap
1115: D/AndroidRuntime( 8153): Shutting down VM
1116: W/dalvikvm( 8153): threadid=1: thread exiting with uncaught exception (group=0x41892da0)
1117: E/AndroidRuntime( 8153): FATAL EXCEPTION: main
1118: E/AndroidRuntime( 8153): Process: tv.xiaocong.sdk.demo, PID: 8153
1119: E/AndroidRuntime( 8153): java.lang.OutOfMemoryError
1120: E/AndroidRuntime( 8153):  at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
1121: E/AndroidRuntime( 8153):  at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:677)
1122: E/AndroidRuntime( 8153):  at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:507)
1123: E/AndroidRuntime( 8153):  at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:872)
1124: E/AndroidRuntime( 8153):  at android.content.res.Resources.loadDrawable(Resources.java:3024)
1125: E/AndroidRuntime( 8153):  at android.content.res.Resources.getDrawable(Resources.java:1586)
1126: E/AndroidRuntime( 8153):  at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:176)
1127: E/AndroidRuntime( 8153):  at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:973)
1128: E/AndroidRuntime( 8153):  at android.graphics.drawable.Drawable.createFromXml(Drawable.java:913)
1129: E/AndroidRuntime( 8153):  at android.content.res.Resources.loadDrawable(Resources.java:3006)
1130: E/AndroidRuntime( 8153):  at android.content.res.Resources.getDrawable(Resources.java:1586)
1131: E/AndroidRuntime( 8153):  at android.view.View.setBackgroundResource(View.java:16144)
1132: E/AndroidRuntime( 8153):  at com.xiaocong.util.MySimpleAdapter.getView(MySimpleAdapter.java:209)
1133: E/AndroidRuntime( 8153):  at android.widget.AbsListView.obtainView(AbsListView.java:2715)
1134: E/AndroidRuntime( 8153):  at android.widget.GridView.onMeasure(GridView.java:1049)
1135: E/AndroidRuntime( 8153):  at android.view.View.measure(View.java:17387)
1136: E/AndroidRuntime( 8153):  at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:719)
1137: E/AndroidRuntime( 8153):  at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:455)
1138: E/AndroidRuntime( 8153):  at android.view.View.measure(View.java:17387)
1139: E/AndroidRuntime( 8153):  at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:719)
1140: E/AndroidRuntime( 8153):  at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:455)
1141: E/AndroidRuntime( 8153):  at android.view.View.measure(View.java:17387)
1142: E/AndroidRuntime( 8153):  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5352)
1143: E/AndroidRuntime( 8153):  at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
1144: E/AndroidRuntime( 8153):  at android.view.View.measure(View.java:17387)
1145: E/AndroidRuntime( 8153):  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5352)
1146: E/AndroidRuntime( 8153):  at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1410)
1147: E/AndroidRuntime( 8153):  at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
1148: E/AndroidRuntime( 8153):  at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
1149: E/AndroidRuntime( 8153):  at android.view.View.measure(View.java:17387)
1150: E/AndroidRuntime( 8153):  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5352)
1151: E/AndroidRuntime( 8153):  at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
1152: E/AndroidRuntime( 8153):  at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2533)
1153: E/AndroidRuntime( 8153):  at android.view.View.measure(View.java:17387)
1154: E/AndroidRuntime( 8153):  at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2211)
1155: E/AndroidRuntime( 8153):  at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1350)
1156: E/AndroidRuntime( 8153):  at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1547)
1157: E/AndroidRuntime( 8153):  at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1234)
1158: E/AndroidRuntime( 8153):  at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6465)
1159: E/AndroidRuntime( 8153):  at android.view.Choreographer$CallbackRecord.run(Choreographer.java:803)
1160: E/AndroidRuntime( 8153):  at android.view.Choreographer.doCallbacks(Choreographer.java:603)
1161: E/AndroidRuntime( 8153):  at android.view.Choreographer.doFrame(Choreographer.java:573)
1162: E/AndroidRuntime( 8153):  at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:789)
1163: E/AndroidRuntime( 8153):  at android.os.Handler.handleCallback(Handler.java:733)
1164: E/AndroidRuntime( 8153):  at android.os.Handler.dispatchMessage(Handler.java:95)
1165: E/AndroidRuntime( 8153):  at android.os.Looper.loop(Looper.java:157)
1166: E/AndroidRuntime( 8153):  at android.app.ActivityThread.main(ActivityThread.java:5356)
1167: E/AndroidRuntime( 8153):  at java.lang.reflect.Method.invokeNative(Native Method)
1168: E/AndroidRuntime( 8153):  at java.lang.reflect.Method.invoke(Method.java:515)
1169: E/AndroidRuntime( 8153):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
1170: E/AndroidRuntime( 8153):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
1171: E/AndroidRuntime( 8153):  at dalvik.system.NativeStart.main(Native Method)
1235: I/Process ( 8153): Sending signal. PID: 8153 SIG: 9
ReDreamport commented 10 years ago

We'll try to fix it.

thedmd commented 10 years ago

This is a crash in PaywayAdapter in getView(). Probably setImageResource() receive invalid resource ID. Are you able to reproduce?

thedmd commented 10 years ago

More debugging revealed that "payType" passed by intent is null which cause crash even sooner.

thedmd commented 10 years ago

Further digging revealed that server response has missing fields. There sould be 'paysType' included but there are none. {"message":"成功","status":200,"data":{"outOrderNumber":"100028020140509073943500000000","userMoney":0}} Right now it is not possible to make any purchase.

ReDreamport commented 10 years ago
thedmd commented 10 years ago

Yes, this is my partnerId. There are ping results:

Pinging xiaocong.tv [115.29.160.153] with 32 bytes of data:
Reply from 115.29.160.153: bytes=32 time=475ms TTL=45
Reply from 115.29.160.153: bytes=32 time=564ms TTL=45
Reply from 115.29.160.153: bytes=32 time=558ms TTL=45
Reply from 115.29.160.153: bytes=32 time=569ms TTL=45

I did tried to make a purchase and received error code 80. I believe it is one you just added.

ReDreamport commented 10 years ago

Could you show me your request JSON? I failed to reproduce your case. You could delete the signature for security.

thedmd commented 10 years ago

I will sent it to you on Monday. Today I do not have my test device with me.

thedmd commented 10 years ago

There is request data:

{
   "head":{
      "server":"Nexus 4#occam#mako#",
      "method":"payment",
      "hardware":"98:D6:F7:5E:D9:87",
      "user":1418853,
      "version":"3.3"
   },
   "body":{
      "sign":"################################",
      "amount":"1",
      "pkgName":"com.artifexmundi.clockworktales",
      "orderNo":"100028020140512072594900000000",
      "accessToken":"ae838e7f-43e5-48ff-89b5-da79adf752aa",
      "signType":"md5",
      "partnerId":"100028",
      "mark":"Some remark",
      "goodsDes":"Test consumable product."
   }
}

There are logs from entire purchase process:

7:25:00.685     XiaocongStore      Info    20812   Requesting purchase of 'com.artifexmundi.drink.xc.free.consumable'
7:25:00.725     Spark              Debug   20812   [  0:09.53]:D:0: Purchase Clicked for product id: 'com.artifexmundi.drink.xc.free.consumable'
7:25:06.711     ActivityManager    Info    2709    START u0 {cmp=com.artifexmundi.clockworktales/com.xiaocong.activity.PaymentStartActivity (has extras)} from pid 20812
7:25:06.801     XcServiceClient    Debug   20812   http://data.xiaocong.tv/gamecenter/me.json?access_token=ae838e7f-43e5-48ff-89b5-da79adf752aa&method=me
7:25:06.871     ActivityManager    Info    2709    Displayed com.artifexmundi.clockworktales/com.xiaocong.activity.PaymentStartActivity: +154ms
7:25:08.063     XcServiceClient    Debug   20812   {"userName":"11260001","serverId":1,"email":"zxl@xiaocong.tv","mobile":"","userId":1418853}
7:25:08.143     接口             Error   20812   {"head":{"server":"Nexus 4#occam#mako#","method":"payment","hardware":"98:D6:F7:5E:D9:87","user":1418853,"version":"3.3"},"body":{"sign":"################################","amount":"1","pkgName":"com.artifexmundi.clockworktales","orderNo":"100028020140512072594900000000","accessToken":"ae838e7f-43e5-48ff-89b5-da79adf752aa","signType":"md5","partnerId":"100028","mark":"Some remark","goodsDes":"Test consumable product."}}
7:25:09.294     Payment            Error   20812   {"message":"成功","status":200,"data":{"outOrderNumber":"100028020140512072594900000000","userMoney":1000}}
7:25:09.294     getGameinfomation  Error   20812   com.xiaocong.xcobject.PaymentResponse@4267e2e0
7:25:09.354     XiaocongStore      Info    20812   Purchase of com.artifexmundi.drink.xc.free.consumable failed with error: Payment failed with error: No valid payment method is available.
ReDreamport commented 10 years ago

Thanks! We had repeat your request several times. It works normally here. The bug is weird. Please give us some hours.

ReDreamport commented 10 years ago

I found the bug and fixed it. The bug is on the server side and we have upgraded them. So you could have a try now.

thedmd commented 10 years ago

I'm going to test it right now. I will keep you posted.

thedmd commented 10 years ago

OK. I managed to get to Xiaocong Payment screen. I see Allpay.com and YeePay buttons. Shouldn't there be also a way to use Xiaocong coins?

ReDreamport commented 10 years ago

The available payment ways, which are controlled by us, depend on your partnerId and app's package name. Now let me assign to you temporarily. Please remind your business man of making sure in the business contract. Thanks.

Your app's package name is com.artifexmundi.clockworktales, right?

thedmd commented 10 years ago

I consider current partnerId a test one, so it will not be used for real product. We will ask for new one in time. Yes, com.artifexmundi.clockworktales is our package name.

ReDreamport commented 10 years ago

Done. Please have a try

thedmd commented 10 years ago

I see one new button which looks odd. Please see: screen

Also I had crash, because of missing READ_PHONE_STATE permission. Beside INTERNET is there any other permission that should be requested?

thedmd commented 10 years ago

I see progress. Now I just find phone with a SIM card and I will be able to test purchase.

I think it will be worth mentioning in docs that application will have to have such permissions:

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
thedmd commented 10 years ago

Xiaocong payment accept do not accept my phone number. Is this an issue? It is in format: +48 XXX-XXX-XXX, where X are digits.

ReDreamport commented 10 years ago
thedmd commented 10 years ago

I guess Xiaocong is under PP xxx? Which is resolution issue, I will try different DPI. And...

Success! Thank you for support. Please let me know if you want to see some other data that response included bellow.

There is no need to change rules for phone number. I just thought it was Xiaocong payment method and phone number was required for verification.

I will remove READ_PHONE_STATE permission and do some more testing for corner cases.

{"message":"成功","status":200,"data":{"outOrderNumber":"100028020140512155560000000000","payType":"8,3,5,6,19","userMoney":1000}}

screen5

thedmd commented 10 years ago

There is log from complete purchase:

15:55:51.533    XiaocongStore   Info    8376    Requesting purchase of 'com.artifexmundi.drink.xc.free.consumable'
15:55:54.026    XcServiceClient Debug   8376    http://data.xiaocong.tv/gamecenter/me.json?access_token=3f2c37a5-19dd-4e81-972e-5c560debfc84&method=me
15:55:54.086    ActivityManager Info    5797    Displayed com.artifexmundi.clockworktales/com.xiaocong.activity.PaymentStartActivity: +120ms
15:55:55.047    XcServiceClient Debug   8376    {"userName":"11260001","serverId":1,"email":"zxl@xiaocong.tv","mobile":"","userId":1418853}
15:55:55.077    XcUtils         Info    8376    Server: Nexus 4#occam#mako#
15:55:55.157    接口          Error   8376    {"head":{"server":"Nexus 4#occam#mako#","method":"payment","hardware":"98:D6:F7:5E:D9:87","user":1418853,"version":"3.3"},"body":{"sign":"################################","amount":"1","pkgName":"com.artifexmundi.clockworktales","orderNo":"100028020140512155560000000000","accessToken":"3f2c37a5-19dd-4e81-972e-5c560debfc84","signType":"md5","partnerId":"100028","mark":"Some remark","goodsDes":"Test consumable product."}}
15:55:56.268    Payment         Error   8376    {"message":"成功","status":200,"data":{"outOrderNumber":"100028020140512155560000000000","payType":"8,3,5,6,19","userMoney":1000}}
15:55:56.278    getGameinfomation       Error   8376    com.xiaocong.xcobject.PaymentResponse@419b3778
15:55:56.278    ActivityManager Info    5797    START u0 {cmp=com.artifexmundi.clockworktales/com.xiaocong.activity.PayWayActivity (has extras)} from pid 8376
15:56:29.664    XcServiceClient Debug   8376    http://data.xiaocong.tv/gamecenter/me.json?access_token=3f2c37a5-19dd-4e81-972e-5c560debfc84&method=me
15:56:30.264    XcServiceClient Debug   8376    {"userName":"11260001","serverId":1,"email":"zxl@xiaocong.tv","mobile":"","userId":1418853}
15:56:30.304    接口          Error   8376    {"head":{"server":"Nexus 4#occam#mako#","method":"exchangeCentre","hardware":"98:D6:F7:5E:D9:87","user":1418853,"version":"3.3"},"body":{"type":"12001","payType":"1","outOrderNumber":"100028020140512155560000000000"}}
15:56:31.315    payByXiaocongCoins      Error   8376    {"message":"成功","status":200}
15:57:51.000    XiaocongStore   Info    8376    Purchase complete com.artifexmundi.drink.xc.free.consumable
ReDreamport commented 10 years ago

I tried to improve the codes of payment grid. I tested on your device(Nexus 4, 1280x768). It works fine now.

thedmd commented 10 years ago

I see Xiaocong coins button now and payment is working. Thank you.