@@ -32,6 +32,9 @@ |
||
| 32 | 32 | return MODULE_SECURITY_CHECK_EXTENDED_ADMIN_IMAGES_DIRECTORY_LISTING_HTTP_200; |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | + /** |
|
| 36 | + * @param null|string $url |
|
| 37 | + */ |
|
| 35 | 38 | function getHttpRequest($url) { |
| 36 | 39 | $server = parse_url($url); |
| 37 | 40 | |
@@ -32,6 +32,9 @@ |
||
| 32 | 32 | return MODULE_SECURITY_CHECK_EXTENDED_ADMIN_INCLUDES_DIRECTORY_LISTING_HTTP_200; |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | + /** |
|
| 36 | + * @param null|string $url |
|
| 37 | + */ |
|
| 35 | 38 | function getHttpRequest($url) { |
| 36 | 39 | $server = parse_url($url); |
| 37 | 40 | |
@@ -32,6 +32,9 @@ |
||
| 32 | 32 | return MODULE_SECURITY_CHECK_EXTENDED_IMAGES_DIRECTORY_LISTING_HTTP_200; |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | + /** |
|
| 36 | + * @param null|string $url |
|
| 37 | + */ |
|
| 35 | 38 | function getHttpRequest($url) { |
| 36 | 39 | $server = parse_url($url); |
| 37 | 40 | |
@@ -32,6 +32,9 @@ |
||
| 32 | 32 | return MODULE_SECURITY_CHECK_EXTENDED_INCLUDES_DIRECTORY_LISTING_HTTP_200; |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | + /** |
|
| 36 | + * @param null|string $url |
|
| 37 | + */ |
|
| 35 | 38 | function getHttpRequest($url) { |
| 36 | 39 | $server = parse_url($url); |
| 37 | 40 | |
@@ -28,6 +28,9 @@ discard block |
||
| 28 | 28 | private $_config; |
| 29 | 29 | private $_http; |
| 30 | 30 | |
| 31 | + /** |
|
| 32 | + * @param Gateway $gateway |
|
| 33 | + */ |
|
| 31 | 34 | public function __construct($gateway) |
| 32 | 35 | { |
| 33 | 36 | $this->_gateway = $gateway; |
@@ -220,7 +223,7 @@ discard block |
||
| 220 | 223 | * |
| 221 | 224 | * @ignore |
| 222 | 225 | * @param string $subPath |
| 223 | - * @return mixed |
|
| 226 | + * @return Result\Successful |
|
| 224 | 227 | */ |
| 225 | 228 | public function _doDelete($subPath) |
| 226 | 229 | { |
@@ -312,7 +315,6 @@ discard block |
||
| 312 | 315 | * verifies that a valid payment method identifier is being used |
| 313 | 316 | * @ignore |
| 314 | 317 | * @param string $identifier |
| 315 | - * @param Optional $string $identifierType type of identifier supplied, default 'token' |
|
| 316 | 318 | * @throws InvalidArgumentException |
| 317 | 319 | */ |
| 318 | 320 | private function _validateId($identifier = null, $identifierType = 'token') |
@@ -20,6 +20,9 @@ discard block |
||
| 20 | 20 | var $_identifier = 'osCommerce_PPapp_v5'; |
| 21 | 21 | var $_definitions = array(); |
| 22 | 22 | |
| 23 | + /** |
|
| 24 | + * @param integer $result |
|
| 25 | + */ |
|
| 23 | 26 | function log($module, $action, $result, $request, $response, $server, $is_ipn = false) { |
| 24 | 27 | global $customer_id; |
| 25 | 28 | |
@@ -160,6 +163,9 @@ discard block |
||
| 160 | 163 | return false; |
| 161 | 164 | } |
| 162 | 165 | |
| 166 | + /** |
|
| 167 | + * @param string $info |
|
| 168 | + */ |
|
| 163 | 169 | function getModuleInfo($module, $info) { |
| 164 | 170 | $class = 'OSCOM_PayPal_' . $module; |
| 165 | 171 | |
@@ -174,6 +180,10 @@ discard block |
||
| 174 | 180 | return $m->{'_' . $info}; |
| 175 | 181 | } |
| 176 | 182 | |
| 183 | + /** |
|
| 184 | + * @param string $module |
|
| 185 | + * @param string $type |
|
| 186 | + */ |
|
| 177 | 187 | function hasCredentials($module, $type = null) { |
| 178 | 188 | if ( !defined('OSCOM_APP_PAYPAL_' . $module . '_STATUS') ) { |
| 179 | 189 | return false; |
@@ -212,6 +222,10 @@ discard block |
||
| 212 | 222 | return true; |
| 213 | 223 | } |
| 214 | 224 | |
| 225 | + /** |
|
| 226 | + * @param string $module |
|
| 227 | + * @param string $type |
|
| 228 | + */ |
|
| 215 | 229 | function getCredentials($module, $type) { |
| 216 | 230 | if ( constant('OSCOM_APP_PAYPAL_' . $module . '_STATUS') == '1' ) { |
| 217 | 231 | if ( $type == 'email') { |
@@ -359,6 +373,11 @@ discard block |
||
| 359 | 373 | } |
| 360 | 374 | |
| 361 | 375 | // APP calls require $server to be "live" or "sandbox" |
| 376 | + /** |
|
| 377 | + * @param string $module |
|
| 378 | + * @param string $call |
|
| 379 | + * @param string $server |
|
| 380 | + */ |
|
| 362 | 381 | function getApiResult($module, $call, $extra_params = null, $server = null, $is_ipn = false) { |
| 363 | 382 | if ( $module == 'APP' ) { |
| 364 | 383 | $function = 'OSCOM_PayPal_Api_' . $call; |
@@ -385,6 +404,9 @@ discard block |
||
| 385 | 404 | return $result['res']; |
| 386 | 405 | } |
| 387 | 406 | |
| 407 | + /** |
|
| 408 | + * @param string $parameters |
|
| 409 | + */ |
|
| 388 | 410 | function makeApiCall($url, $parameters = null, $headers = null, $opts = null) { |
| 389 | 411 | $server = parse_url($url); |
| 390 | 412 | |
@@ -467,6 +489,10 @@ discard block |
||
| 467 | 489 | return $result; |
| 468 | 490 | } |
| 469 | 491 | |
| 492 | + /** |
|
| 493 | + * @param string $link |
|
| 494 | + * @param string $type |
|
| 495 | + */ |
|
| 470 | 496 | function drawButton($title = null, $link = null, $type = null, $params = null, $force_css = false) { |
| 471 | 497 | $colours = array('success' => '#1cb841', |
| 472 | 498 | 'error' => '#ca3c3c', |
@@ -762,6 +788,9 @@ discard block |
||
| 762 | 788 | } |
| 763 | 789 | } |
| 764 | 790 | |
| 791 | + /** |
|
| 792 | + * @param string $filename |
|
| 793 | + */ |
|
| 765 | 794 | public function loadLanguageFile($filename, $lang = null) { |
| 766 | 795 | global $language; |
| 767 | 796 | |
@@ -803,6 +832,9 @@ discard block |
||
| 803 | 832 | } |
| 804 | 833 | } |
| 805 | 834 | |
| 835 | + /** |
|
| 836 | + * @param string $key |
|
| 837 | + */ |
|
| 806 | 838 | function getDef($key, $values = null) { |
| 807 | 839 | $def = isset($this->_definitions[$key]) ? $this->_definitions[$key] : $key; |
| 808 | 840 | |
@@ -873,6 +905,9 @@ discard block |
||
| 873 | 905 | return str_replace('/', DIRECTORY_SEPARATOR, $pathname); |
| 874 | 906 | } |
| 875 | 907 | // OSCOM v2.2rc2a compatibility |
| 908 | + /** |
|
| 909 | + * @return string |
|
| 910 | + */ |
|
| 876 | 911 | function getIpAddress() { |
| 877 | 912 | if ( function_exists('tep_get_ip_address') ) { |
| 878 | 913 | return tep_get_ip_address(); |