use of com.whoiszxl.entity.response.RechargeResponse in project shopzz by whoiszxl.
the class PayInfoDcBuilder method buildAddress.
/**
* 构建地址信息
* @return
*/
public PayInfoDcBuilder buildAddress(Order order) {
CreateAddressFeignClient createAddressFeignClient = createDcAddressFactory.get(dcName);
ResponseResult<RechargeResponse> rechargeResponseResult = createAddressFeignClient.giveAddress(order.getId().toString(), order.getTotalAmount().toPlainString());
if (!rechargeResponseResult.isOk()) {
ExceptionCatcher.catchValidateEx(ResponseResult.buildError("支付创建失败"));
}
RechargeResponse rechargeResponse = rechargeResponseResult.getData();
this.dcPayInfo.setCurrencyName(dcName);
this.dcPayInfo.setCurrencyId(rechargeResponse.getCurrencyId());
this.dcPayInfo.setToAddress(rechargeResponse.getAddress());
this.dcPayInfo.setQrcodeData(rechargeResponse.getQrCodeData());
return this;
}
Aggregations