|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.foxinmy.weixin4j.api.BaseApi
com.foxinmy.weixin4j.mp.api.MpApi
com.foxinmy.weixin4j.mp.api.PayOldApi
public class PayOldApi
V2老支付API
| Constructor Summary | |
|---|---|
PayOldApi()
支付对象(使用weixin4j.properties配置的account商户信息,使用FileCacheStorager文件方式缓存TOKEN) |
|
PayOldApi(CacheStorager<Token> cacheStorager)
支付对象(使用weixin4j.properties配置的account商户信息) |
|
PayOldApi(WeixinOldPayAccount weixinPayAccount,
CacheStorager<Token> cacheStorager)
支付对象 |
|
| Method Summary | |
|---|---|
RefundResultV2 |
applyRefund(InputStream certificate,
IdQuery idQuery,
String outRefundNo,
double totalFee,
double refundFee,
String opUserId,
String opUserPasswd)
退款申请 |
RefundResultV2 |
applyRefund(InputStream certificate,
IdQuery idQuery,
String outRefundNo,
double totalFee,
double refundFee,
String opUserId,
String opUserPasswd,
String recvUserId,
String reccvUserName,
RefundType refundType)
退款申请 |
String |
createNativePayRequestURL(String productId)
创建V2.x NativePay支付链接 |
String |
createPayJsRequestJson(PayPackageV2 payPackage)
生成V2.x版本JSAPI支付字符串 |
String |
createPayJsRequestJson(String body,
String outTradeNo,
double totalFee,
String notifyUrl,
String createIp)
生成V2.x版本JSAPI支付字符串 |
ApiResult |
deliverNotify(String openId,
String transid,
String outTradeNo,
boolean status,
String statusMsg)
发货通知 |
File |
downloadBill(Date billDate,
BillType billType,
String billPath)
下载对账单 1.微信侧未成功下单的交易不会出现在对账单中。支付成功后撤销的交易会出现在对账 单中,跟原支付单订单号一致,bill_type 为 REVOKED; 2.微信在次日 9 点启动生成前一天的对账单,建议商户 9 点半后再获取; 3.对账单中涉及金额的字段单位为“元”。 |
TokenManager |
getTokenManager()
token管理 |
WeixinOldPayAccount |
getWeixinPayAccount()
返回商户信息 |
WeixinOldPaymentSignature |
getWeixinPaymentSignature()
返回签名对象 |
OrderV2 |
queryOrder(IdQuery idQuery)
订单查询 |
RefundRecordV2 |
queryRefund(IdQuery idQuery)
退款查询 退款有一定延时,用零钱支付的退款20分钟内到账,银行卡支付的退款 3 个工作日后重新查询退款状态 |
ApiResult |
updateFeedback(String openId,
String feedbackId)
维权处理 |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PayOldApi()
public PayOldApi(CacheStorager<Token> cacheStorager)
public PayOldApi(WeixinOldPayAccount weixinPayAccount,
CacheStorager<Token> cacheStorager)
weixinPayAccount - 商户信息cacheStorager - token管理| Method Detail |
|---|
public WeixinOldPayAccount getWeixinPayAccount()
public TokenManager getTokenManager()
public WeixinOldPaymentSignature getWeixinPaymentSignature()
public String createPayJsRequestJson(String body,
String outTradeNo,
double totalFee,
String notifyUrl,
String createIp)
body - 支付详情outTradeNo - 订单号totalFee - 订单总额(元)notifyUrl - 支付回调URLcreateIp - 订单生成的机器 IP
public String createPayJsRequestJson(PayPackageV2 payPackage)
payPackage - 支付信息
public String createNativePayRequestURL(String productId)
productId - 与订单ID等价
public OrderV2 queryOrder(IdQuery idQuery)
throws WeixinException
idQuery - 订单号
WeixinExceptionOrderV2
public RefundResultV2 applyRefund(InputStream certificate,
IdQuery idQuery,
String outRefundNo,
double totalFee,
double refundFee,
String opUserId,
String opUserPasswd)
throws WeixinException
certificate - 证书文件(V2版本后缀为*.pfx)idQuery - 商户系统内部的订单号, transaction_id 、 out_trade_no 二选一,如果同时存在优先级:
transaction_id> out_trade_nooutRefundNo - 商户系统内部的退款单号,商 户系统内部唯一,同一退款单号多次请求只退一笔totalFee - 订单总金额,单位为元refundFee - 退款总金额,单位为元,可以做部分退款opUserId - 操作员帐号, 默认为商户号opUserPasswd - 操作员密码,默认为商户后台登录密码
WeixinException#applyRefund(InputStream, IdQuery, String, double, double, String, Map)}
public RefundResultV2 applyRefund(InputStream certificate,
IdQuery idQuery,
String outRefundNo,
double totalFee,
double refundFee,
String opUserId,
String opUserPasswd,
String recvUserId,
String reccvUserName,
RefundType refundType)
throws WeixinException
certificate - 证书文件(V2版本后缀为*.pfx)idQuery - 商户系统内部的订单号, transaction_id 、 out_trade_no 二选一,如果同时存在优先级:
transaction_id> out_trade_nooutRefundNo - 商户系统内部的退款单号,商 户系统内部唯一,同一退款单号多次请求只退一笔totalFee - 订单总金额,单位为元refundFee - 退款总金额,单位为元,可以做部分退款opUserId - 操作员帐号, 默认为商户号opUserPasswd - 操作员密码,默认为商户后台登录密码recvUserId - 转账退款接收退款的财付通帐号。 一般无需填写,只有退银行失败,资金转入商 户号现金账号时(即状态为转入代发,查询返 回的
refund_status 是 7 或 11),填写原退款 单号并填写此字段,资金才会退到指定财付通
账号。其他情况此字段忽略reccvUserName - 转账退款接收退款的姓名(需与接收退款的财 付通帐号绑定的姓名一致)refundType - 为空或者填 1:商户号余额退款;2:现金帐号 退款;3:优先商户号退款,若商户号余额不足, 再做现金帐号退款。使用 2 或
3 时,需联系财 付通开通此功能
WeixinException#applyRefund(InputStream, IdQuery, String, double, double, String, Map)}
public File downloadBill(Date billDate,
BillType billType,
String billPath)
throws WeixinException
billDate - 下载对账单的日期 为空则取前一天billType - 下载对账单的类型 ALL,返回当日所有订单信息, 默认值 SUCCESS,返回当日成功支付的订单
REFUND,返回当日退款订单billPath - 对账单保存路径
WeixinException
public RefundRecordV2 queryRefund(IdQuery idQuery)
throws WeixinException
idQuery - 单号 refund_id、out_refund_no、 out_trade_no 、 transaction_id
四个参数必填一个,优先级为:
refund_id>out_refund_no>transaction_id>out_trade_no
WeixinExceptionRefundRecordV2,
RefundDetailV2
public ApiResult deliverNotify(String openId,
String transid,
String outTradeNo,
boolean status,
String statusMsg)
throws WeixinException
openId - 用户IDtransid - 交易单号outTradeNo - 订单号status - 成功|失败statusMsg - status为失败时携带的信息
WeixinException
public ApiResult updateFeedback(String openId,
String feedbackId)
throws WeixinException
openId - 用户IDfeedbackId - 维权单号
WeixinException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||