支付申请方法入参改成JSON
This commit is contained in:
parent
313e72d5b8
commit
1c9963aab8
|
@ -1,5 +1,6 @@
|
|||
package com.hzya.frame.cbs8.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.cbs8.dto.req.*;
|
||||
import com.hzya.frame.cbs8.dto.res.*;
|
||||
import com.hzya.frame.cbs8.entity.PaymentEntity;
|
||||
|
@ -15,9 +16,9 @@ public interface ICbs8Service {
|
|||
|
||||
/**
|
||||
* 支付申请
|
||||
* @param paymentEntity
|
||||
* @param payJsonStr
|
||||
*/
|
||||
PayResponseDTO payApply(PaymentEntity paymentEntity);
|
||||
PayResponseDTO payApply(String payJsonStr);
|
||||
|
||||
/**
|
||||
* 通过业务参考号查询交易结果 3.2.6
|
||||
|
|
|
@ -36,14 +36,14 @@ public class Cbs8ServiceImpl implements ICbs8Service {
|
|||
@Value("${zt.url}")
|
||||
private String zt_url;
|
||||
@Override
|
||||
public PayResponseDTO payApply(PaymentEntity paymentEntity) {
|
||||
public PayResponseDTO payApply(String payJsonStr) {
|
||||
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
|
||||
.put("apiCode", "8000260001")
|
||||
.put("publicKey","ZJYA1vBeY1ai53iNmbAEsw6DImjkXGBkdMailxcBdliFC85Ce7eDIk+3zDUT+v578prj")
|
||||
.put("secretKey","7Gp6OjHrIaQ6R3tXGPrI4morjQyWL+qu4JJschQnkBRtv26VDgGFVYKOy5kMZfd/j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
|
||||
.put("appId","800026")
|
||||
.build();
|
||||
String body = HttpRequest.post(zt_url).addHeaders(headerMap).body(JSONObject.toJSONString(paymentEntity)).timeout(60000).execute().body();
|
||||
String body = HttpRequest.post(zt_url).addHeaders(headerMap).body(payJsonStr).timeout(60000).execute().body();
|
||||
//解密响应报文
|
||||
String result = decryptResBody(body);
|
||||
if (StrUtil.isNotEmpty(result)){
|
||||
|
|
Loading…
Reference in New Issue