Compare commits
No commits in common. "bd00a6125e7f831563aece34ef71914795332f8d" and "ae3af80e9cd91461206df573c6f474cf9127ca00" have entirely different histories.
bd00a6125e
...
ae3af80e9c
|
@ -23,7 +23,6 @@ import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
|
@ -36,7 +35,7 @@ import java.math.BigDecimal;
|
||||||
* 微信支付小程序 接口
|
* 微信支付小程序 接口
|
||||||
*/
|
*/
|
||||||
@Api(tags = "小程序支付")
|
@Api(tags = "小程序支付")
|
||||||
@RestController
|
@Controller
|
||||||
@RequestMapping("/applet/pay")
|
@RequestMapping("/applet/pay")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class AppletPayController {
|
public class AppletPayController {
|
||||||
|
@ -52,7 +51,6 @@ public class AppletPayController {
|
||||||
@PostMapping("/prepay")
|
@PostMapping("/prepay")
|
||||||
public BaseResponse createPrepay(@RequestBody AppletPayVo payDto){
|
public BaseResponse createPrepay(@RequestBody AppletPayVo payDto){
|
||||||
// 构建service
|
// 构建service
|
||||||
log.info("payDto===================>{}",payDto);
|
|
||||||
JsapiServiceExtension service = createService();
|
JsapiServiceExtension service = createService();
|
||||||
OrderPayInfo orderPayInfo = orderPayInfoService.createOrderPayInfo(payDto.getMoney(),payDto.getUserId(), payDto.getDescription(), payDto.getOutTradeNo(), "applet");
|
OrderPayInfo orderPayInfo = orderPayInfoService.createOrderPayInfo(payDto.getMoney(),payDto.getUserId(), payDto.getDescription(), payDto.getOutTradeNo(), "applet");
|
||||||
|
|
||||||
|
@ -73,8 +71,7 @@ public class AppletPayController {
|
||||||
// 调用下单方法,得到应答
|
// 调用下单方法,得到应答
|
||||||
PrepayWithRequestPaymentResponse response = service.prepayWithRequestPayment(request);
|
PrepayWithRequestPaymentResponse response = service.prepayWithRequestPayment(request);
|
||||||
// 使用微信扫描 code_url 对应的二维码,即可体验Native支付
|
// 使用微信扫描 code_url 对应的二维码,即可体验Native支付
|
||||||
log.info("response=================>{}",response);
|
// log.info(response);
|
||||||
// return BaseResponse.success();
|
|
||||||
return BaseResponse.success(response);
|
return BaseResponse.success(response);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,6 @@ import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -35,7 +34,7 @@ import java.util.Objects;
|
||||||
* 微信支付小程序 接口
|
* 微信支付小程序 接口
|
||||||
*/
|
*/
|
||||||
@Api(tags = "H5支付")
|
@Api(tags = "H5支付")
|
||||||
@RestController
|
@Controller
|
||||||
@RequestMapping("/H5/pay")
|
@RequestMapping("/H5/pay")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class H5PayController {
|
public class H5PayController {
|
||||||
|
|
|
@ -70,8 +70,8 @@ wechatpay:
|
||||||
mchId: 1650477646
|
mchId: 1650477646
|
||||||
apiV3Key: JingWuLianJiaKao20120813ZhouHong
|
apiV3Key: JingWuLianJiaKao20120813ZhouHong
|
||||||
mchSerialNo: 52974C99DFCC518EA2E5AD20C3753E38B924868D
|
mchSerialNo: 52974C99DFCC518EA2E5AD20C3753E38B924868D
|
||||||
# 路径设置没生效 不知道原因
|
# privateKeyPath: classpath*:/wechatPay/apiclient_key.pem
|
||||||
privateKeyPath: classpath*:/wechatPay/apiclient_key.pem
|
privateKeyPath: apiclient_key.pem
|
||||||
payNoticeUrl: https://jwl.ahduima.com/driver-api/payNoticeLog
|
payNoticeUrl: https://jwl.ahduima.com/driver-api/payNoticeLog
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue