| @@ -12,6 +12,7 @@ import com.iformall.douyin.pay.orderQuery.OrderQueryResult; | |||||
| import com.iformall.douyin.payv2.result.TtPayOrderQueryV2Result; | import com.iformall.douyin.payv2.result.TtPayOrderQueryV2Result; | ||||
| import com.iformall.enums.EnumPayStatus; | import com.iformall.enums.EnumPayStatus; | ||||
| import com.iformall.exception.MallinkException; | import com.iformall.exception.MallinkException; | ||||
| import com.iformall.service.order.entity.WxComposeOrder; | |||||
| import com.iformall.service.pay.service.pay.entity.PayAdapterResult; | import com.iformall.service.pay.service.pay.entity.PayAdapterResult; | ||||
| import com.iformall.service.pay.service.pay.entity.PayQueryAdapterResult; | import com.iformall.service.pay.service.pay.entity.PayQueryAdapterResult; | ||||
| import com.iformall.utils.MaUtil; | import com.iformall.utils.MaUtil; | ||||
| @@ -33,12 +34,13 @@ public class BaseTtPayAdapterService { | |||||
| /** | /** | ||||
| * 做为支付的扩展数据 | * 做为支付的扩展数据 | ||||
| * @param payOrder | |||||
| * @param | |||||
| * @return | * @return | ||||
| */ | */ | ||||
| protected String getCpExtra(WxPayOrder payOrder) { | |||||
| Map<String,String> map = new HashMap<>(); | |||||
| map.put("tenantId",payOrder.getTenantId()); | |||||
| protected String getCallbackData(WxPayOrder record) { | |||||
| Map<String,Object> map = new HashMap<>(); | |||||
| map.put("composeOrderId",record.getOrderId()); | |||||
| map.put("tenantId",record.getTenantId()); | |||||
| return JSON.toJSONString(map); | return JSON.toJSONString(map); | ||||
| } | } | ||||
| @@ -138,7 +138,7 @@ public class TtMiniAppPayAdapterService extends BaseTtPayAdapterService implemen | |||||
| pageEntry.setParams(JSON.toJSONString(paramMap)); | pageEntry.setParams(JSON.toJSONString(paramMap)); | ||||
| request.setOrderEntrySchema(pageEntry); | request.setOrderEntrySchema(pageEntry); | ||||
| request.setCpExtra(getCpExtra(record)); | |||||
| request.setCpExtra(getCallbackData(record)); | |||||
| TtPayUnifiedOrderV2Result orderV2 = ttPayService.createOrderV2(request); | TtPayUnifiedOrderV2Result orderV2 = ttPayService.createOrderV2(request); | ||||
| @@ -454,7 +454,7 @@ public class TtMiniAppPayAdapterService extends BaseTtPayAdapterService implemen | |||||
| map.put("outOrderNo",record.getOrderId()); | map.put("outOrderNo",record.getOrderId()); | ||||
| map.put("createPay",record.isCreatPay()); | map.put("createPay",record.isCreatPay()); | ||||
| if(record.isCreatPay()){ | if(record.isCreatPay()){ | ||||
| map.put("callbackData",JSONObject.parseObject(getCpExtra(record),Map.class)); | |||||
| map.put("callbackData",JSONObject.parseObject(getCallbackData(record),Map.class)); | |||||
| Map<String,Integer> payment = new HashMap(); | Map<String,Integer> payment = new HashMap(); | ||||
| payment.put("totalAmount",composeOrder.getPayment()); | payment.put("totalAmount",composeOrder.getPayment()); | ||||
| map.put("payment",payment); | map.put("payment",payment); | ||||