Package DE_EPAGES::SIA::API::Registration::SFTPHandler
Class used to handle format of file based communication with SIA.
Functions
- BUILD
- DEMOLISH
- addDataToUploadFile
- createRegistrationFile
- deleteFile
- deleteFilesFromSIA
- downloadFilesFromSIA
- existsRemoteFile
- uploadFile
BUILD
Called by Moose after constructor. Creates a temporary folder for upload/download.
Syntax |
BUILD; |
DEMOLISH
Moose destructor. Deletes the temporary folder used for upload/download.
Syntax |
DEMOLISH; |
addDataToUploadFile
Adds MerchantData to the upload file to register a merchant with SIA.
Syntax |
$PaymentMethod->addDataToUploadFile; |
Input |
|
Return |
|
createRegistrationFile
creates the registration file with header for upload
Syntax |
$SFTPHandler->createRegistrationFile(); |
deleteFile
delete remote file
Syntax |
$SFTPHandler->deleteFile(); |
deleteFilesFromSIA
Deletes all the given filenames from the SIA FTP server.
Syntax |
$SFTPHandler->deleteFilesFromSIA(\@FileNamesToDelete); |
Example |
$SFTPHandler->deleteFilesFromSIA(qw (foo.txt bar.txt baz.txt)); |
downloadFilesFromSIA
Downloads the response files from the SIA FTP server (configured in SIAConfig).
Syntax |
$SFTPHandler->downloadFilesFromSIA(); |
Return |
|
existsRemoteFile
checks if remote file exists
Syntax |
$SFTPHandler->existsRemoteFile(); |
Return |
|
uploadFile
uploads file which was created at the begining to ftp server configured in sia config
Syntax |
$SFTPHandler->uploadFile(); |