ICashierDeskService.java
1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
package com.diligrp.cashier.boss.service;
import com.diligrp.cashier.boss.domain.CashierOrderVO;
import com.diligrp.cashier.boss.domain.CashierPaymentUrl;
import com.diligrp.cashier.pipeline.domain.OnlinePaymentResponse;
import com.diligrp.cashier.pipeline.domain.OnlinePaymentStatus;
import com.diligrp.cashier.pipeline.domain.OnlineRefundResponse;
import com.diligrp.cashier.trade.domain.*;
import com.diligrp.cashier.trade.model.OnlinePayment;
public interface ICashierDeskService {
/**
* 提交收银台订单
*
* @param merchant - 接入商户
* @param order - 交易订单
* @return 交易订单
*/
CashierPaymentUrl doSubmit(Merchant merchant, CashierOrder order);
/**
* 根据收银台TOKEN信息获取订单信息
*/
CashierOrderVO getCashierOrderByToken(String token);
/**
* 检查交易订单是否能进行支付
*/
void checkTradeOrder(String tradeId);
/**
* 提交收银台支付
*
* @param payment - 支付信息
* @return 支付状态
*/
OnlinePaymentStatus doPayment(CashierPayment payment);
/**
* 支付结果通知
*
* @param payment - 支付订单
* @param response - 支付结果
*/
void notifyPaymentResponse(OnlinePayment payment, OnlinePaymentResponse response);
/**
* 关闭交易订单
*/
void closeTradeOrder(String tradeId);
/**
* 查询支付状态
*/
OnlinePaymentResult queryPaymentState(String paymentId, String mode);
/**
* 交易退款
*/
OnlineRefundResult sendRefundRequest(OnlineRefundDTO request);
/**
* 退款结果通知
*
* @param refund - 退款订单
* @param response - 退款结果
*/
void notifyRefundResult(OnlinePayment refund, OnlineRefundResponse response);
/**
* 查询退款状态
*/
OnlineRefundResult queryRefundState(String refundId, String mode);
}