微信支付bug调整
parent
ae3af80e9c
commit
c8672c15ea
|
@ -23,6 +23,7 @@ import org.springframework.stereotype.Controller;
|
|||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.FileInputStream;
|
||||
|
@ -35,7 +36,7 @@ import java.math.BigDecimal;
|
|||
* 微信支付小程序 接口
|
||||
*/
|
||||
@Api(tags = "小程序支付")
|
||||
@Controller
|
||||
@RestController
|
||||
@RequestMapping("/applet/pay")
|
||||
@Slf4j
|
||||
public class AppletPayController {
|
||||
|
@ -51,6 +52,7 @@ public class AppletPayController {
|
|||
@PostMapping("/prepay")
|
||||
public BaseResponse createPrepay(@RequestBody AppletPayVo payDto){
|
||||
// 构建service
|
||||
log.info("payDto===================>{}",payDto);
|
||||
JsapiServiceExtension service = createService();
|
||||
OrderPayInfo orderPayInfo = orderPayInfoService.createOrderPayInfo(payDto.getMoney(),payDto.getUserId(), payDto.getDescription(), payDto.getOutTradeNo(), "applet");
|
||||
|
||||
|
@ -71,7 +73,8 @@ public class AppletPayController {
|
|||
// 调用下单方法,得到应答
|
||||
PrepayWithRequestPaymentResponse response = service.prepayWithRequestPayment(request);
|
||||
// 使用微信扫描 code_url 对应的二维码,即可体验Native支付
|
||||
// log.info(response);
|
||||
log.info("response=================>{}",response);
|
||||
// return BaseResponse.success();
|
||||
return BaseResponse.success(response);
|
||||
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ import org.springframework.stereotype.Controller;
|
|||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
|
@ -34,7 +35,7 @@ import java.util.Objects;
|
|||
* 微信支付小程序 接口
|
||||
*/
|
||||
@Api(tags = "H5支付")
|
||||
@Controller
|
||||
@RestController
|
||||
@RequestMapping("/H5/pay")
|
||||
@Slf4j
|
||||
public class H5PayController {
|
||||
|
|
Loading…
Reference in New Issue