小程序支付出错,各位请帮忙下
错误提示:
GET https://jinxiang.gxchangxin.com/wxpay/example/jsapi.php?code=071hGzvg2jIBaC0bxMwg26MLvg2hGzv2 500 (Internal Server Error)
页面请求:
var app = getApp()
Page({
wxpay:function(){
var code=app.code;
wx.request({
url: 'https://jinxiang.gxchangxin.com/wxpay/example/jsapi.php', //仅为示例,并非真实的接口地址
data: {
code: code
},
header: {
'content-type': 'application/json' // 默认值
},
success: function (res) {
console.log(res.data)
}
})
}
})