Commit e47b47ab authored by dingzhiwei's avatar dingzhiwei
Browse files

重新优化计全付支付接口

parent 29a249b5
...@@ -13,16 +13,16 @@ ...@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.jeequan.jeepay.pay.channel.jeepluspay.payway; package com.jeequan.jeepay.pay.channel.plspay.payway;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.jeequan.jeepay.core.constants.CS; import com.jeequan.jeepay.core.constants.CS;
import com.jeequan.jeepay.core.entity.PayOrder; import com.jeequan.jeepay.core.entity.PayOrder;
import com.jeequan.jeepay.core.model.params.jeepluspay.JeepluspayConfig; import com.jeequan.jeepay.core.model.params.plspay.PlspayConfig;
import com.jeequan.jeepay.exception.JeepayException; import com.jeequan.jeepay.exception.JeepayException;
import com.jeequan.jeepay.model.PayOrderCreateReqModel; import com.jeequan.jeepay.model.PayOrderCreateReqModel;
import com.jeequan.jeepay.pay.channel.jeepluspay.JeepluspayKit; import com.jeequan.jeepay.pay.channel.plspay.PlspayKit;
import com.jeequan.jeepay.pay.channel.jeepluspay.JeepluspayPaymentService; import com.jeequan.jeepay.pay.channel.plspay.PlspayPaymentService;
import com.jeequan.jeepay.pay.model.MchAppConfigContext; import com.jeequan.jeepay.pay.model.MchAppConfigContext;
import com.jeequan.jeepay.pay.rqrs.AbstractRS; import com.jeequan.jeepay.pay.rqrs.AbstractRS;
import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg;
...@@ -39,8 +39,8 @@ import org.springframework.stereotype.Service; ...@@ -39,8 +39,8 @@ import org.springframework.stereotype.Service;
* @site https://www.jeequan.com * @site https://www.jeequan.com
* @date 2022/8/17 15:50 * @date 2022/8/17 15:50
*/ */
@Service("jeepluspayPaymentByWxAppService") //Service Name需保持全局唯一性 @Service("plspayPaymentByWxAppService") //Service Name需保持全局唯一性
public class WxApp extends JeepluspayPaymentService { public class WxApp extends PlspayPaymentService {
@Override @Override
public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) {
...@@ -58,7 +58,7 @@ public class WxApp extends JeepluspayPaymentService { ...@@ -58,7 +58,7 @@ public class WxApp extends JeepluspayPaymentService {
// 构建请求数据 // 构建请求数据
PayOrderCreateReqModel model = new PayOrderCreateReqModel(); PayOrderCreateReqModel model = new PayOrderCreateReqModel();
// 支付方式 // 支付方式
model.setWayCode(JeepluspayConfig.WX_APP); model.setWayCode(PlspayConfig.WX_APP);
// 异步通知地址 // 异步通知地址
model.setNotifyUrl(getNotifyUrl()); model.setNotifyUrl(getNotifyUrl());
// 微信app支付参数 // 微信app支付参数
...@@ -67,9 +67,9 @@ public class WxApp extends JeepluspayPaymentService { ...@@ -67,9 +67,9 @@ public class WxApp extends JeepluspayPaymentService {
model.setChannelExtra(channelExtra.toString()); model.setChannelExtra(channelExtra.toString());
// 发起统一下单 // 发起统一下单
PayOrderCreateResponse response = JeepluspayKit.payRequest(payOrder, mchAppConfigContext, model); PayOrderCreateResponse response = PlspayKit.payRequest(payOrder, mchAppConfigContext, model);
// 下单返回状态 // 下单返回状态
Boolean isSuccess = JeepluspayKit.checkPayResp(response, mchAppConfigContext); Boolean isSuccess = PlspayKit.checkPayResp(response, mchAppConfigContext);
if (isSuccess) { if (isSuccess) {
// 下单成功 // 下单成功
...@@ -80,8 +80,8 @@ public class WxApp extends JeepluspayPaymentService { ...@@ -80,8 +80,8 @@ public class WxApp extends JeepluspayPaymentService {
channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING);
} else { } else {
channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL);
channelRetMsg.setChannelErrCode(response.get().getErrCode()); channelRetMsg.setChannelErrCode(response.getCode()+"");
channelRetMsg.setChannelErrMsg(response.get().getErrMsg()); channelRetMsg.setChannelErrMsg(response.getMsg());
} }
} catch (JeepayException e) { } catch (JeepayException e) {
channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL);
......
...@@ -13,16 +13,16 @@ ...@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.jeequan.jeepay.pay.channel.jeepluspay.payway; package com.jeequan.jeepay.pay.channel.plspay.payway;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.jeequan.jeepay.core.entity.PayOrder; import com.jeequan.jeepay.core.entity.PayOrder;
import com.jeequan.jeepay.core.exception.BizException; import com.jeequan.jeepay.core.exception.BizException;
import com.jeequan.jeepay.core.model.params.jeepluspay.JeepluspayConfig; import com.jeequan.jeepay.core.model.params.plspay.PlspayConfig;
import com.jeequan.jeepay.exception.JeepayException; import com.jeequan.jeepay.exception.JeepayException;
import com.jeequan.jeepay.model.PayOrderCreateReqModel; import com.jeequan.jeepay.model.PayOrderCreateReqModel;
import com.jeequan.jeepay.pay.channel.jeepluspay.JeepluspayKit; import com.jeequan.jeepay.pay.channel.plspay.PlspayKit;
import com.jeequan.jeepay.pay.channel.jeepluspay.JeepluspayPaymentService; import com.jeequan.jeepay.pay.channel.plspay.PlspayPaymentService;
import com.jeequan.jeepay.pay.model.MchAppConfigContext; import com.jeequan.jeepay.pay.model.MchAppConfigContext;
import com.jeequan.jeepay.pay.rqrs.AbstractRS; import com.jeequan.jeepay.pay.rqrs.AbstractRS;
import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg;
...@@ -41,8 +41,8 @@ import org.springframework.stereotype.Service; ...@@ -41,8 +41,8 @@ import org.springframework.stereotype.Service;
* @site https://www.jeequan.com * @site https://www.jeequan.com
* @date 2022/8/16 18:37 * @date 2022/8/16 18:37
*/ */
@Service("jeepluspayPaymentByWxBarService") //Service Name需保持全局唯一性 @Service("plspayPaymentByWxBarService") //Service Name需保持全局唯一性
public class WxBar extends JeepluspayPaymentService { public class WxBar extends PlspayPaymentService {
@Override @Override
public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) {
...@@ -65,7 +65,7 @@ public class WxBar extends JeepluspayPaymentService { ...@@ -65,7 +65,7 @@ public class WxBar extends JeepluspayPaymentService {
// 构建请求数据 // 构建请求数据
PayOrderCreateReqModel model = new PayOrderCreateReqModel(); PayOrderCreateReqModel model = new PayOrderCreateReqModel();
// 支付方式 // 支付方式
model.setWayCode(JeepluspayConfig.WX_BAR); model.setWayCode(PlspayConfig.WX_BAR);
// 异步通知地址 // 异步通知地址
model.setNotifyUrl(getNotifyUrl()); model.setNotifyUrl(getNotifyUrl());
JSONObject channelExtra = new JSONObject(); JSONObject channelExtra = new JSONObject();
...@@ -74,13 +74,13 @@ public class WxBar extends JeepluspayPaymentService { ...@@ -74,13 +74,13 @@ public class WxBar extends JeepluspayPaymentService {
model.setChannelExtra(channelExtra.toString()); model.setChannelExtra(channelExtra.toString());
// 发起统一下单 // 发起统一下单
PayOrderCreateResponse response = JeepluspayKit.payRequest(payOrder, mchAppConfigContext, model); PayOrderCreateResponse response = PlspayKit.payRequest(payOrder, mchAppConfigContext, model);
// 下单返回状态 // 下单返回状态
Boolean isSuccess = JeepluspayKit.checkPayResp(response, mchAppConfigContext); Boolean isSuccess = PlspayKit.checkPayResp(response, mchAppConfigContext);
if (isSuccess) { if (isSuccess) {
// 下单成功 // 下单成功
if (JeepluspayConfig.PAY_STATE_SUCCESS.equals(response.getData().getString("orderState"))) { if (PlspayConfig.PAY_STATE_SUCCESS.equals(response.getData().getString("orderState"))) {
// 支付成功 // 支付成功
channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_SUCCESS); channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_SUCCESS);
}else { }else {
...@@ -90,8 +90,8 @@ public class WxBar extends JeepluspayPaymentService { ...@@ -90,8 +90,8 @@ public class WxBar extends JeepluspayPaymentService {
channelRetMsg.setChannelOrderId(response.get().getPayOrderId()); channelRetMsg.setChannelOrderId(response.get().getPayOrderId());
} else { } else {
channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL);
channelRetMsg.setChannelErrCode(response.get().getErrCode()); channelRetMsg.setChannelErrCode(response.getCode()+"");
channelRetMsg.setChannelErrMsg(response.get().getErrMsg()); channelRetMsg.setChannelErrMsg(response.getMsg());
} }
} catch (JeepayException e) { } catch (JeepayException e) {
channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL);
......
...@@ -13,15 +13,15 @@ ...@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.jeequan.jeepay.pay.channel.jeepluspay.payway; package com.jeequan.jeepay.pay.channel.plspay.payway;
import com.jeequan.jeepay.core.constants.CS; import com.jeequan.jeepay.core.constants.CS;
import com.jeequan.jeepay.core.entity.PayOrder; import com.jeequan.jeepay.core.entity.PayOrder;
import com.jeequan.jeepay.core.model.params.jeepluspay.JeepluspayConfig; import com.jeequan.jeepay.core.model.params.plspay.PlspayConfig;
import com.jeequan.jeepay.exception.JeepayException; import com.jeequan.jeepay.exception.JeepayException;
import com.jeequan.jeepay.model.PayOrderCreateReqModel; import com.jeequan.jeepay.model.PayOrderCreateReqModel;
import com.jeequan.jeepay.pay.channel.jeepluspay.JeepluspayKit; import com.jeequan.jeepay.pay.channel.plspay.PlspayKit;
import com.jeequan.jeepay.pay.channel.jeepluspay.JeepluspayPaymentService; import com.jeequan.jeepay.pay.channel.plspay.PlspayPaymentService;
import com.jeequan.jeepay.pay.model.MchAppConfigContext; import com.jeequan.jeepay.pay.model.MchAppConfigContext;
import com.jeequan.jeepay.pay.rqrs.AbstractRS; import com.jeequan.jeepay.pay.rqrs.AbstractRS;
import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg;
...@@ -38,8 +38,8 @@ import org.springframework.stereotype.Service; ...@@ -38,8 +38,8 @@ import org.springframework.stereotype.Service;
* @site https://www.jeequan.com * @site https://www.jeequan.com
* @date 2022/8/17 15:37 * @date 2022/8/17 15:37
*/ */
@Service("jeepluspayPaymentByWxH5Service") //Service Name需保持全局唯一性 @Service("plspayPaymentByWxH5Service") //Service Name需保持全局唯一性
public class WxH5 extends JeepluspayPaymentService { public class WxH5 extends PlspayPaymentService {
@Override @Override
public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) {
...@@ -56,14 +56,14 @@ public class WxH5 extends JeepluspayPaymentService { ...@@ -56,14 +56,14 @@ public class WxH5 extends JeepluspayPaymentService {
// 构建请求数据 // 构建请求数据
PayOrderCreateReqModel model = new PayOrderCreateReqModel(); PayOrderCreateReqModel model = new PayOrderCreateReqModel();
// 支付方式 // 支付方式
model.setWayCode(JeepluspayConfig.WX_H5); model.setWayCode(PlspayConfig.WX_H5);
// 异步通知地址 // 异步通知地址
model.setNotifyUrl(getNotifyUrl()); model.setNotifyUrl(getNotifyUrl());
// 发起统一下单 // 发起统一下单
PayOrderCreateResponse response = JeepluspayKit.payRequest(payOrder, mchAppConfigContext, model); PayOrderCreateResponse response = PlspayKit.payRequest(payOrder, mchAppConfigContext, model);
// 下单返回状态 // 下单返回状态
Boolean isSuccess = JeepluspayKit.checkPayResp(response, mchAppConfigContext); Boolean isSuccess = PlspayKit.checkPayResp(response, mchAppConfigContext);
if (isSuccess) { if (isSuccess) {
// 下单成功 // 下单成功
...@@ -84,8 +84,8 @@ public class WxH5 extends JeepluspayPaymentService { ...@@ -84,8 +84,8 @@ public class WxH5 extends JeepluspayPaymentService {
channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING);
} else { } else {
channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL);
channelRetMsg.setChannelErrCode(response.get().getErrCode()); channelRetMsg.setChannelErrCode(response.getCode()+"");
channelRetMsg.setChannelErrMsg(response.get().getErrMsg()); channelRetMsg.setChannelErrMsg(response.getMsg());
} }
} catch (JeepayException e) { } catch (JeepayException e) {
channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL);
......
...@@ -13,16 +13,16 @@ ...@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.jeequan.jeepay.pay.channel.jeepluspay.payway; package com.jeequan.jeepay.pay.channel.plspay.payway;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.jeequan.jeepay.core.entity.PayOrder; import com.jeequan.jeepay.core.entity.PayOrder;
import com.jeequan.jeepay.core.exception.BizException; import com.jeequan.jeepay.core.exception.BizException;
import com.jeequan.jeepay.core.model.params.jeepluspay.JeepluspayConfig; import com.jeequan.jeepay.core.model.params.plspay.PlspayConfig;
import com.jeequan.jeepay.exception.JeepayException; import com.jeequan.jeepay.exception.JeepayException;
import com.jeequan.jeepay.model.PayOrderCreateReqModel; import com.jeequan.jeepay.model.PayOrderCreateReqModel;
import com.jeequan.jeepay.pay.channel.jeepluspay.JeepluspayKit; import com.jeequan.jeepay.pay.channel.plspay.PlspayKit;
import com.jeequan.jeepay.pay.channel.jeepluspay.JeepluspayPaymentService; import com.jeequan.jeepay.pay.channel.plspay.PlspayPaymentService;
import com.jeequan.jeepay.pay.model.MchAppConfigContext; import com.jeequan.jeepay.pay.model.MchAppConfigContext;
import com.jeequan.jeepay.pay.rqrs.AbstractRS; import com.jeequan.jeepay.pay.rqrs.AbstractRS;
import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg;
...@@ -42,9 +42,9 @@ import org.springframework.stereotype.Service; ...@@ -42,9 +42,9 @@ import org.springframework.stereotype.Service;
* @site https://www.jeequan.com * @site https://www.jeequan.com
* @date 2022/8/17 14:24 * @date 2022/8/17 14:24
*/ */
@Service("jeepluspayPaymentByWxJsapiService") //Service Name需保持全局唯一性 @Service("plspayPaymentByWxJsapiService") //Service Name需保持全局唯一性
@Slf4j @Slf4j
public class WxJsapi extends JeepluspayPaymentService { public class WxJsapi extends PlspayPaymentService {
@Override @Override
public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) {
...@@ -67,7 +67,7 @@ public class WxJsapi extends JeepluspayPaymentService { ...@@ -67,7 +67,7 @@ public class WxJsapi extends JeepluspayPaymentService {
// 构建请求数据 // 构建请求数据
PayOrderCreateReqModel model = new PayOrderCreateReqModel(); PayOrderCreateReqModel model = new PayOrderCreateReqModel();
// 支付方式 // 支付方式
model.setWayCode(JeepluspayConfig.WX_JSAPI); model.setWayCode(PlspayConfig.WX_JSAPI);
// 异步通知地址 // 异步通知地址
model.setNotifyUrl(getNotifyUrl()); model.setNotifyUrl(getNotifyUrl());
JSONObject channelExtra = new JSONObject(); JSONObject channelExtra = new JSONObject();
...@@ -76,9 +76,9 @@ public class WxJsapi extends JeepluspayPaymentService { ...@@ -76,9 +76,9 @@ public class WxJsapi extends JeepluspayPaymentService {
model.setChannelExtra(channelExtra.toString()); model.setChannelExtra(channelExtra.toString());
// 发起统一下单 // 发起统一下单
PayOrderCreateResponse response = JeepluspayKit.payRequest(payOrder, mchAppConfigContext, model); PayOrderCreateResponse response = PlspayKit.payRequest(payOrder, mchAppConfigContext, model);
// 下单返回状态 // 下单返回状态
Boolean isSuccess = JeepluspayKit.checkPayResp(response, mchAppConfigContext); Boolean isSuccess = PlspayKit.checkPayResp(response, mchAppConfigContext);
if (isSuccess) { if (isSuccess) {
// 下单成功 // 下单成功
...@@ -88,8 +88,8 @@ public class WxJsapi extends JeepluspayPaymentService { ...@@ -88,8 +88,8 @@ public class WxJsapi extends JeepluspayPaymentService {
channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING);
} else { } else {
channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL);
channelRetMsg.setChannelErrCode(response.get().getErrCode()); channelRetMsg.setChannelErrCode(response.getCode()+"");
channelRetMsg.setChannelErrMsg(response.get().getErrMsg()); channelRetMsg.setChannelErrMsg(response.getMsg());
} }
} catch (JeepayException e) { } catch (JeepayException e) {
channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL);
......
...@@ -13,16 +13,16 @@ ...@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.jeequan.jeepay.pay.channel.jeepluspay.payway; package com.jeequan.jeepay.pay.channel.plspay.payway;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.jeequan.jeepay.core.entity.PayOrder; import com.jeequan.jeepay.core.entity.PayOrder;
import com.jeequan.jeepay.core.exception.BizException; import com.jeequan.jeepay.core.exception.BizException;
import com.jeequan.jeepay.core.model.params.jeepluspay.JeepluspayConfig; import com.jeequan.jeepay.core.model.params.plspay.PlspayConfig;
import com.jeequan.jeepay.exception.JeepayException; import com.jeequan.jeepay.exception.JeepayException;
import com.jeequan.jeepay.model.PayOrderCreateReqModel; import com.jeequan.jeepay.model.PayOrderCreateReqModel;
import com.jeequan.jeepay.pay.channel.jeepluspay.JeepluspayKit; import com.jeequan.jeepay.pay.channel.plspay.PlspayKit;
import com.jeequan.jeepay.pay.channel.jeepluspay.JeepluspayPaymentService; import com.jeequan.jeepay.pay.channel.plspay.PlspayPaymentService;
import com.jeequan.jeepay.pay.model.MchAppConfigContext; import com.jeequan.jeepay.pay.model.MchAppConfigContext;
import com.jeequan.jeepay.pay.rqrs.AbstractRS; import com.jeequan.jeepay.pay.rqrs.AbstractRS;
import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg;
...@@ -42,9 +42,9 @@ import org.springframework.stereotype.Service; ...@@ -42,9 +42,9 @@ import org.springframework.stereotype.Service;
* @site https://www.jeequan.com * @site https://www.jeequan.com
* @date 2022/8/17 15:24 * @date 2022/8/17 15:24
*/ */
@Service("jeepluspayPaymentByWxLiteService") //Service Name需保持全局唯一性 @Service("plspayPaymentByWxLiteService") //Service Name需保持全局唯一性
@Slf4j @Slf4j
public class WxLite extends JeepluspayPaymentService { public class WxLite extends PlspayPaymentService {
@Override @Override
public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) {
...@@ -66,7 +66,7 @@ public class WxLite extends JeepluspayPaymentService { ...@@ -66,7 +66,7 @@ public class WxLite extends JeepluspayPaymentService {
// 构建请求数据 // 构建请求数据
PayOrderCreateReqModel model = new PayOrderCreateReqModel(); PayOrderCreateReqModel model = new PayOrderCreateReqModel();
// 支付方式 // 支付方式
model.setWayCode(JeepluspayConfig.WX_LITE); model.setWayCode(PlspayConfig.WX_LITE);
// 异步通知地址 // 异步通知地址
model.setNotifyUrl(getNotifyUrl()); model.setNotifyUrl(getNotifyUrl());
JSONObject channelExtra = new JSONObject(); JSONObject channelExtra = new JSONObject();
...@@ -75,9 +75,9 @@ public class WxLite extends JeepluspayPaymentService { ...@@ -75,9 +75,9 @@ public class WxLite extends JeepluspayPaymentService {
model.setChannelExtra(channelExtra.toString()); model.setChannelExtra(channelExtra.toString());
// 发起统一下单 // 发起统一下单
PayOrderCreateResponse response = JeepluspayKit.payRequest(payOrder, mchAppConfigContext, model); PayOrderCreateResponse response = PlspayKit.payRequest(payOrder, mchAppConfigContext, model);
// 下单返回状态 // 下单返回状态
Boolean isSuccess = JeepluspayKit.checkPayResp(response, mchAppConfigContext); Boolean isSuccess = PlspayKit.checkPayResp(response, mchAppConfigContext);
if (isSuccess) { if (isSuccess) {
// 下单成功 // 下单成功
...@@ -86,8 +86,8 @@ public class WxLite extends JeepluspayPaymentService { ...@@ -86,8 +86,8 @@ public class WxLite extends JeepluspayPaymentService {
channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING);
} else { } else {
channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL);
channelRetMsg.setChannelErrCode(response.get().getErrCode()); channelRetMsg.setChannelErrCode(response.getCode()+"");
channelRetMsg.setChannelErrMsg(response.get().getErrMsg()); channelRetMsg.setChannelErrMsg(response.getMsg());
} }
} catch (JeepayException e) { } catch (JeepayException e) {
channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL);
......
...@@ -13,15 +13,15 @@ ...@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.jeequan.jeepay.pay.channel.jeepluspay.payway; package com.jeequan.jeepay.pay.channel.plspay.payway;
import com.jeequan.jeepay.core.constants.CS; import com.jeequan.jeepay.core.constants.CS;
import com.jeequan.jeepay.core.entity.PayOrder; import com.jeequan.jeepay.core.entity.PayOrder;
import com.jeequan.jeepay.core.model.params.jeepluspay.JeepluspayConfig; import com.jeequan.jeepay.core.model.params.plspay.PlspayConfig;
import com.jeequan.jeepay.exception.JeepayException; import com.jeequan.jeepay.exception.JeepayException;
import com.jeequan.jeepay.model.PayOrderCreateReqModel; import com.jeequan.jeepay.model.PayOrderCreateReqModel;
import com.jeequan.jeepay.pay.channel.jeepluspay.JeepluspayKit; import com.jeequan.jeepay.pay.channel.plspay.PlspayKit;
import com.jeequan.jeepay.pay.channel.jeepluspay.JeepluspayPaymentService; import com.jeequan.jeepay.pay.channel.plspay.PlspayPaymentService;
import com.jeequan.jeepay.pay.model.MchAppConfigContext; import com.jeequan.jeepay.pay.model.MchAppConfigContext;
import com.jeequan.jeepay.pay.rqrs.AbstractRS; import com.jeequan.jeepay.pay.rqrs.AbstractRS;
import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg;
...@@ -39,8 +39,8 @@ import org.springframework.stereotype.Service; ...@@ -39,8 +39,8 @@ import org.springframework.stereotype.Service;
* @site https://www.jeequan.com * @site https://www.jeequan.com
* @date 2022/8/11 15:37 * @date 2022/8/11 15:37
*/ */
@Service("jeepluspayPaymentByWxNativeService") //Service Name需保持全局唯一性 @Service("plspayPaymentByWxNativeService") //Service Name需保持全局唯一性
public class WxNative extends JeepluspayPaymentService { public class WxNative extends PlspayPaymentService {
@Override @Override
public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) {
...@@ -58,14 +58,14 @@ public class WxNative extends JeepluspayPaymentService { ...@@ -58,14 +58,14 @@ public class WxNative extends JeepluspayPaymentService {
// 构建请求数据 // 构建请求数据
PayOrderCreateReqModel model = new PayOrderCreateReqModel(); PayOrderCreateReqModel model = new PayOrderCreateReqModel();
// 支付方式 // 支付方式
model.setWayCode(JeepluspayConfig.WX_NATIVE); model.setWayCode(PlspayConfig.WX_NATIVE);
// 异步通知地址 // 异步通知地址
model.setNotifyUrl(getNotifyUrl()); model.setNotifyUrl(getNotifyUrl());
// 发起统一下单 // 发起统一下单
PayOrderCreateResponse response = JeepluspayKit.payRequest(payOrder, mchAppConfigContext, model); PayOrderCreateResponse response = PlspayKit.payRequest(payOrder, mchAppConfigContext, model);
// 下单返回状态 // 下单返回状态
Boolean isSuccess = JeepluspayKit.checkPayResp(response, mchAppConfigContext); Boolean isSuccess = PlspayKit.checkPayResp(response, mchAppConfigContext);
if (isSuccess) { if (isSuccess) {
// 下单成功 // 下单成功
...@@ -79,8 +79,8 @@ public class WxNative extends JeepluspayPaymentService { ...@@ -79,8 +79,8 @@ public class WxNative extends JeepluspayPaymentService {
channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING);
} else { } else {
channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL);
channelRetMsg.setChannelErrCode(response.get().getErrCode()); channelRetMsg.setChannelErrCode(response.getCode()+"");
channelRetMsg.setChannelErrMsg(response.get().getErrMsg()); channelRetMsg.setChannelErrMsg(response.getMsg());
} }
} catch (JeepayException e) { } catch (JeepayException e) {
channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment