|
|
@@ -1,5 +1,6 @@
|
|
|
package org.dromara.backstage.wx.contorller;
|
|
|
|
|
|
+import cn.hutool.core.codec.Base64;
|
|
|
import jakarta.servlet.http.HttpServletRequest;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.dromara.backstage.business.payments.ThirdPayBusiness;
|
|
|
@@ -88,13 +89,14 @@ public class WxController extends BaseController {
|
|
|
return wxService.getIdCode(userId);
|
|
|
}
|
|
|
|
|
|
- @GetMapping("/pay")
|
|
|
+ @PostMapping("/pay")
|
|
|
public R<String> wxPay(HttpServletRequest request, @RequestParam String ssoId, @RequestParam String transValue) {
|
|
|
String userAgent = request.getHeader("user-agent");
|
|
|
String userId = LoginHelper.getUserId().toString();
|
|
|
+ String openId = Base64.decodeStr(ssoId);
|
|
|
Map<String, String> mapParams = new HashMap<>();
|
|
|
mapParams.put("userId", userId);
|
|
|
- mapParams.put("ssoId", ssoId);
|
|
|
+ mapParams.put("ssoId", openId);
|
|
|
mapParams.put("dealValue", transValue);
|
|
|
mapParams.put("userAgent", userAgent);
|
|
|
return thirdPayBusiness.createDirectPayment(mapParams);
|