mirror of
https://gitee.com/egzosn/pay-java-parent.git
synced 2026-06-04 07:36:30 +08:00
移除已废弃的字段与方法
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
package com.egzosn.pay.payoneer.api;
|
||||
|
||||
import com.egzosn.pay.common.api.BasePayConfigStorage;
|
||||
|
||||
/**
|
||||
* Payoneer P卡 支付 配置
|
||||
*
|
||||
* @author Actinia
|
||||
* @author egan
|
||||
* @author egan
|
||||
* <pre>
|
||||
* email hayesfu@qq.com
|
||||
* date 2018-01-19
|
||||
@@ -16,27 +18,38 @@ public class PayoneerConfigStorage extends BasePayConfigStorage {
|
||||
*/
|
||||
private String programId;
|
||||
/**
|
||||
* PayoneerPay 用户名
|
||||
* PayoneerPay 用户名
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 应用id
|
||||
* 应用id
|
||||
*
|
||||
* @return 空
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public String getAppid() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 应用id
|
||||
* 纠正名称
|
||||
*
|
||||
* @return 应用id
|
||||
*/
|
||||
@Override
|
||||
public String getAppId() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 合作商唯一标识
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public String getPid () {
|
||||
public String getPid() {
|
||||
return programId;
|
||||
}
|
||||
|
||||
@@ -46,7 +59,8 @@ public class PayoneerConfigStorage extends BasePayConfigStorage {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商户Id
|
||||
* 获取商户Id
|
||||
*
|
||||
* @return 商户Id
|
||||
*/
|
||||
public String getProgramId() {
|
||||
@@ -54,7 +68,8 @@ public class PayoneerConfigStorage extends BasePayConfigStorage {
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置商户Id
|
||||
* 设置商户Id
|
||||
*
|
||||
* @param programId 商户Id
|
||||
*/
|
||||
public void setProgramId(String programId) {
|
||||
@@ -62,10 +77,11 @@ public class PayoneerConfigStorage extends BasePayConfigStorage {
|
||||
}
|
||||
|
||||
/**
|
||||
* PayoneerPay 用户名
|
||||
* PayoneerPay 用户名
|
||||
*
|
||||
* @param userName 用户名
|
||||
*/
|
||||
public void setUserName(String userName){
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
@@ -74,16 +90,18 @@ public class PayoneerConfigStorage extends BasePayConfigStorage {
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置PayoneerPay API password
|
||||
* 设置PayoneerPay API password
|
||||
*
|
||||
* @param apiPassword api密钥
|
||||
*/
|
||||
public void setApiPassword(String apiPassword){
|
||||
public void setApiPassword(String apiPassword) {
|
||||
setKeyPrivate(apiPassword);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取 PayoneerPay API password
|
||||
* 获取 PayoneerPay API password
|
||||
*/
|
||||
public String getApiPassword(){
|
||||
return getKeyPrivate();
|
||||
public String getApiPassword() {
|
||||
return getKeyPrivate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,31 @@
|
||||
package com.egzosn.pay.payoneer.api;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.http.Header;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.http.message.BasicHeader;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.egzosn.pay.common.api.BasePayService;
|
||||
import com.egzosn.pay.common.bean.*;
|
||||
import com.egzosn.pay.common.bean.BaseRefundResult;
|
||||
import com.egzosn.pay.common.bean.CurType;
|
||||
import com.egzosn.pay.common.bean.DefaultCurType;
|
||||
import com.egzosn.pay.common.bean.MethodType;
|
||||
import com.egzosn.pay.common.bean.PayMessage;
|
||||
import com.egzosn.pay.common.bean.PayOrder;
|
||||
import com.egzosn.pay.common.bean.PayOutMessage;
|
||||
import com.egzosn.pay.common.bean.RefundOrder;
|
||||
import com.egzosn.pay.common.bean.RefundResult;
|
||||
import com.egzosn.pay.common.bean.TransactionType;
|
||||
import com.egzosn.pay.common.bean.TransferOrder;
|
||||
import com.egzosn.pay.common.bean.outbuilder.PayTextOutMessage;
|
||||
import com.egzosn.pay.common.bean.result.PayException;
|
||||
import com.egzosn.pay.common.exception.PayErrorException;
|
||||
@@ -14,19 +36,13 @@ import com.egzosn.pay.common.http.UriVariables;
|
||||
import com.egzosn.pay.common.util.DateUtils;
|
||||
import com.egzosn.pay.common.util.Util;
|
||||
import com.egzosn.pay.payoneer.bean.PayoneerTransactionType;
|
||||
import org.apache.http.Header;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.http.message.BasicHeader;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* payoneer业务逻辑
|
||||
*
|
||||
* @author Actinia
|
||||
* @author egan
|
||||
* <pre>
|
||||
* <pre>
|
||||
* email: egzosn@gmail.com
|
||||
* email: hayesfu@qq.com
|
||||
* create 2018-01-19
|
||||
@@ -61,20 +77,21 @@ public class PayoneerPayService extends BasePayService<PayoneerConfigStorage> im
|
||||
|
||||
/**
|
||||
* 获取授权请求头
|
||||
*
|
||||
* @return 授权请求头
|
||||
*/
|
||||
private HttpHeader authHeader(){
|
||||
private HttpHeader authHeader() {
|
||||
|
||||
List<Header> headers = new ArrayList<>();
|
||||
headers.add(new BasicHeader("Authorization", "Basic " + authorizationString(getPayConfigStorage().getSeller(), getPayConfigStorage().getKeyPrivate())));
|
||||
headers.add(new BasicHeader("Authorization", "Basic " + authorizationString(getPayConfigStorage().getSeller(), getPayConfigStorage().getKeyPrivate())));
|
||||
|
||||
return new HttpHeader(headers);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取授权页面
|
||||
*
|
||||
* @param payeeId 收款id
|
||||
*
|
||||
* @return 返回请求结果
|
||||
*/
|
||||
@Override
|
||||
@@ -97,7 +114,6 @@ public class PayoneerPayService extends BasePayService<PayoneerConfigStorage> im
|
||||
* 授权状态
|
||||
*
|
||||
* @param payeeId 用户id
|
||||
*
|
||||
* @return 返回是否认证 true 已认证
|
||||
*/
|
||||
@Override
|
||||
@@ -110,7 +126,6 @@ public class PayoneerPayService extends BasePayService<PayoneerConfigStorage> im
|
||||
* 获取授权用户信息
|
||||
*
|
||||
* @param payeeId 用户id
|
||||
*
|
||||
* @return 获取授权用户信息,包含用户状态,注册时间,联系人信息,地址信息等等
|
||||
*/
|
||||
@Override
|
||||
@@ -123,7 +138,6 @@ public class PayoneerPayService extends BasePayService<PayoneerConfigStorage> im
|
||||
* 回调校验
|
||||
*
|
||||
* @param params 回调回来的参数集
|
||||
*
|
||||
* @return 签名校验 true通过
|
||||
*/
|
||||
@Override
|
||||
@@ -137,28 +151,14 @@ public class PayoneerPayService extends BasePayService<PayoneerConfigStorage> im
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 签名校验
|
||||
*
|
||||
* @param params 参数集
|
||||
* @param sign 签名原文
|
||||
*
|
||||
* @return 签名校验 true通过
|
||||
*/
|
||||
@Override
|
||||
public boolean signVerify(Map<String, Object> params, String sign) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 支付宝需要,微信是否也需要再次校验来源,进行订单查询
|
||||
* 校验数据来源
|
||||
*
|
||||
* @param outTradeNo 业务id, 数据的真实性.
|
||||
*
|
||||
* @return true通过
|
||||
*/
|
||||
@Override
|
||||
public boolean verifySource(String outTradeNo) {
|
||||
Map<String, Object> data = query(null, outTradeNo);
|
||||
return "DONE".equals(data.get("status"));
|
||||
@@ -168,7 +168,6 @@ public class PayoneerPayService extends BasePayService<PayoneerConfigStorage> im
|
||||
* 返回创建的订单信息
|
||||
*
|
||||
* @param order 支付订单
|
||||
*
|
||||
* @return 订单信息
|
||||
* @see PayOrder 支付订单信息
|
||||
*/
|
||||
@@ -192,7 +191,6 @@ public class PayoneerPayService extends BasePayService<PayoneerConfigStorage> im
|
||||
*
|
||||
* @param content 需要签名的内容
|
||||
* @param characterEncoding 字符编码
|
||||
*
|
||||
* @return 签名
|
||||
*/
|
||||
@Override
|
||||
@@ -206,7 +204,6 @@ public class PayoneerPayService extends BasePayService<PayoneerConfigStorage> im
|
||||
*
|
||||
* @param code 状态
|
||||
* @param message 消息
|
||||
*
|
||||
* @return 返回输出消息
|
||||
*/
|
||||
@Override
|
||||
@@ -219,7 +216,6 @@ public class PayoneerPayService extends BasePayService<PayoneerConfigStorage> im
|
||||
* 主要用于拦截器中返回
|
||||
*
|
||||
* @param payMessage 支付回调消息
|
||||
*
|
||||
* @return 返回输出消息
|
||||
*/
|
||||
@Override
|
||||
@@ -232,7 +228,6 @@ public class PayoneerPayService extends BasePayService<PayoneerConfigStorage> im
|
||||
*
|
||||
* @param orderInfo 发起支付的订单信息
|
||||
* @param method 请求方式 "post" "get",
|
||||
*
|
||||
* @return 获取输出消息,用户返回给支付端, 针对于web端
|
||||
* @see MethodType 请求类型
|
||||
*/
|
||||
@@ -245,7 +240,6 @@ public class PayoneerPayService extends BasePayService<PayoneerConfigStorage> im
|
||||
* 获取输出二维码,用户返回给支付端,
|
||||
*
|
||||
* @param order 发起支付的订单信息
|
||||
*
|
||||
* @return 返回图片信息,支付时需要的
|
||||
*/
|
||||
@Override
|
||||
@@ -257,7 +251,6 @@ public class PayoneerPayService extends BasePayService<PayoneerConfigStorage> im
|
||||
* 刷卡付,pos主动扫码付款(条码付)
|
||||
*
|
||||
* @param order 发起支付的订单信息
|
||||
*
|
||||
* @return 返回支付结果
|
||||
*/
|
||||
@Override
|
||||
@@ -271,7 +264,7 @@ public class PayoneerPayService extends BasePayService<PayoneerConfigStorage> im
|
||||
if (response != null) {
|
||||
return response;
|
||||
}
|
||||
throw new PayErrorException(new PayException("fail", "Payoneer申请收款失败,原因:未有返回值" ));
|
||||
throw new PayErrorException(new PayException("fail", "Payoneer申请收款失败,原因:未有返回值"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -279,7 +272,6 @@ public class PayoneerPayService extends BasePayService<PayoneerConfigStorage> im
|
||||
*
|
||||
* @param tradeNo 支付平台订单号
|
||||
* @param outTradeNo 商户单号
|
||||
*
|
||||
* @return 返回查询回来的结果集,支付方原值返回
|
||||
*/
|
||||
@Override
|
||||
@@ -293,7 +285,6 @@ public class PayoneerPayService extends BasePayService<PayoneerConfigStorage> im
|
||||
*
|
||||
* @param tradeNo 支付平台订单号
|
||||
* @param outTradeNo 商户单号
|
||||
*
|
||||
* @return 返回支付方交易关闭后的结果
|
||||
*/
|
||||
@Override
|
||||
@@ -314,13 +305,10 @@ public class PayoneerPayService extends BasePayService<PayoneerConfigStorage> im
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 申请退款接口
|
||||
*
|
||||
* @param refundOrder 退款订单信息
|
||||
*
|
||||
* @return 返回支付方申请退款后的结果
|
||||
*/
|
||||
@Override
|
||||
@@ -390,7 +378,6 @@ public class PayoneerPayService extends BasePayService<PayoneerConfigStorage> im
|
||||
*
|
||||
* @param billDate 账单时间:日账单格式为yyyy-MM-dd,月账单格式为yyyy-MM。
|
||||
* @param billType 账单类型,商户通过接口或商户经开放平台授权后其所属服务商通过接口可以获取以下账单类型:trade、signcustomer;trade指商户基于支付宝交易收单的业务账单;signcustomer是指基于商户支付宝余额收入及支出等资金变动的帐务账单;
|
||||
*
|
||||
* @return 返回支付方下载对账单的结果
|
||||
*/
|
||||
@Override
|
||||
@@ -404,18 +391,17 @@ public class PayoneerPayService extends BasePayService<PayoneerConfigStorage> im
|
||||
* 类型为{@link String }或者 {@link Date },类型须强制限制,类型不对应则抛出异常{@link PayErrorException}
|
||||
* @param outTradeNoBillType 商户单号或者 账单类型
|
||||
* @param transactionType 交易类型
|
||||
*
|
||||
* @return 返回支付方对应接口的结果
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> secondaryInterface(Object tradeNoOrBillDate, String outTradeNoBillType, TransactionType transactionType) {
|
||||
MethodType methodType = null;
|
||||
if (transactionType == PayoneerTransactionType.CHARGE_CANCEL) { // 退款
|
||||
methodType = MethodType.POST;
|
||||
}else {
|
||||
}
|
||||
else {
|
||||
methodType = MethodType.GET;
|
||||
}
|
||||
JSONObject result = getHttpRequestTemplate().doExecute(UriVariables.getUri(getReqUrl(transactionType), outTradeNoBillType), authHeader() ,JSONObject.class, methodType);
|
||||
JSONObject result = getHttpRequestTemplate().doExecute(UriVariables.getUri(getReqUrl(transactionType), outTradeNoBillType), authHeader(), JSONObject.class, methodType);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -423,7 +409,6 @@ public class PayoneerPayService extends BasePayService<PayoneerConfigStorage> im
|
||||
* 转账
|
||||
*
|
||||
* @param order 转账订单
|
||||
*
|
||||
* @return 对应的转账结果
|
||||
*/
|
||||
@Override
|
||||
@@ -449,7 +434,6 @@ public class PayoneerPayService extends BasePayService<PayoneerConfigStorage> im
|
||||
*
|
||||
* @param outNo 商户转账订单号
|
||||
* @param tradeNo 支付平台转账订单号
|
||||
*
|
||||
* @return 对应的转账订单
|
||||
*/
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user