1 | <?php |
||
4 | abstract class AbstractRequest extends \Omnipay\Common\Message\AbstractRequest |
||
5 | { |
||
6 | |||
7 | const DEMO_WEBSERVICE_URL = "https://gtweb2.gtbank.com/GTPayService/gettransactionstatus.json"; |
||
8 | const LIVE_WEBSERVICE_URL = "https://ibank.gtbank.com/GTPayService/gettransactionstatus.json"; |
||
9 | |||
10 | /** |
||
11 | * Generates transaction ID. Payment methods with a different need can extend this |
||
12 | * @return string Transaction reference delivered |
||
13 | */ |
||
14 | public static function generateTransactionId() |
||
18 | |||
19 | /** |
||
20 | * @return mixed |
||
21 | */ |
||
22 | 13 | public function getMerchantId() |
|
26 | |||
27 | 16 | public function setMerchantId($merchantId) |
|
31 | |||
32 | /** |
||
33 | * The value of this parameter will be the merchant-wide unique identifier of the customer. |
||
34 | * For example, for a student paying for school fees online, this may be the student's School's Registration Number |
||
35 | * @param $customerId |
||
36 | * @return \Omnipay\Common\Message\AbstractRequest |
||
37 | */ |
||
38 | 12 | public function setCustomerId($customerId) |
|
42 | |||
43 | /** |
||
44 | * @see AbstractRequest::setCustomerId() |
||
45 | * @return mixed |
||
46 | */ |
||
47 | 8 | public function getCustomerId() |
|
51 | |||
52 | /** |
||
53 | * [Optional Parameter] |
||
54 | * This describes the transaction to the customer. |
||
55 | * For example, gtpay_tranx_memo = "John Adebisi (REG13762) : 2nd Term School Fees Payment" |
||
56 | If not sent, "Purchasing from [Business-Name-Of-Merchant]" will be used |
||
57 | * @param $memo |
||
58 | * @return \Omnipay\Common\Message\AbstractRequest |
||
59 | */ |
||
60 | 12 | public function setTransactionMemo($memo) |
|
64 | |||
65 | /** |
||
66 | * @return mixed |
||
67 | * @see AbstractRequest::setTransactionMemo() |
||
68 | */ |
||
69 | public function getTransactionMemo() |
||
73 | |||
74 | /** |
||
75 | * If specified, then customer cannot choose what gateway to use for the transaction. |
||
76 | * Accepted values are "webpay" or "ibank" (Bank Transfer) only. |
||
77 | * @param $gateway |
||
78 | * @return \Omnipay\Common\Message\AbstractRequest |
||
79 | */ |
||
80 | 16 | public function setGatewayName($gateway) |
|
84 | |||
85 | /** |
||
86 | * @see AbstractRequest::setGatewayName() |
||
87 | * @return mixed |
||
88 | */ |
||
89 | 3 | public function getGatewayName() |
|
93 | |||
94 | /** |
||
95 | * Merchant can store in this the name to be displayed on the payment page for the customer. |
||
96 | * @param $customerName |
||
97 | * @return \Omnipay\Common\Message\AbstractRequest Returns a fluent Interface |
||
98 | */ |
||
99 | 12 | public function setCustomerName($customerName) |
|
103 | |||
104 | /** |
||
105 | * @see AbstractRequest::getCustomerName() |
||
106 | * @return mixed |
||
107 | */ |
||
108 | 1 | public function getCustomerName() |
|
112 | |||
113 | 1 | public function getTransactionHash() |
|
127 | |||
128 | /** |
||
129 | * set Gtpay Hash Key Given to Merchant at Setup |
||
130 | * @param $hashKey |
||
131 | * @return \Omnipay\Common\Message\AbstractRequest |
||
132 | */ |
||
133 | 16 | public function setHashKey($hashKey) |
|
137 | |||
138 | /** |
||
139 | * @see Gateway::setHashKey() |
||
140 | * @return mixed |
||
141 | */ |
||
142 | 13 | public function getHashKey() |
|
146 | |||
147 | /** |
||
148 | * @param $value |
||
149 | * @return \Omnipay\Common\Message\AbstractRequest |
||
150 | */ |
||
151 | 16 | public function setGatewayFirst($value) |
|
155 | |||
156 | /** |
||
157 | * @return mixed |
||
158 | */ |
||
159 | 2 | public function getGatewayFirst() |
|
163 | |||
164 | |||
165 | 10 | public function getWebserviceUrl() |
|
169 | } |
||
170 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.