Browse Source

mall + pay:
1、测试通过微信小程序支付

YunaiV 1 year ago
parent
commit
e615be971e

+ 14 - 0
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/AppPayOrderController.http

@@ -36,3 +36,17 @@ tenant-id: {{appTenentId}}
     "openid": "ockUAwIZ-0OeMZl9ogcZ4ILrGba0"
   }
 }
+
+### /pay/create 提交支付订单【wx_lite】
+POST {{appApi}}/pay/order/submit
+Content-Type: application/json
+Authorization: Bearer {{appToken}}
+tenant-id: {{appTenentId}}
+
+{
+  "id": 202,
+  "channelCode": "wx_lite",
+  "channelExtras": {
+    "openid": "oLefc4g5GjKWHJjLjMSXB3wX0fD0"
+  }
+}

+ 2 - 2
yudao-server/src/main/resources/application-local.yaml

@@ -173,8 +173,8 @@ wx:
       key-prefix: wx # Redis Key 的前缀 TODO 芋艿:解决下 Redis key 管理的配置
       http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
   miniapp: # 小程序配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-miniapp-spring-boot-starter/README.md 文档
-    appid: wx63c280fe3248a3e7
-    secret: 6f270509224a7ae1296bbf1c8cb97aed
+    appid: wx62056c0d5e8db250
+    secret: 333ae72f41552af1e998fe1f54e1584a
     config-storage:
       type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
       key-prefix: wa # Redis Key 的前缀 TODO 芋艿:解决下 Redis key 管理的配置