linhw 2024-05-10 13:40:37 +08:00
parent 829046e131
commit 5658957ecf
1 changed files with 6 additions and 1 deletions

View File

@ -475,7 +475,12 @@ public class PayController extends BaseController
@PostMapping("/aliPay")
@ApiOperation(value = "支付宝支付", notes = "支付宝支付", httpMethod = "POST")
public String aliPay(@RequestBody AppOrderArg appOrderArg) {
public String aliPay(@RequestBody AppOrderArg appOrderArg,HttpServletResponse response) {
// 需要指定response的ContentType为流式输出且字符编码为UTF-8
response.setContentType("application/x-www-form-urlencoded");
response.setCharacterEncoding("UTF-8");
// 禁用缓存
response.setHeader("Cache-Control", "no-cache");
String orderNo = KeyUtil.generateUniqueKey();
AlipayTradeCreateResponse result = null;
try {