微信支付测试问题

来源:10-27 统一测试订单与支付接口 十

kkx1988

2018-02-26

http://img.mukewang.com/szimg/5a94272e0001925313180399.jpg

微信支付测试遇到了这样的报错信息,不懂是哪里出了问题,请大神帮忙解答~~

报错信息:

appservice:1083 POST http://z.cn/api/v1/pay/pre_order? 500 (Internal Server Error)

p @ appservice:1083

createRequestTask @ appservice:1083

a.exports @ appservice:1083

r @ WAService.js:3

c @ WAService.js:4

o @ WAService.js:8

e @ WAService.js:8

(anonymous) @ WAService.js:8

(anonymous) @ WAService.js:4

getPreOrder @ index.js? [sm]:123

(anonymous) @ WAService.js:15

success @ index.js? [sm]:112

(anonymous) @ WAService.js:3

(anonymous) @ WAService.js:8

s.emit @ WAService.js:4

(anonymous) @ WAService.js:8

(anonymous) @ WAService.js:4

d @ appservice:1083

(anonymous) @ appservice:1083

b.emit @ appservice:1083

callback @ appservice:1083

setTimeout @ appservice:1083

(anonymous) @ WAService.js:3

setTimeout (async)

setTimeout @ WAService.js:7

h @ appservice:1083

c @ appservice:1083

s.onreadystatechange @ appservice:1083

XMLHttpRequest.send (async)

p @ appservice:1083

createRequestTask @ appservice:1083

a.exports @ appservice:1083

r @ WAService.js:3

c @ WAService.js:4

o @ WAService.js:8

e @ WAService.js:8

(anonymous) @ WAService.js:8

(anonymous) @ WAService.js:4

pay @ index.js? [sm]:90

(anonymous) @ WAService.js:15

a @ WAService.js:14

G @ WAService.js:14

(anonymous) @ WAService.js:14

(anonymous) @ WAService.js:14

(anonymous) @ WAService.js:6

e.(anonymous function) @ WAService.js:3

d @ appservice:1083

g.registerCallback @ appservice:1083

k.forEach @ appservice:1083

d @ appservice:1083

h.onmessage @ appservice:1083

WAService.js:3 thirdScriptError

Cannot read property 'toString' of undefined;at pages/index/index getPreOrder function;at api request success callback function

TypeError: Cannot read property 'toString' of undefined

    at Function.success (http://127.0.0.1:9973/appservice/pages/index/index.js:131:41)

    at Object.success (http://127.0.0.1:9973/appservice/__dev__/WAService.js:3:11024)

    at s.<anonymous> (http://127.0.0.1:9973/appservice/__dev__/WAService.js:8:23191)

    at s.emit (http://127.0.0.1:9973/appservice/__dev__/WAService.js:4:20086)

    at Function.<anonymous> (http://127.0.0.1:9973/appservice/__dev__/WAService.js:8:24539)

    at http://127.0.0.1:9973/appservice/__dev__/WAService.js:4:4162

    at d (http://127.0.0.1:9973/appservice/appservice:1083:7042)

    at b.<anonymous> (http://127.0.0.1:9973/appservice/appservice:1083:7122)

    at b.emit (http://127.0.0.1:9973/appservice/appservice:1083:19498)

    at callback (http://127.0.0.1:9973/appservice/appservice:1083:12958)

errorReport @ WAService.js:3

thirdErrorReport @ WAService.js:3

(anonymous) @ WAService.js:3

(anonymous) @ WAService.js:8

s.emit @ WAService.js:4

(anonymous) @ WAService.js:8

(anonymous) @ WAService.js:4

d @ appservice:1083

(anonymous) @ appservice:1083

b.emit @ appservice:1083

callback @ appservice:1083

setTimeout @ appservice:1083

(anonymous) @ WAService.js:3

setTimeout (async)

setTimeout @ WAService.js:7

h @ appservice:1083

c @ appservice:1083

s.onreadystatechange @ appservice:1083

XMLHttpRequest.send (async)

p @ appservice:1083

createRequestTask @ appservice:1083

a.exports @ appservice:1083

r @ WAService.js:3

c @ WAService.js:4

o @ WAService.js:8

e @ WAService.js:8

(anonymous) @ WAService.js:8

(anonymous) @ WAService.js:4

getPreOrder @ index.js? [sm]:123

(anonymous) @ WAService.js:15

success @ index.js? [sm]:112

(anonymous) @ WAService.js:3

(anonymous) @ WAService.js:8

s.emit @ WAService.js:4

(anonymous) @ WAService.js:8

(anonymous) @ WAService.js:4

d @ appservice:1083

(anonymous) @ appservice:1083

b.emit @ appservice:1083

callback @ appservice:1083

setTimeout @ appservice:1083

(anonymous) @ WAService.js:3

setTimeout (async)

setTimeout @ WAService.js:7

h @ appservice:1083

c @ appservice:1083

s.onreadystatechange @ appservice:1083

XMLHttpRequest.send (async)

p @ appservice:1083

createRequestTask @ appservice:1083

a.exports @ appservice:1083

r @ WAService.js:3

c @ WAService.js:4

o @ WAService.js:8

e @ WAService.js:8

(anonymous) @ WAService.js:8

(anonymous) @ WAService.js:4

pay @ index.js? [sm]:90

(anonymous) @ WAService.js:15

a @ WAService.js:14

G @ WAService.js:14

(anonymous) @ WAService.js:14

(anonymous) @ WAService.js:14

(anonymous) @ WAService.js:6

e.(anonymous function) @ WAService.js:3

d @ appservice:1083

g.registerCallback @ appservice:1083

k.forEach @ appservice:1083

d @ appservice:1083

h.onmessage @ appservice:1083


写回答

1回答

7七月

2018-02-27

你这个错误出在服务器,你贴的是小程序的错误消息。首先看看服务器的错误信息是什么,贴一下。

0
2
7七月
回复
kkx1988
第二个就是代码写的有问题了。。。你在undefined上面读取tostring肯定是会报错的。那么问题就是为什么会出现undefined。调试下就能知道问题了。
2018-03-20
共2条回复

微信小程序电商实战 从前端到后端的全流程精讲

全栈工程师/前后端都讲/架构思想/ RESTFul API、MySQL表设计

4805 学习 · 4382 问题

查看课程