diff --git a/database.sql b/database.sql index 6ea2c2b1..dd809202 100644 --- a/database.sql +++ b/database.sql @@ -1036,5 +1036,5 @@ insert into pms_menu_role (role_id, menu_id) select 2,id from PMS_MENU; -- 2016.8.5 第三方支付信息表增加支付宝线下产品字段 alter table rp_user_pay_info add offline_app_id varchar(50); alter table rp_user_pay_info add rsa_private_key varchar(100); -alter table rp_user_pay_info add rsa_public_key varchar(100); +alter table rp_user_pay_info add rsa_public_key varchar(100); diff --git a/roncoo-pay-app-notify/src/main/java/com/roncoo/pay/app/notify/message/ConsumerSessionAwareMessageListener.java b/roncoo-pay-app-notify/src/main/java/com/roncoo/pay/app/notify/message/ConsumerSessionAwareMessageListener.java index 8029e9e6..9e51e56a 100644 --- a/roncoo-pay-app-notify/src/main/java/com/roncoo/pay/app/notify/message/ConsumerSessionAwareMessageListener.java +++ b/roncoo-pay-app-notify/src/main/java/com/roncoo/pay/app/notify/message/ConsumerSessionAwareMessageListener.java @@ -24,15 +24,13 @@ import com.roncoo.pay.notify.entity.RpNotifyRecord; import com.roncoo.pay.notify.enums.NotifyStatusEnum; import com.roncoo.pay.notify.service.RpNotifyService; - import org.apache.activemq.command.ActiveMQTextMessage; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.jms.listener.SessionAwareMessageListener; - -import javax.jms.*; +import javax.jms.Message; +import javax.jms.MessageListener; import java.util.Date; /** diff --git a/roncoo-pay-service/src/main/java/com/roncoo/pay/trade/service/impl/RpTradePaymentManagerServiceImpl.java b/roncoo-pay-service/src/main/java/com/roncoo/pay/trade/service/impl/RpTradePaymentManagerServiceImpl.java index b3c196c7..3f600583 100644 --- a/roncoo-pay-service/src/main/java/com/roncoo/pay/trade/service/impl/RpTradePaymentManagerServiceImpl.java +++ b/roncoo-pay-service/src/main/java/com/roncoo/pay/trade/service/impl/RpTradePaymentManagerServiceImpl.java @@ -266,7 +266,6 @@ private F2FPayResultVo getF2FPayResultVo(RpTradePaymentOrder rpTradePaymentOrder rpTradePaymentOrder.setPayWayCode(payWay.getPayWayCode()); rpTradePaymentOrder.setPayWayName(payWay.getPayWayName()); - rpTradePaymentOrderDao.update(rpTradePaymentOrder); RpTradePaymentRecord rpTradePaymentRecord = sealRpTradePaymentRecord( rpTradePaymentOrder.getMerchantNo(), rpTradePaymentOrder.getMerchantName() , rpTradePaymentOrder.getProductName(), rpTradePaymentOrder.getMerchantOrderNo(), rpTradePaymentOrder.getOrderAmount(), payWay.getPayWayCode(), payWay.getPayWayName() , rpTradePaymentOrder.getFundIntoType() , BigDecimal.valueOf(payWay.getPayRate()) , rpTradePaymentOrder.getOrderIp(), rpTradePaymentOrder.getReturnUrl(), rpTradePaymentOrder.getNotifyUrl(), rpTradePaymentOrder.getRemark(), rpTradePaymentOrder.getField1(), rpTradePaymentOrder.getField2(), rpTradePaymentOrder.getField3(), rpTradePaymentOrder.getField4(), rpTradePaymentOrder.getField5()); rpTradePaymentRecordDao.insert(rpTradePaymentRecord); @@ -284,6 +283,9 @@ private F2FPayResultVo getF2FPayResultVo(RpTradePaymentOrder rpTradePaymentOrder aliF2FPaySubmit.initConfigs(rpTradePaymentOrder.getFundIntoType(), rpUserPayInfo.getOfflineAppId(), rpUserPayInfo.getAppId(), rpUserPayInfo.getRsaPrivateKey(), rpUserPayInfo.getRsaPublicKey()); Map aliPayReturnMsg = aliF2FPaySubmit.f2fPay(rpTradePaymentRecord.getBankOrderNo(), rpTradePaymentOrder.getProductName(), "", authCode, rpTradePaymentRecord.getOrderAmount(), roncooPayGoodsDetailses); + rpTradePaymentOrder.setStatus(aliPayReturnMsg.get("status"));//支付订单状态 + rpTradePaymentOrderDao.update(rpTradePaymentOrder);//修改支付订单 + rpTradePaymentRecord.setStatus(aliPayReturnMsg.get("status"));//设置消费状态 rpTradePaymentRecord.setBankTrxNo(aliPayReturnMsg.get("bankTrxNo"));//银行流水号 rpTradePaymentRecord.setBankReturnMsg(aliPayReturnMsg.get("bankReturnMsg"));//银行返回信息 @@ -596,7 +598,7 @@ private ScanPayResultVo getScanPayResultVo(RpTradePaymentOrder rpTradePaymentOrd WeiXinPrePay weiXinPrePay = sealWeixinPerPay(appid , mch_id , rpTradePaymentOrder.getProductName() ,rpTradePaymentOrder.getRemark() , rpTradePaymentRecord.getBankOrderNo() , rpTradePaymentOrder.getOrderAmount() , rpTradePaymentOrder.getOrderTime() , rpTradePaymentOrder.getOrderPeriod() , WeiXinTradeTypeEnum.NATIVE , rpTradePaymentRecord.getBankOrderNo() ,"" ,rpTradePaymentOrder.getOrderIp()); - String prePayXml = WeiXinPayUtils.getPrePayXml(weiXinPrePay, WeixinConfigUtil.readConfig("partnerKey")); + String prePayXml = WeiXinPayUtils.getPrePayXml(weiXinPrePay, partnerKey); //调用微信支付的功能,获取微信支付code_url Map prePayRequest = WeiXinPayUtils.httpXmlRequest(WeixinConfigUtil.readConfig("prepay_url"), "POST", prePayXml); if (WeixinTradeStateEnum.SUCCESS.name().equals(prePayRequest.get("return_code")) && WeixinTradeStateEnum.SUCCESS.name().equals(prePayRequest.get("result_code"))) { diff --git a/roncoo-pay-service/src/main/resources/alipay_config.properties b/roncoo-pay-service/src/main/resources/alipay_config.properties index c4fc3d8e..5ff2f93a 100644 --- a/roncoo-pay-service/src/main/resources/alipay_config.properties +++ b/roncoo-pay-service/src/main/resources/alipay_config.properties @@ -1,10 +1,10 @@ ################################################# 支付宝分页查询账单配置 ##################################################### #合作身份者ID,签约账号,以2088开头由16位纯数字组成的字符串,查看地址:https://b.alipay.com/order/pidAndKey.htm -partner=2088121890820083 +partner=111111111 #MD5密钥,安全检验码,由数字和字母组成的32位字符串,查看地址:https://b.alipay.com/order/pidAndKey.htm -key=krmqp98s4zvz32oaoj1zqzlro54lujzu +key=2222222222 #支付宝提供给商户的服务接入网关URL(新) alipay_gateway_new=https\://mapi.alipay.com/gateway.do? @@ -19,7 +19,7 @@ log_path=C\:\\ input_charset=utf-8 #收款支付宝账号,以2088开头由16位纯数字组成的字符串,一般情况下收款账号就是签约账号 -seller_id=2088121890820083 +seller_id=3333333333 #支付宝消息验证地址 https_verify_url=https\://mapi.alipay.com/gateway.do?service\=notify_verify& diff --git a/roncoo-pay-service/src/main/resources/weixinpay_config.properties b/roncoo-pay-service/src/main/resources/weixinpay_config.properties index b48baf28..22f33925 100644 --- a/roncoo-pay-service/src/main/resources/weixinpay_config.properties +++ b/roncoo-pay-service/src/main/resources/weixinpay_config.properties @@ -1,11 +1,11 @@ #appId -appId=wxdc4e0888857e858d +appId=11111111 #微信支付商户号 -mch_id=1311205301 +mch_id=22222222 #微信支付 -partnerKey=F64552266DE91BA676F1DBF984D847B6 +partnerKey=33333333 #预支付订单请求地址 prepay_url=https\://api.mch.weixin.qq.com/pay/unifiedorder