mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-01 20:04:06 +08:00
增加支付回调地址的配置
This commit is contained in:
@@ -138,3 +138,6 @@ yudao:
|
||||
- ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
|
||||
- ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
|
||||
demo: true # 开启演示模式
|
||||
pay:
|
||||
pay-notify-url: http://niubi.natapp1.cc/api/pay/order/notify
|
||||
refund-notify-url: http://niubi.natapp1.cc/api/pay/refund/notify
|
||||
|
@@ -152,3 +152,6 @@ yudao:
|
||||
- ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
|
||||
- ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
|
||||
demo: false # 关闭演示模式
|
||||
pay:
|
||||
pay-notify-url: http://niubi.natapp1.cc/api/pay/order/notify
|
||||
refund-notify-url: http://niubi.natapp1.cc/api/pay/refund/notify
|
||||
|
@@ -18,6 +18,8 @@
|
||||
let payOrderId = undefined;
|
||||
// let server = 'http://127.0.0.1:28080';
|
||||
let server = 'http://niubi.natapp1.cc';
|
||||
// TODO openid
|
||||
let openid = "ockUAwIZ-0OeMZl9ogcZ4ILrGba0";
|
||||
$(function() {
|
||||
// 获得 JsapiTicket
|
||||
// 参考 https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html 文档
|
||||
@@ -73,6 +75,8 @@
|
||||
}
|
||||
|
||||
// 提交支付
|
||||
// 参考 https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=7_7&index=6 文档
|
||||
// 参考 https://segmentfault.com/a/1190000020704650 文档
|
||||
$.ajax({
|
||||
url: server + "/api/pay/order/submit",
|
||||
method: 'POST',
|
||||
@@ -81,6 +85,9 @@
|
||||
data: JSON.stringify({
|
||||
"id": payOrderId,
|
||||
"channelCode": 'wx_pub',
|
||||
"channelExtras": {
|
||||
"openid": openid
|
||||
}
|
||||
}),
|
||||
success: function( result ) {
|
||||
if (result.code !== 0) {
|
||||
|
Reference in New Issue
Block a user