-
-
Notifications
You must be signed in to change notification settings - Fork 9k
Closed
Description
目前代码中使用的都是真实的url,微信支付本身支持设置仿真测试环境,
图1为微信支付仿真测试系统(后简称仿真系统)的简化原理图。仿真系统的API协议与正式API完全相同(API接口文档)。商户开发者只需将正式API的调用URL增加一层sandboxnew路径,即可对接到仿真系统。
例如,刷卡支付URL:https://api.mch.weixin.qq.com/pay/micropay
变更为:https://api.mch.weixin.qq.com/sandboxnew/pay/micropay。
https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=23_1
public class WxMpPayServiceImpl implements WxMpPayService {
private static final String PAY_BASE_URL = "https://api.mch.weixin.qq.com";
private static final String[] TRADE_TYPES = new String[]{"JSAPI", "NATIVE", "APP"};
private static final String[] REFUND_ACCOUNT = new String[]{"REFUND_SOURCE_RECHARGE_FUNDS", "REFUND_SOURCE_UNSETTLED_FUNDS"};
private final Logger log = LoggerFactory.getLogger(this.getClass());
private WxMpService wxMpService;
这个地方写死了,提供一个对外的set方法?还是可以在配置文件中设置。
Metadata
Metadata
Assignees
Labels
No labels