|
|
@@ -70,6 +70,10 @@ public class OrderInvoiceService {
|
|
|
@Value("${ezpay.base-url}")
|
|
|
private String ezpayBaseUrl;
|
|
|
|
|
|
+ /** 手机条码联网校验开关:测试环境 false 跳过(ezPay 测试网关无真实条码数据,会误判为不存在),正式环境 true 开启 */
|
|
|
+ @Value("${ezpay.barcode-check:true}")
|
|
|
+ private boolean barcodeCheckEnabled;
|
|
|
+
|
|
|
/** 发票状态:0未开/1已开/2失败/3作废 */
|
|
|
private static final int STATUS_NOT_ISSUED = 0;
|
|
|
private static final int STATUS_ISSUED = 1;
|
|
|
@@ -589,14 +593,16 @@ public class OrderInvoiceService {
|
|
|
if (barCfg == null) {
|
|
|
throw new ServiceException(MessageUtils.message("no.invoice.store.notsupport.barcode"));
|
|
|
}
|
|
|
- boolean barExist;
|
|
|
- try {
|
|
|
- barExist = ezPay.checkBarCode(ezpayBaseUrl, barCfg, carrierNum);
|
|
|
- } catch (Exception e) {
|
|
|
- throw new ServiceException(MessageUtils.message("no.invoice.barcode.service.unavailable"));
|
|
|
- }
|
|
|
- if (!barExist) {
|
|
|
- throw new ServiceException(MessageUtils.message("no.invoice.barcode.notexist"));
|
|
|
+ if (barcodeCheckEnabled) {
|
|
|
+ boolean barExist;
|
|
|
+ try {
|
|
|
+ barExist = ezPay.checkBarCode(ezpayBaseUrl, barCfg, carrierNum);
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new ServiceException(MessageUtils.message("no.invoice.barcode.service.unavailable"));
|
|
|
+ }
|
|
|
+ if (!barExist) {
|
|
|
+ throw new ServiceException(MessageUtils.message("no.invoice.barcode.notexist"));
|
|
|
+ }
|
|
|
}
|
|
|
break;
|
|
|
case "CITIZEN":
|