@@ -337,7 +337,7 @@ |
||
| 337 | 337 | } |
| 338 | 338 | |
| 339 | 339 | /** |
| 340 | - * @return null |
|
| 340 | + * @return string |
|
| 341 | 341 | */ |
| 342 | 342 | public function getCrc() |
| 343 | 343 | { |
@@ -212,7 +212,7 @@ |
||
| 212 | 212 | $attr->nodeValue = date('YmdHis'); |
| 213 | 213 | $xmlNotifyElem->appendChild($attr); |
| 214 | 214 | |
| 215 | - $this->_crc = md5(rand().time()); |
|
| 215 | + $this->_crc = md5(rand() . time()); |
|
| 216 | 216 | $attr = $xmlDoc->createAttribute('crc'); |
| 217 | 217 | $attr->nodeValue = $this->_crc; |
| 218 | 218 | $xmlNotifyElem->appendChild($attr); |
@@ -121,7 +121,7 @@ |
||
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | /** |
| 124 | - * @return mixed |
|
| 124 | + * @return Sms |
|
| 125 | 125 | */ |
| 126 | 126 | protected function prepare() |
| 127 | 127 | { |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | /** |
| 96 | - * @param $type |
|
| 96 | + * @param string $type |
|
| 97 | 97 | * @return MobilpayFile |
| 98 | 98 | */ |
| 99 | 99 | public function getFileModel($type) |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | /** |
| 85 | - * @return bool |
|
| 85 | + * @return boolean|null |
|
| 86 | 86 | */ |
| 87 | 87 | protected function decodeRequestData() |
| 88 | 88 | { |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | /** @noinspection PhpMissingParentCallCommonInspection |
| 162 | - * @return mixed |
|
| 162 | + * @return boolean |
|
| 163 | 163 | */ |
| 164 | 164 | protected function isProviderRequest() |
| 165 | 165 | { |
@@ -798,7 +798,7 @@ discard block |
||
| 798 | 798 | * |
| 799 | 799 | * @access public |
| 800 | 800 | * @param $pricesCurrency string[3] |
| 801 | - * @return true |
|
| 801 | + * @return boolean |
|
| 802 | 802 | */ |
| 803 | 803 | function setCurrency($pricesCurrency = 'RON') |
| 804 | 804 | { |
@@ -839,7 +839,7 @@ discard block |
||
| 839 | 839 | * |
| 840 | 840 | * @access public |
| 841 | 841 | * @param $pricesCurrency string[3] |
| 842 | - * @return true |
|
| 842 | + * @return boolean |
|
| 843 | 843 | */ |
| 844 | 844 | function setPricesCurrency($pricesCurrency = 'RON') |
| 845 | 845 | { |
@@ -1326,7 +1326,7 @@ discard block |
||
| 1326 | 1326 | * createHiddenField |
| 1327 | 1327 | * |
| 1328 | 1328 | * @access private |
| 1329 | - * @param $fieldName string name/id of the hidden field in html code |
|
| 1329 | + * @param string $fieldName string name/id of the hidden field in html code |
|
| 1330 | 1330 | * @param $fieldValue string field/fields value/values |
| 1331 | 1331 | * @param $isArray bool specifies if it should generate an array or not |
| 1332 | 1332 | * @return string output html code |
@@ -1357,6 +1357,7 @@ discard block |
||
| 1357 | 1357 | * |
| 1358 | 1358 | * @param $array string secret key |
| 1359 | 1359 | * @param @data string the source string that will be converted into hmac hash |
| 1360 | + * @param string $data |
|
| 1360 | 1361 | * @return string hmac hash |
| 1361 | 1362 | */ |
| 1362 | 1363 | function hmac($data) |
@@ -1338,7 +1338,7 @@ discard block |
||
| 1338 | 1338 | if ($isArray) { |
| 1339 | 1339 | for ($i = 0; $i < count($fieldValue); $i++) { |
| 1340 | 1340 | $fieldValue[$i] = htmlspecialchars($fieldValue[$i]); |
| 1341 | - $retval .= "<input name=\"".$fieldName."[]\" type=\"hidden\" value=\"".$fieldValue[$i]."\" id=\"$fieldName\">\n"; |
|
| 1341 | + $retval .= "<input name=\"" . $fieldName . "[]\" type=\"hidden\" value=\"" . $fieldValue[$i] . "\" id=\"$fieldName\">\n"; |
|
| 1342 | 1342 | //$retval .= "<input name=\"".$fieldName."[]\" type=\"text\" value=\"".$fieldValue[$i]."\" id=\"$fieldName\">\n"; |
| 1343 | 1343 | } |
| 1344 | 1344 | } else { |
@@ -1373,7 +1373,7 @@ discard block |
||
| 1373 | 1373 | $k_ipad = $key ^ $ipad; |
| 1374 | 1374 | $k_opad = $key ^ $opad; |
| 1375 | 1375 | |
| 1376 | - return md5($k_opad.pack("H*", md5($k_ipad.$data))); |
|
| 1376 | + return md5($k_opad . pack("H*", md5($k_ipad . $data))); |
|
| 1377 | 1377 | } |
| 1378 | 1378 | |
| 1379 | 1379 | /** |
@@ -1450,7 +1450,7 @@ discard block |
||
| 1450 | 1450 | $retval = ""; |
| 1451 | 1451 | //$string = htmlspecialchars($string); |
| 1452 | 1452 | $size = strlen($string); |
| 1453 | - $retval = $size.$string; |
|
| 1453 | + $retval = $size . $string; |
|
| 1454 | 1454 | |
| 1455 | 1455 | return $retval; |
| 1456 | 1456 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | - * @param $data |
|
| 57 | + * @param string $data |
|
| 58 | 58 | * @return string |
| 59 | 59 | */ |
| 60 | 60 | protected function generateHmac($data) |
@@ -175,6 +175,10 @@ |
||
| 175 | 175 | return $this->_hash($key, $str); |
| 176 | 176 | } |
| 177 | 177 | |
| 178 | + /** |
|
| 179 | + * @param string $key |
|
| 180 | + * @param null|string $data |
|
| 181 | + */ |
|
| 178 | 182 | private function _hash($key, $data) |
| 179 | 183 | { |
| 180 | 184 | $blocksize = 64; |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | 'MERCH_GMT' => '', |
| 46 | 46 | 'TIMESTAMP' => gmdate("YmdHis"), |
| 47 | 47 | 'NONCE' => md5(microtime() . mt_rand()), |
| 48 | - 'BACKREF' => '', // prenume |
|
| 48 | + 'BACKREF' => '', // prenume |
|
| 49 | 49 | ); |
| 50 | 50 | |
| 51 | 51 | $this->data['response'] = array( |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use ByTIC\Common\Payments\Gateways\Providers\AbstractGateway\Message\PurchaseRequest; |
| 6 | 6 | use ByTIC\Common\Payments\Gateways\Providers\AbstractGateway\Message\RedirectResponse\RedirectTrait; |
| 7 | -use ByTIC\Common\Payments\Models\BillingRecord\Traits\RecordTrait as BillingRecord; |
|
| 8 | 7 | use ByTIC\Common\Payments\Models\BillingRecord\Traits\RecordTrait as BillingRecordTrait; |
| 9 | 8 | use ByTIC\Common\Payments\Models\Methods\Traits\RecordTrait; |
| 10 | 9 | use ByTIC\Common\Records\Records; |
@@ -97,7 +97,7 @@ |
||
| 97 | 97 | */ |
| 98 | 98 | public function getConfirmStatusTitle() |
| 99 | 99 | { |
| 100 | - return $this->getManager()->getMessage('confirm.'.$this->getStatus()->getName()); |
|
| 100 | + return $this->getManager()->getMessage('confirm.' . $this->getStatus()->getName()); |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | /** |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | /** |
| 113 | - * @return EmailTrait |
|
| 113 | + * @return Record |
|
| 114 | 114 | */ |
| 115 | 115 | protected function newBlankEmail() |
| 116 | 116 | { |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | |
| 125 | 125 | /** |
| 126 | 126 | * @param EmailTrait $email |
| 127 | - * @return mixed |
|
| 127 | + * @return EmailTrait |
|
| 128 | 128 | */ |
| 129 | 129 | protected function hydrateEmail($email) |
| 130 | 130 | { |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | /** |
| 148 | - * @return \Record |
|
| 148 | + * @return Record |
|
| 149 | 149 | */ |
| 150 | 150 | public function getItem() |
| 151 | 151 | { |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | /** |
| 156 | - * @param Record|BuilderAwareTrait $item |
|
| 156 | + * @param BuilderAwareTrait $item |
|
| 157 | 157 | * @return $this |
| 158 | 158 | */ |
| 159 | 159 | public function setItem($item) |