1 | <?php |
||
23 | abstract class AbstractResponse extends OmnipayAbstractResponse implements RedirectResponseInterface |
||
24 | { |
||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $productionEndpoint = 'https://payment.datatrans.biz/upp/jsp/upStart.jsp'; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $testEndpoint = 'https://pilot.datatrans.biz/upp/jsp/upStart.jsp'; |
||
34 | |||
35 | /*** STATUS CODES ****/ |
||
36 | /** |
||
37 | * success code in response |
||
38 | */ |
||
39 | const DATATRANS_SUCCESS = '01'; |
||
40 | |||
41 | /** |
||
42 | * error code in response |
||
43 | */ |
||
44 | const DATATRANS_ERROR = '02'; |
||
45 | |||
46 | /**** ALIAS ERRORS ****/ |
||
47 | |||
48 | /** |
||
49 | * CC alias update error |
||
50 | */ |
||
51 | const DATATRANS_ALIAS_UPDATE_ERROR = '-885'; |
||
52 | |||
53 | /** |
||
54 | * CC alias insert error |
||
55 | */ |
||
56 | const DATATRANS_ALIAS_INSERT_ERROR = '-886'; |
||
57 | |||
58 | /** |
||
59 | * CC alias does not match with cardno |
||
60 | */ |
||
61 | const DATATRANS_ALIAS_CARD_NO = '-887'; |
||
62 | |||
63 | /** |
||
64 | * CC alias not found |
||
65 | */ |
||
66 | const DATATRANS_ALIAS_NOT_FOUND = '-888'; |
||
67 | |||
68 | /** |
||
69 | * CC alias error / input parameters missing |
||
70 | */ |
||
71 | const DATATRANS_ALIAS_ERROR = '-889'; |
||
72 | |||
73 | /** |
||
74 | * CC alias service is not supported |
||
75 | */ |
||
76 | const DATATRANS_ALIAS_SERVICE_NOT_SUPPORTED = '-900'; |
||
77 | |||
78 | /** |
||
79 | * generel error |
||
80 | */ |
||
81 | const DATATRANS_ALIAS_GENEREL_ERROR = '-999'; |
||
82 | |||
83 | /** |
||
84 | * @return bool |
||
85 | */ |
||
86 | 1 | public function isRedirect() |
|
90 | |||
91 | /** |
||
92 | * @return bool |
||
93 | */ |
||
94 | 1 | public function isSuccessful() |
|
98 | |||
99 | /** |
||
100 | * Gets the redirect target url. |
||
101 | */ |
||
102 | 1 | public function getRedirectUrl() |
|
106 | |||
107 | /** |
||
108 | * Get the required redirect method (either GET or POST). |
||
109 | */ |
||
110 | 1 | public function getRedirectMethod() |
|
114 | |||
115 | /** |
||
116 | * Gets the redirect form data array, if the redirect method is POST. |
||
117 | */ |
||
118 | 1 | public function getRedirectData() |
|
129 | |||
130 | /** |
||
131 | * @return string |
||
132 | */ |
||
133 | 1 | protected function getCheckoutEndpoint() |
|
143 | |||
144 | /** |
||
145 | * @return string |
||
146 | */ |
||
147 | 1 | public function getMessage() |
|
155 | |||
156 | /** |
||
157 | * @return string |
||
158 | */ |
||
159 | 1 | public function getTransactionReference() |
|
163 | |||
164 | /** |
||
165 | * @return mixed |
||
166 | */ |
||
167 | 3 | public function getStatus() |
|
171 | |||
172 | /** |
||
173 | * @return mixed |
||
174 | */ |
||
175 | public function getCode() |
||
179 | } |
||
180 |