小程序支付

This commit is contained in:
cun-nan 2023-12-23 09:19:34 +08:00
parent 5cc1c5bb3f
commit 8ab6707977

View File

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.api.fuyou.entity.MerchantConfig; import com.fuint.api.fuyou.entity.MerchantConfig;
import com.fuint.api.fuyou.entity.ReceiveParameter;
import com.fuint.api.fuyou.service.FyPayService; import com.fuint.api.fuyou.service.FyPayService;
import com.fuint.api.fuyou.service.MerchantConfigService; import com.fuint.api.fuyou.service.MerchantConfigService;
import com.fuint.business.commission.entity.CommissionRecord; import com.fuint.business.commission.entity.CommissionRecord;
@ -126,9 +127,18 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
map.put("privateKey",merchantConfig.getPrivateKey()); map.put("privateKey",merchantConfig.getPrivateKey());
map.put("type","CVR"); map.put("type","CVR");
map.put("orderId",cardValueRecordDTO.getId().toString()); map.put("orderId",cardValueRecordDTO.getId().toString());
// 处理支付需要的数据
ReceiveParameter receiveParameter = new ReceiveParameter();
receiveParameter.setOrderNo(orderNo);
receiveParameter.setType("储值卡订单");
receiveParameter.setContent("储值卡订单");
receiveParameter.setGoodsMoney(1.0);
receiveParameter.setStoreId(0);
receiveParameter.setPayType("WECHAT");
receiveParameter.setUserId(101);
// 调用支付接口 // 调用支付接口
try { try {
fyPayService.applet(map); fyPayService.applet(receiveParameter);
pay = true; pay = true;
} catch (Exception e){ } catch (Exception e){
e.printStackTrace(); e.printStackTrace();