拉卡拉支付增加接口
This commit is contained in:
parent
8b2d9bc383
commit
dbef829b38
@ -17,6 +17,7 @@ import com.lkl.laop.sdk.exception.SDKException;
|
|||||||
import com.lkl.laop.sdk.request.V3LabsTransPreorderRequest;
|
import com.lkl.laop.sdk.request.V3LabsTransPreorderRequest;
|
||||||
import com.lkl.laop.sdk.request.model.V3LabsTradeLocationInfo;
|
import com.lkl.laop.sdk.request.model.V3LabsTradeLocationInfo;
|
||||||
import com.lkl.laop.sdk.request.model.V3LabsTradePreorderWechatBus;
|
import com.lkl.laop.sdk.request.model.V3LabsTradePreorderWechatBus;
|
||||||
|
import com.suisung.mall.common.exception.ApiException;
|
||||||
import com.suisung.mall.pay.service.LakalaService;
|
import com.suisung.mall.pay.service.LakalaService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@ -76,6 +77,12 @@ public class LakalaServiceImpl implements LakalaService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 读取证书文件内容
|
||||||
|
*
|
||||||
|
* @param fileName
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
private String getResourceFile(String fileName) {
|
private String getResourceFile(String fileName) {
|
||||||
StringBuilder stringBuilder = new StringBuilder();
|
StringBuilder stringBuilder = new StringBuilder();
|
||||||
try (InputStream inputStream = new ClassPathResource(fileName).getInputStream();
|
try (InputStream inputStream = new ClassPathResource(fileName).getInputStream();
|
||||||
@ -85,13 +92,14 @@ public class LakalaServiceImpl implements LakalaService {
|
|||||||
while ((line = bufferedReader.readLine()) != null) {
|
while ((line = bufferedReader.readLine()) != null) {
|
||||||
stringBuilder.append(line).append("\n");
|
stringBuilder.append(line).append("\n");
|
||||||
}
|
}
|
||||||
|
String content = stringBuilder.toString();
|
||||||
|
// log.info("证书内容:{}", content);
|
||||||
|
return content;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
// 记录异常信息
|
// 记录异常信息
|
||||||
log.error(e.getMessage());
|
log.error(e.getMessage());
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
String content = stringBuilder.toString();
|
|
||||||
log.info("证书内容:{}", content);
|
|
||||||
return content;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -146,7 +154,7 @@ public class LakalaServiceImpl implements LakalaService {
|
|||||||
return JSONUtil.parseObj(responseStr);
|
return JSONUtil.parseObj(responseStr);
|
||||||
} catch (SDKException e) {
|
} catch (SDKException e) {
|
||||||
log.error("transPreOrder error", e);
|
log.error("transPreOrder error", e);
|
||||||
throw new RuntimeException(e);
|
throw new ApiException("支付失败:",e);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -120,10 +120,10 @@ lakala:
|
|||||||
#商户证书序列号
|
#商户证书序列号
|
||||||
serial_no: 00dfba8194c41b84cf
|
serial_no: 00dfba8194c41b84cf
|
||||||
#商户证书
|
#商户证书
|
||||||
api_cert_path: mall-pay/src/main/resources/payKey/lakala/dev/OP00000003_cert.cer
|
api_cert_path: payKey/lakala/dev/OP00000003_cert.cer
|
||||||
#商户私钥
|
#商户私钥
|
||||||
api_pri_key_path: mall-pay/src/main/resources/payKey/lakala/dev/OP00000003_private_key.pem
|
api_pri_key_path: payKey/lakala/dev/OP00000003_private_key.pem
|
||||||
#拉卡拉平台证书
|
#拉卡拉平台证书
|
||||||
lkl_platform_cer_path: mall-pay/src/main/resources/payKey/lakala/dev/lkl_notify_cert_v2.cer
|
lkl_platform_cer_path: payKey/lakala/dev/lkl_notify_cert_v2.cer
|
||||||
#终端号
|
#终端号
|
||||||
term_no: D9296400
|
term_no: D9296400
|
||||||
@ -111,19 +111,19 @@ logstash:
|
|||||||
host: @logstash.host@
|
host: @logstash.host@
|
||||||
#拉卡拉支付和分账
|
#拉卡拉支付和分账
|
||||||
lakala:
|
lakala:
|
||||||
# 服务地址
|
#服务地址
|
||||||
server_url: https://s2.lakala.com
|
server_url: https://test.wsmsd.cn/sit
|
||||||
#应用Id
|
#应用Id
|
||||||
app_id: OP10000439
|
app_id: OP00000003
|
||||||
#商户号
|
#商户号
|
||||||
merchant_no: 8226330599900LN
|
merchant_no: 82229007392000A
|
||||||
#商户证书序列号
|
#商户证书序列号
|
||||||
serial_no: 1737359895636
|
serial_no: 00dfba8194c41b84cf
|
||||||
#商户证书
|
#商户证书
|
||||||
api_cert_path: payKey/lakala/prod/api_cert.cer
|
api_cert_path: payKey/lakala/dev/OP00000003_cert.cer
|
||||||
#商户私钥
|
#商户私钥
|
||||||
api_pri_key_path: payKey/lakala/prod/api_private_key.pem
|
api_pri_key_path: payKey/lakala/dev/OP00000003_private_key.pem
|
||||||
#拉卡拉平台证书
|
#拉卡拉平台证书
|
||||||
lkl_platform_cer_path: payKey/lakala/prod/lkl_platform.cer
|
lkl_platform_cer_path: payKey/lakala/dev/lkl_notify_cert_v2.cer
|
||||||
#终端号码,M0780629(B2B收银台) M0780798(专业化扫码)
|
#终端号
|
||||||
term_no: M0780798
|
term_no: D9296400
|
||||||
@ -120,10 +120,10 @@ lakala:
|
|||||||
#商户证书序列号
|
#商户证书序列号
|
||||||
serial_no: 00dfba8194c41b84cf
|
serial_no: 00dfba8194c41b84cf
|
||||||
#商户证书
|
#商户证书
|
||||||
api_cert_path: mall-pay/src/main/resources/payKey/lakala/dev/OP00000003_cert.cer
|
api_cert_path: payKey/lakala/dev/OP00000003_cert.cer
|
||||||
#商户私钥
|
#商户私钥
|
||||||
api_pri_key_path: mall-pay/src/main/resources/payKey/lakala/dev/OP00000003_private_key.pem
|
api_pri_key_path: payKey/lakala/dev/OP00000003_private_key.pem
|
||||||
#拉卡拉平台证书
|
#拉卡拉平台证书
|
||||||
lkl_platform_cer_path: mall-pay/src/main/resources/payKey/lakala/dev/lkl_notify_cert_v2.cer
|
lkl_platform_cer_path: payKey/lakala/dev/lkl_notify_cert_v2.cer
|
||||||
#终端号
|
#终端号
|
||||||
term_no: D9296400
|
term_no: D9296400
|
||||||
@ -120,10 +120,10 @@ lakala:
|
|||||||
#商户证书序列号
|
#商户证书序列号
|
||||||
serial_no: 00dfba8194c41b84cf
|
serial_no: 00dfba8194c41b84cf
|
||||||
#商户证书
|
#商户证书
|
||||||
api_cert_path: mall-pay/src/main/resources/payKey/lakala/dev/OP00000003_cert.cer
|
api_cert_path: payKey/lakala/dev/OP00000003_cert.cer
|
||||||
#商户私钥
|
#商户私钥
|
||||||
api_pri_key_path: mall-pay/src/main/resources/payKey/lakala/dev/OP00000003_private_key.pem
|
api_pri_key_path: payKey/lakala/dev/OP00000003_private_key.pem
|
||||||
#拉卡拉平台证书
|
#拉卡拉平台证书
|
||||||
lkl_platform_cer_path: mall-pay/src/main/resources/payKey/lakala/dev/lkl_notify_cert_v2.cer
|
lkl_platform_cer_path: payKey/lakala/dev/lkl_notify_cert_v2.cer
|
||||||
#终端号
|
#终端号
|
||||||
term_no: D9296400
|
term_no: D9296400
|
||||||
Loading…
Reference in New Issue
Block a user