File tree Expand file tree Collapse file tree 4 files changed +48
-85
lines changed Expand file tree Collapse file tree 4 files changed +48
-85
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Omnipay \ECPay \Message ;
4
+
5
+ use Omnipay \Common \Message \AbstractResponse as BaseAbstractResponse ;
6
+
7
+ abstract class AbstractResponse extends BaseAbstractResponse
8
+ {
9
+ /**
10
+ * Response code.
11
+ *
12
+ * @return null|string A response code from the payment gateway
13
+ */
14
+ public function getCode ()
15
+ {
16
+ return $ this ->data ['RtnCode ' ];
17
+ }
18
+
19
+ /**
20
+ * Response Message.
21
+ *
22
+ * @return null|string A response message from the payment gateway
23
+ */
24
+ public function getMessage ()
25
+ {
26
+ return $ this ->data ['RtnMsg ' ];
27
+ }
28
+
29
+ /**
30
+ * Get the transaction ID as generated by the merchant website.
31
+ *
32
+ * @return string
33
+ */
34
+ public function getTransactionId ()
35
+ {
36
+ return $ this ->data ['MerchantTradeNo ' ];
37
+ }
38
+
39
+ /**
40
+ * Gateway Reference.
41
+ *
42
+ * @return null|string A reference provided by the gateway to represent this transaction
43
+ */
44
+ public function getTransactionReference ()
45
+ {
46
+ return $ this ->data ['TradeNo ' ];
47
+ }
48
+ }
Original file line number Diff line number Diff line change 3
3
namespace Omnipay \ECPay \Message ;
4
4
5
5
use Exception ;
6
- use Omnipay \Common \Message \AbstractResponse ;
7
6
use Omnipay \Common \Message \NotificationInterface ;
8
7
use Omnipay \ECPay \Traits \HasECPay ;
9
8
@@ -26,36 +25,6 @@ public function getMessage()
26
25
return $ this ->data ['RtnMsg ' ];
27
26
}
28
27
29
- /**
30
- * Response code.
31
- *
32
- * @return null|string A response code from the payment gateway
33
- */
34
- public function getCode ()
35
- {
36
- return $ this ->data ['RtnCode ' ];
37
- }
38
-
39
- /**
40
- * Gateway Reference.
41
- *
42
- * @return null|string A reference provided by the gateway to represent this transaction
43
- */
44
- public function getTransactionReference ()
45
- {
46
- return $ this ->data ['TradeNo ' ];
47
- }
48
-
49
- /**
50
- * Get the transaction ID as generated by the merchant website.
51
- *
52
- * @return string
53
- */
54
- public function getTransactionId ()
55
- {
56
- return $ this ->data ['MerchantTradeNo ' ];
57
- }
58
-
59
28
public function getTransactionStatus ()
60
29
{
61
30
return $ this ->isSuccessful () ? self ::STATUS_COMPLETED : self ::STATUS_FAILED ;
Original file line number Diff line number Diff line change 2
2
3
3
namespace Omnipay \ECPay \Message ;
4
4
5
- use Omnipay \Common \Message \AbstractResponse ;
6
-
7
5
class FetchTransactionResponse extends AbstractResponse
8
6
{
9
7
public function isSuccessful ()
@@ -15,14 +13,4 @@ public function getCode()
15
13
{
16
14
return $ this ->data ['TradeStatus ' ];
17
15
}
18
-
19
- public function getTransactionId ()
20
- {
21
- return $ this ->data ['MerchantTradeNo ' ];
22
- }
23
-
24
- public function getTransactionReference ()
25
- {
26
- return $ this ->data ['TradeNo ' ];
27
- }
28
16
}
Original file line number Diff line number Diff line change 2
2
3
3
namespace Omnipay \ECPay \Message ;
4
4
5
- use Omnipay \Common \Message \AbstractResponse ;
6
-
7
5
class RefundResponse extends AbstractResponse
8
6
{
9
7
/**
@@ -15,44 +13,4 @@ public function isSuccessful()
15
13
{
16
14
return (string ) $ this ->getCode () === '1 ' ;
17
15
}
18
-
19
- /**
20
- * Response code.
21
- *
22
- * @return null|string A response code from the payment gateway
23
- */
24
- public function getCode ()
25
- {
26
- return $ this ->data ['RtnCode ' ];
27
- }
28
-
29
- /**
30
- * Response Message.
31
- *
32
- * @return null|string A response message from the payment gateway
33
- */
34
- public function getMessage ()
35
- {
36
- return $ this ->data ['RtnMsg ' ];
37
- }
38
-
39
- /**
40
- * Get the transaction ID as generated by the merchant website.
41
- *
42
- * @return string
43
- */
44
- public function getTransactionId ()
45
- {
46
- return $ this ->data ['MerchantTradeNo ' ];
47
- }
48
-
49
- /**
50
- * Gateway Reference.
51
- *
52
- * @return null|string A reference provided by the gateway to represent this transaction
53
- */
54
- public function getTransactionReference ()
55
- {
56
- return $ this ->data ['TradeNo ' ];
57
- }
58
16
}
You can’t perform that action at this time.
0 commit comments