parent
c038c77784
commit
864830e1be
@ -0,0 +1,25 @@ |
||||
package com.hai.service.pay.impl; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.hai.config.QianZhuConfig; |
||||
import com.hai.service.pay.PayService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.Map; |
||||
|
||||
@Service("cinemaOrderService") |
||||
public class CinemaOrderService implements PayService { |
||||
@Override |
||||
public void paySuccess(Map<String, String> map, String payType) throws Exception { |
||||
if (payType.equals("Alipay")) { |
||||
return; |
||||
} |
||||
if (payType.equals("WechatPay")) { |
||||
JSONObject orderDetail = QianZhuConfig.getCinemaOrderByOrderNo(map.get("out_trade_no")); |
||||
if (orderDetail != null && orderDetail.getBoolean("success") == true) { |
||||
JSONObject data = orderDetail.getJSONObject("data"); |
||||
QianZhuConfig.payMovieOrder(data.getString("orderNo")); |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,27 @@ |
||||
package com.hai.service.pay.impl; |
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.hai.config.QianZhuConfig; |
||||
import com.hai.service.pay.PayService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.Map; |
||||
|
||||
@Service("kfcOrderService") |
||||
public class KfcOrderService implements PayService { |
||||
|
||||
@Override |
||||
public void paySuccess(Map<String, String> map, String payType) throws Exception { |
||||
if (payType.equals("Alipay")) { |
||||
return; |
||||
} |
||||
if (payType.equals("WechatPay")) { |
||||
JSONObject orderDetail = QianZhuConfig.getKfcOrderByOrderNo(map.get("out_trade_no")); |
||||
if (orderDetail != null && orderDetail.getBoolean("success") == true) { |
||||
JSONObject data = orderDetail.getJSONObject("data"); |
||||
QianZhuConfig.payKfcOrder(data.getString("orderNo")); |
||||
} |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue