Changeset 887 for trunk/Modules/FinanceBankAPI/Fio.php
- Timestamp:
- Nov 20, 2020, 12:08:12 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/FinanceBankAPI/Fio.php
r874 r887 5 5 class Fio 6 6 { 7 var$UserName;8 var$Password;9 var$Account;7 public string $UserName; 8 public string $Password; 9 public int $Account; 10 10 11 function Import( $TimeFrom, $TimeTo)11 function Import(int $TimeFrom, int $TimeTo): array 12 12 { 13 13 if ($this->UserName == '') throw new Exception('Missing value for UserName property.'); … … 59 59 } 60 60 61 function NoValidDataError( $Response)61 function NoValidDataError(array $Response): void 62 62 { 63 63 // Try to get error message 64 // If something go wrong fio show HTML login page and display error message65 $Response = implode('', $Response);64 // If something go wrong fio shows HTML login page and display error message 65 $Response = implode('', $Response); 66 66 $ErrorMessageStart = '<div id="oldform_warning">'; 67 67 if (strpos($Response, $ErrorMessageStart) !== false) 68 {69 $Response = substr($Response, strpos($Response, $ErrorMessageStart) + strlen($ErrorMessageStart));70 $ErrorMessage = trim(substr($Response, 0, strpos($Response, '</div>')));71 } else $ErrorMessage = '';72 throw new Exception('No valid GPC data: '.$ErrorMessage);68 { 69 $Response = substr($Response, strpos($Response, $ErrorMessageStart) + strlen($ErrorMessageStart)); 70 $ErrorMessage = trim(substr($Response, 0, strpos($Response, '</div>'))); 71 } else $ErrorMessage = ''; 72 throw new Exception('No valid GPC data: '.$ErrorMessage); 73 73 } 74 74 }
Note:
See TracChangeset
for help on using the changeset viewer.