Completed
Push — master ( c52910...66a65c )
by lyu
02:53 queued 47s
created

AlipayTradeRefundContentBuilder   A

Complexity

Total Complexity 18

Size/Duplication

Total Lines 138
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 138
ccs 0
cts 79
cp 0
rs 10
c 0
b 0
f 0
wmc 18
lcom 1
cbo 1

17 Methods

Rating   Name   Duplication   Size   Complexity  
A getBizContent() 0 8 2
A setTradeNo() 0 5 1
A getTradeNo() 0 4 1
A setOutTradeNo() 0 5 1
A getOutTradeNo() 0 4 1
A setOperatorId() 0 5 1
A getOperatorId() 0 4 1
A setOutRequestNo() 0 5 1
A getOutRequestNo() 0 4 1
A setRefundAmount() 0 5 1
A getRefundAmount() 0 4 1
A setRefundReason() 0 5 1
A getRefundReason() 0 4 1
A setStoreId() 0 5 1
A getStoreId() 0 4 1
A setTerminalId() 0 5 1
A getTerminalId() 0 4 1
1
<?php
2
3
namespace Kaylyu\Alipay\F2fpay\Base\Model\Builder;
4
5
class AlipayTradeRefundContentBuilder extends ContentBuilder
6
{
7
    // 支付宝交易号,当面付支付成功后支付宝会返回给商户系统。通过此支付宝交易号进行交易退款
8
    private $tradeNo;
9
10
    // (推荐) 外部订单号,可通过外部订单号申请退款,推荐使用
11
    private $outTradeNo;
12
13
    // 退款金额,该金额必须小于等于订单的支付金额,此处单位为元,精确到小数点后2位
14
    private $refundAmount;
15
16
    // (可选,需要支持重复退货时必填) 商户退款请求号,相同支付宝交易号下的不同退款请求号对应同一笔交易的不同退款申请,
17
    // 对于相同支付宝交易号下多笔相同商户退款请求号的退款交易,支付宝只会进行一次退款
18
    private $outRequestNo;
19
20
    // (必填) 退款原因,可以说明用户退款原因,方便为商家后台提供统计
21
    private $refundReason;
22
23
    // (必填) 商户门店编号,退款情况下可以为商家后台提供退款权限判定和统计等作用,详询支付宝技术支持
24
    private $storeId;
25
26
    // 商户操作员编号,添加此参数可以为商户操作员做销售统
27
    private $operatorId;
28
29
    // 商户机具终端编号,当以机具方式接入支付宝时必传,详询支付宝技术支持
30
    private $terminalId;
31
32
    private $bizContentarr = array();
33
34
    private $bizContent = NULL;
35
36
   /* public function __construct()
37
    {
38
        $this->response = $response;
39
    }
40
41
    public function AlipayTradeRefundContentBuilder()
42
    {
43
        $this->__construct();
44
    }*/
45
46
    public function getBizContent()
47
    {
48
        if(!empty($this->bizContentarr)){
49
            $this->bizContent = json_encode($this->bizContentarr,JSON_UNESCAPED_UNICODE);
50
        }
51
        
52
        return $this->bizContent;
53
    }
54
55
    public function setTradeNo($tradeNo)
56
    {
57
        $this->tradeNo = $tradeNo;
58
        $this->bizContentarr['trade_no'] = $tradeNo;
59
    }
60
61
    public function getTradeNo()
62
    {
63
        return $this->tradeNo;
64
    }
65
66
    public function setOutTradeNo($outTradeNo)
67
    {
68
        $this->outTradeNo = $outTradeNo;
69
        $this->bizContentarr['out_trade_no'] = $outTradeNo;
70
    }
71
72
    public function getOutTradeNo()
73
    {
74
        return $this->outTradeNo;
75
    }
76
77
    public function setOperatorId($operatorId)
78
    {
79
        $this->operatorId = $operatorId;
80
        $this->bizContentarr['operator_id'] = $operatorId;
81
    }
82
83
    public function getOperatorId()
84
    {
85
        return $this->operatorId;
86
    }
87
88
    public function setOutRequestNo($outRequestNo)
89
    {
90
        $this->outRequestNo = $outRequestNo;
91
        $this->bizContentarr['out_request_no'] = $outRequestNo;
92
    }
93
94
    public function getOutRequestNo()
95
    {
96
        return $this->outRequestNo;
97
    }
98
99
    public function setRefundAmount($refundAmount)
100
    {
101
        $this->refundAmount = $refundAmount;
102
        $this->bizContentarr['refund_amount'] = $refundAmount;
103
    }
104
105
    public function getRefundAmount()
106
    {
107
        return $this->refundAmount;
108
    }
109
110
    public function setRefundReason($refundReason)
111
    {
112
        $this->refundReason = $refundReason;
113
        $this->bizContentarr['refund_reason'] = $refundReason;
114
    }
115
116
    public function getRefundReason()
117
    {
118
        return $this->refundReason;
119
    }
120
121
    public function setStoreId($storeId)
122
    {
123
        $this->storeId = $storeId;
124
        $this->bizContentarr['store_id'] = $storeId;
125
    }
126
127
    public function getStoreId()
128
    {
129
        return $this->storeId;
130
    }
131
132
    public function setTerminalId($terminalId)
133
    {
134
        $this->terminalId = $terminalId;
135
        $this->bizContentarr['terminal_id'] =$terminalId;
136
    }
137
138
    public function getTerminalId()
139
    {
140
        return $this->terminalId;
141
    }
142
}