Skip to content

Commit 7d48b44

Browse files
MC-38829: We couldn't find any records shown at Reports > Sales > Paypal Settlement
1 parent a284b63 commit 7d48b44

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/code/Magento/Paypal/Model/Report/Settlement.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,13 +603,16 @@ protected function _fileNameToDate($filename)
603603
/**
604604
* Filter SFTP file list by filename format
605605
*
606+
* Single Account format = STL-yyyymmdd.sequenceNumber.version.format
607+
* Multiple Account format = STL-yyyymmdd.reportingWindow.sequenceNumber.totalFiles.version.format
608+
*
606609
* @param array $list List of files as per $connection->rawls()
607610
* @return array Trimmed down list of files
608611
*/
609612
protected function _filterReportsList($list)
610613
{
611614
$result = [];
612-
$pattern = '/^STL-(\d{8,8})\.(\d{2,2})\.(.{3,3})\.CSV$/';
615+
$pattern = '/^STL-(\d{8,8})\.((\d{2,2})|(([A-Z])\.(\d{2,2})\.(\d{2,2})))\.(.{3,3})\.CSV$/';
613616
foreach ($list as $filename => $data) {
614617
if (preg_match($pattern, $filename)) {
615618
$result[$filename] = $data;

0 commit comments

Comments
 (0)