Closed thedmd closed 10 years ago
We'll try to fix it.
This is a crash in PaywayAdapter in getView(). Probably setImageResource() receive invalid resource ID. Are you able to reproduce?
More debugging revealed that "payType" passed by intent is null which cause crash even sooner.
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.
ping xiaocong.tv
for several times and tell us the IPs?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.
Could you show me your request JSON? I failed to reproduce your case. You could delete the signature for security.
I will sent it to you on Monday. Today I do not have my test device with me.
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.
Thanks! We had repeat your request several times. It works normally here. The bug is weird. Please give us some hours.
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.
I'm going to test it right now. I will keep you posted.
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?
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?
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.
Done. Please have a try
I see one new button which looks odd. Please see:
Also I had crash, because of missing READ_PHONE_STATE permission. Beside INTERNET is there any other permission that should be requested?
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"/>
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.
userMoney
greater than zero?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}}
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
I tried to improve the codes of payment grid. I tested on your device(Nexus 4, 1280x768). It works fine now.
I see Xiaocong coins button now and payment is working. Thank you.
After successful payment (according to logs) xcsdk-smart-demo crashed before reaching onActivityResult() which suggest crash occurred somewhere in xcsdk-smart-lib.