From 7861be3a90e382e052c43a508f981358e8a7955b Mon Sep 17 00:00:00 2001 From: Adam Zoldak Date: Wed, 12 Feb 2020 15:25:27 +0100 Subject: [PATCH] Move confirmation emails configs to their own category All emails are also documented with examples for users of the feature to distinguish which email should be processed by which processor. remp/crm#1061 --- README.md | 20 +++ docs/_static/emails/slsp.eml | 111 +++++++++++++++ docs/_static/emails/slsp_notification.eml | 128 ++++++++++++++++++ src/lang/slsp_sporopay.en_US.neon | 30 ++++ src/lang/slsp_sporopay.sk_SK.neon | 30 ++++ .../MailDownloader/SlspMailDownloader.php | 10 +- .../SlspNotificationMailDownloader.php | 10 +- src/seeders/ConfigsSeeder.php | 109 +++++++++++++++ 8 files changed, 438 insertions(+), 10 deletions(-) create mode 100644 docs/_static/emails/slsp.eml create mode 100644 docs/_static/emails/slsp_notification.eml diff --git a/README.md b/README.md index 02dd5bb..ceae26a 100644 --- a/README.md +++ b/README.md @@ -1 +1,21 @@ # CRM SLSP Sporopay Module + +## Confirmation e-mails + +Examples of confirmation mails received from banks. Every type of mail has it's own IMAP access configurable in application configuration. + +### SLSP + +**From:** vypis (at) slsp (dot) sk + +**Subject:** Informacia o realizacii platby + +[Example e-mail file](docs/_static/emails/slsp.eml) + +### SLSP Notification + +**From:** notifikacie (at) slsp (dot) sk + +**Subject:** Notifikacia + +[Example e-mail file](docs/_static/emails/slsp_notification.eml) diff --git a/docs/_static/emails/slsp.eml b/docs/_static/emails/slsp.eml new file mode 100644 index 0000000..0de27e4 --- /dev/null +++ b/docs/_static/emails/slsp.eml @@ -0,0 +1,111 @@ +Delivered-To: platbysys@example.com +Received: by 0:0:0:0:0:0:0:0 with SMTP id b18csp1070184otf; + Sat, 30 Nov 2019 23:06:16 -0800 (PST) +X-Received: by 0:0:0:: with SMTP id w7mr1737324wrs.276.1575183976572; + Sat, 30 Nov 2019 23:06:16 -0800 (PST) +ARC-Seal: i=2; a=rsa-sha256; t=1575183976; cv=pass; + d=google.com; s=arc-20160816; + b=GMtpGWUxjOKKI6bWCB9udT8QRTOQoQfcphakVrc0hrep274Fw0f0TvJqMzf96Q7zw6 + sh86db+mO2OgZc5rdfB7DqL90+Iuxgyn6zihABaXvqFBQ7PN4agOI0ETSyjDTfCm7wEJ + nnwdsj3vbK4qb4FVau3UIDVsoPrvnmVbXADCHeatwNylzwJEi2NJxaOp4l/cvjzrdHeH + yXinOSu4md14YXQKqnm6Vba6YK5FOnOt3Ia3+xj1FmxhHEk6XLgd4SKk+DS4Ix5GqOx6 + Z29zr0PJKu+/bK9XlNLMvPKa99guWDFzrO2yFmbeR1/WEnlsz1WBRH6qwWJUZhtTN1TR + Fn3w== +ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=content-transfer-encoding:mime-version:subject:message-id:to:from + :dkim-signature:date:delivered-to; + bh=UCJK3+JVW1qoFrN84Uv309fsqyorKeD8XK8e/7ywVs8=; + b=txv764XwztZshykL1zz0QGuNjV9f0QeUIqApntqCMmiIINN8b7wGpLjkjrD4slONrH + CAN/en58HU6UT80smH8s2Fan097g41mFCY/Wsbu/xN87qESlSxLaq/2fG8FWgQNO9l18 + TnjoS4M5yYVIO/iKJT3LTs/QEEeC6Y35C4zLrnMkLQV97GZJJ5r+p2lcsfkqLey4s1BY + jwjei73NRSgC9VQ7x3DlN6bOL8XdluDE+OxXUz+AqY9HCnXwS+JjURwvtTeQBoyeFjnK + lWDy4LFsQMmeH/Ok4ESNoE78pIxWcNudHkxpFVFFZo/sxVTU0DRqZqlRFiDg3ZI4YYy5 + B+Vw== +ARC-Authentication-Results: i=2; mx.google.com; + dkim=pass header.i=@example.com header.s=default header.b=goscjZhX; + arc=pass (i=1 spf=pass spfdomain=example.com dkim=pass dkdomain=example.com dmarc=pass fromdomain=example.com); + spf=pass (google.com: domain of platby+caf_=platbysys=example.com@example.com designates 127.0.0.1 as permitted sender) smtp.mailfrom="platby+caf_=platbysys=example.com@example.com"; + dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=example.com +Return-Path: +Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [127.0.0.1]) + by mx.google.com with SMTPS id q3sor4299286wmd.1.2019.11.30.23.06.16 + for + (Google Transport Security); + Sat, 30 Nov 2019 23:06:16 -0800 (PST) +Received-SPF: pass (google.com: domain of platby+caf_=platbysys=example.com@example.com designates 127.0.0.1 as permitted sender) client-ip=127.0.0.1; +Authentication-Results: mx.google.com; + dkim=pass header.i=@example.com header.s=default header.b=goscjZhX; + arc=pass (i=1 spf=pass spfdomain=example.com dkim=pass dkdomain=example.com dmarc=pass fromdomain=example.com); + spf=pass (google.com: domain of platby+caf_=platbysys=example.com@example.com designates 127.0.0.1 as permitted sender) smtp.mailfrom="platby+caf_=platbysys=example.com@example.com"; + dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=example.com +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20161025; + h=x-gm-message-state:delivered-to:date:dkim-signature:from:to + :message-id:subject:mime-version:content-transfer-encoding; + bh=UCJK3+JVW1qoFrN84Uv309fsqyorKeD8XK8e/7ywVs8=; + b=HhuUlBM+HjxRcl4HDXoBB5htP4r+9zB9ML3RVvTXVUYbzBMCGK5pGCqwZD3VrqOroO + ts8XOyQTLhCi/unjDrymX2QJBl424lKhrqtqe7lX/bmvshBoS4OEFXF95m2wCLSUCCUI + ifXseQwDsSv/lUZlZrzk4/sx7FCaie2VX1GRImzORCXWIcxsyjM6tF/4Dy0tWChlYOo9 + gYU2JSZLOKzQFHqVRjnoQt0N22v2BBcdmtstBMOVOB0ZCnwrAIL8kZl3p2FLTLleRJe6 + hKXKOHSIj38hozf1Y8ywnuQQYqYhmiofI4CBF+ywBG8zhCIu5ddLATd9PpUqvKW7r97f + wiiw== +X-Gm-Message-State: APjAAAV9EVy0Wh0pLs3TOLB0euNHyZx2RkKBPYq8wwCaIBCBLxACUF6o + sz3xxgcTS/ClqkbG0+cFgbSF1e7nJMkPLxi3HbchtZRlLua+xdj7/g== +X-Received: by 2002:a1c:7c06:: with SMTP id x6mr23216353wmc.34.1575183976295; + Sat, 30 Nov 2019 23:06:16 -0800 (PST) +X-Forwarded-To: platbysys@example.com +X-Forwarded-For: platby@example.com platbysys@example.com +Delivered-To: platby@example.com +Received: by 2002:a5d:48cc:0:0:0:0:0 with SMTP id p12csp10743252wrs; + Sat, 30 Nov 2019 23:06:14 -0800 (PST) +X-Google-Smtp-Source: APXvYqyn0zmVUW/gwjQIvUOvrvadQWrxLAtmgyMlMH3t0aEcL4Puk5E4tnEjDKtKoN4UHqEoeLII +X-Received: by 2002:a5d:4749:: with SMTP id o9mr15086553wrs.242.1575183974828; + Sat, 30 Nov 2019 23:06:14 -0800 (PST) +ARC-Seal: i=1; a=rsa-sha256; t=1575183974; cv=none; + d=google.com; s=arc-20160816; + b=MNuMWyislw3Llx3B6OglmweYZ2RdEMxrOiD+7gFQ5bJsOFkTwwQwKzpUavwwoEjEF5 + 7xoEVX/3FBEG7nKEGQpGt+0g/BeCG5v9m7dm+GXdsF+uOz63Pps8CSs6I4mZ4u1t5SEb + 6Mfrp95cWA73/V3wiwtwzX7MwOEZIUp3MGhfBZnQkeMz29aqktS4kRpN+xzbwgB21mpk + rrJfxIqnDCZ4qUFG3Zh0Yz9Y/rycGP1OQL6Ov2kWYCEnCuA5/ni2++lbK/hrshgwPxX/ + nRDZABSSw2GupVV0NZdWYQjMpQYBPsVJswA2iWF5DtbPX4X3vmHtBaGvDF6v8kKlA2n5 + u4uA== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=content-transfer-encoding:mime-version:subject:message-id:to:from + :dkim-signature:date; + bh=UCJK3+JVW1qoFrN84Uv309fsqyorKeD8XK8e/7ywVs8=; + b=QU27BtiLsn7qqc4NaWk0QUlAzzF964dFOsJoYHOmAu+D1jXg+5mcuDP0lcLE1TXMjn + q5FE/wN0tdxhHbnTz9ti6AgH02LuZvmaBIIEzGlqs6yv4VR97uRvW6ZHClHW6xMA6Z0H + BXDCzFCr3UEzuBd7PKniyz4VYHrKeKvylGUB+qEbYPVZJJhnUWNeI5UaS9JE8iHHB2ZD + 240nEBQlmOebys1kXBGucect5QtQRAg+/R+okpPEIJ+tYJhX9KmYdoTQCdcOU+EX2ANa + 7CtEQ1Ngwm3wlEb5EiFzRUGJug0Tm8DiLm4E1inPn87yxNvWPQo3pBq3QhVowJc3CoDr + WPVw== +ARC-Authentication-Results: i=1; mx.google.com; + dkim=pass header.i=@example.com header.s=default header.b=goscjZhX; + spf=pass (google.com: domain of vypis@example.com designates 127.0.0.1 as permitted sender) smtp.mailfrom=vypis@example.com; + dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=example.com +Return-Path: +Received: from smtp1.example.com (smtp1.example.com. [127.0.0.1]) + by mx.google.com with ESMTPS id f13si841808wmj.24.2019.11.30.23.06.14 + for + (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Sat, 30 Nov 2019 23:06:14 -0800 (PST) +Received-SPF: pass (google.com: domain of vypis@example.com designates 127.0.0.1 as permitted sender) client-ip=127.0.0.1; +Date: Sun, 1 Dec 2019 08:06:14 +0100 (CET) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=example.com; s=default; + t=1575183974; bh=UCJK3+JVW1qoFrN84Uv309fsqyorKeD8XK8e/7ywVs8=; + h=From:To:Subject:From; + b=goscjZhXqIY4X0mpUy8dK/BeJ6an5HqgKNsOszelPxTwtGCyCTM9Xs8sav6HJdyw7 + mNxqnnFNEzdXIwG65pOM8oYbiohOzRQctdiEu5httbB0HPXDjZXqI1/cHzSVPhlycW + 8tZhGmuLPrt2gu+WetDcDkZbwVwoOIp3aXQ4fubYSgAKG1Iq+zadvyzv2ZlCUdeQ06 + 6lFePIi4ouiDhNg3ILD15lmFO6CHGF5D2orp2yE847CMVHuuczIcrSPsAjNTGqsTLY + ZZ29YThfCiE7NAj4Cqija/I7b3Lc4ncJnPaCgWWNITxJJVd56u/SRce7wo6e+3Q5Bd + 3Id5+DHdfBTsg== +From: vypis@example.com +To: platby@example.com +Message-ID: <1552695734.790236.1575183974452@sk01sms01v.dc.example.com> +Subject: Informacia o realizacii platby +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +000000;0177780000;0900;12.00;EUR;9911912324;0000000123;OK;OK;xDCBmygVheJfzKVXbtwxPSa2l1KYK+dT diff --git a/docs/_static/emails/slsp_notification.eml b/docs/_static/emails/slsp_notification.eml new file mode 100644 index 0000000..484c0cf --- /dev/null +++ b/docs/_static/emails/slsp_notification.eml @@ -0,0 +1,128 @@ +Delivered-To: platbysys@example.com +Received: by 0:0:0:0:0:0:0:0 with SMTP id b18csp5956204otf; + Tue, 10 Dec 2019 08:54:05 -0800 (PST) +X-Received: by 2002:a1c:5603:: with SMTP id k3mr6539749wmb.150.1575996845167; + Tue, 10 Dec 2019 08:54:05 -0800 (PST) +ARC-Seal: i=2; a=rsa-sha256; t=1575996845; cv=pass; + d=google.com; s=arc-20160816; + b=0E7vaLUF+An55iUA1qw82KVFrITbelEjxb28Q/Eny192pGRVr+ve/t4Nb5k7NQP2ec + t8EZE2tFnoGYTC+6RM9rgwWGSF0gcXFpyw8kp3GMy8zqHVxihl35pY9S81OVj2k6PUIP + tIm81dYRM3h+qdclfdebxbmkPtq4Z91gVzRL+OBruJtCouX8YbxG6ma5+O+7rBN+CxHG + E7LlrirYpz47gcdHwh/2z1EKO6ItIXGShyyJhfULkWmHrkwF6bISnaPMOHN/uxZb8vgK + Jtci7fQQZFkthmPesmD1EvxQWkHwLpn/naaL7OA061HzNVR8pG50aNXk+inHzvK7zdDg + VA9w== +ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=mime-version:subject:message-id:to:from:dkim-signature:date + :delivered-to; + bh=61mdlAdnzkPVwSs8Isn4G5MXTkmhxhYjMp3Rf8RStzE=; + b=pmLirOl9R3/2zgN+p7gKU/eRoQtxV1JXgKDlT2tuN6Vqx3ElSe/y89vB3pfizRqM7I + zew4TXTdqLk2L4Uas8U/8Vt7pMUXmyeMqdBmBilm7p3mongmu/hVO6Btd9Kt1okgVDuq + ZQnETHMJ6Croxai8GNwj7ApSfeZ/uFUoKpHM8hKNMKO9eeFqJrTzpeSJhErVJnk+zzh9 + XbubsxD7kQf5IEF2XIcw93WNmNP+MVsiBDvGBwDW0J9hnssZzqAK/IeP/ov6M3JYwzu/ + +O9+Sq9xgM04FOA47LYyZFjlEUBmj6ItsTKZcrgAZYtx6MH5QcNcjA3T6omQ8WdGrW3C + ZnuQ== +ARC-Authentication-Results: i=2; mx.google.com; + dkim=pass header.i=@example.com header.s=default header.b="oX/r+ODw"; + arc=pass (i=1 spf=pass spfdomain=example.com dkim=pass dkdomain=example.com dmarc=pass fromdomain=example.com); + spf=pass (google.com: domain of platby+caf_=platbysys=example.com@example.com designates 127.0.0.1 as permitted sender) smtp.mailfrom="platby+caf_=platbysys=example.com@example.com"; + dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=example.com +Return-Path: +Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [127.0.0.1]) + by mx.google.com with SMTPS id o13sor2413876wrw.46.2019.12.10.08.54.04 + for + (Google Transport Security); + Tue, 10 Dec 2019 08:54:05 -0800 (PST) +Received-SPF: pass (google.com: domain of platby+caf_=platbysys=example.com@example.com designates 127.0.0.1 as permitted sender) client-ip=127.0.0.1; +Authentication-Results: mx.google.com; + dkim=pass header.i=@example.com header.s=default header.b="oX/r+ODw"; + arc=pass (i=1 spf=pass spfdomain=example.com dkim=pass dkdomain=example.com dmarc=pass fromdomain=example.com); + spf=pass (google.com: domain of platby+caf_=platbysys=example.com@example.com designates 127.0.0.1 as permitted sender) smtp.mailfrom="platby+caf_=platbysys=example.com@example.com"; + dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=example.com +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20161025; + h=x-gm-message-state:delivered-to:date:dkim-signature:from:to + :message-id:subject:mime-version; + bh=61mdlAdnzkPVwSs8Isn4G5MXTkmhxhYjMp3Rf8RStzE=; + b=QCEVe+4xY+NarXGqJ53gnMLRZp1RSYcNzLRzxeYhnp9XXYSj4MiB5IOR5QlphTxSry + tHbPDUnfQw1Fhy3GJ8sjmMQzaLUQthaal1nbF2Pn6G9eId7+e+6xFqXpx/jzWlYPHJzo + z1U0iAqp0sQhdkcvwwa1M49UR+iIXQNgDT5nBvVG5DC/Bo2ozdhsrw8SOcKvgXAit4o4 + kAjYDdTSgsDm5ioQ6OoEEuYQj4p8crOTDftp55WZT4kmvodo0eOoiaahz8aGDiFPsVjQ + EuSytoWFlyGaPKuQIqiJbcPYKDChPD0XXhPRpTu4NGtuS5oDXdyxcw/mxxRDVxFzqhrv + xFfw== +X-Gm-Message-State: APjAAAUZItbmJY+xkzpOZp3sOmhqcaW1UrqhFZLLwpvbN4b4+MOrqBvt + MeVP0eZP3Pzqopis63IQDPi6rT+aJuXEYUd/TDqar7GwnE0vuL77JA== +X-Received: by 2002:adf:9427:: with SMTP id 36mr4394320wrq.166.1575996844844; + Tue, 10 Dec 2019 08:54:04 -0800 (PST) +X-Forwarded-To: platbysys@example.com +X-Forwarded-For: platby@example.com platbysys@example.com +Delivered-To: platby@example.com +Received: by 2002:adf:ed0f:0:0:0:0:0 with SMTP id a15csp5841913wro; + Tue, 10 Dec 2019 08:54:03 -0800 (PST) +X-Google-Smtp-Source: APXvYqxbJTLrk429TE9XGcY8HB+KVA30k+oBZ0somhXko6poPUa/ausePV0M9F9Bbqqe+pAADJlR +X-Received: by 2002:a5d:4d0e:: with SMTP id z14mr4241574wrt.208.1575996843056; + Tue, 10 Dec 2019 08:54:03 -0800 (PST) +ARC-Seal: i=1; a=rsa-sha256; t=1575996843; cv=none; + d=google.com; s=arc-20160816; + b=YHXCHyOuE+lkGBrgkC4ItqoNe5xN8tWlVuXHQ84wPkNQSuAHhz+16f7tIkTz6m+K0S + xQqZJJl6hAkaU0wNkySf/bzYnfU+wnbW6vvWGSw5eLOGAAFY4K45otJwfCZJcaGG6sWu + kuIWfYtGqtPCSpAz9Bye1BKx70Tob+4Wl6S26zMNyJnEGbdfgviXthMm03wzmo0y/JjC + RP5FJeuc3uZJfTa1Njaf9ZDDUQ+gkVOSSZRPUEsMBFiLv1GoEJ0EbD9LED2Ya/hiZIKT + M9hE8JR1lAzhLe6Ojt6kx7N7bFWnl9ZgLR0tQZkRjfzZIBJfzAd6RPjwSruLPvflOpZH + j0ZA== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=mime-version:subject:message-id:to:from:dkim-signature:date; + bh=61mdlAdnzkPVwSs8Isn4G5MXTkmhxhYjMp3Rf8RStzE=; + b=q6HH5jiMODuMcNL72AO6C2Uli+Z+U8MWaCw/j5bQF4UHoh/WNAK06hDYHKJS5y2rqd + A/oqOzEjShy4yXXa5a7KcUil9RdUo8yBO6zTVoLjCSKoM8i1iAGnT8CAroAkB5OAfGwb + 0EDsW8AGNmPWaSM4JEYE9nxgUeR0v/bXWVDoCCBQfixV6tlTVq0QnCjL5QJTgqYZwVwX + NEkoZXKhvjHpqDDAP1dJzi36rQwhGGrVbqLD4qbLLoUcI0NaYeZ38solwn5dxWQzf2JU + OqQBaOxlIOt4IALDKJHTdLCleUys/htMqUy8Dp9drsGGvdnbIKUKEq9kMYVGuOdrvS8y + hKLw== +ARC-Authentication-Results: i=1; mx.google.com; + dkim=pass header.i=@example.com header.s=default header.b="oX/r+ODw"; + spf=pass (google.com: domain of notifikacie@example.com designates 127.0.0.1 as permitted sender) smtp.mailfrom=notifikacie@example.com; + dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=example.com +Return-Path: +Received: from smtp1.example.com (smtp1.example.com. [127.0.0.1]) + by mx.google.com with ESMTPS id g6si3353521wrs.180.2019.12.10.08.54.02 + for + (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Tue, 10 Dec 2019 08:54:03 -0800 (PST) +Received-SPF: pass (google.com: domain of notifikacie@example.com designates 127.0.0.1 as permitted sender) client-ip=127.0.0.1; +Date: Tue, 10 Dec 2019 17:54:02 +0100 (CET) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=example.com; s=default; + t=1575996842; bh=61mdlAdnzkPVwSs8Isn4G5MXTkmhxhYjMp3Rf8RStzE=; + h=From:To:Subject:From; + b=oX/r+ODw3lUdqf3ZP2VaZBOEB42DAdLLb870hF3wjjANMC0YTNM3lxPsDI1xVgD/E + ML8mhAPoCmmSzXw1jWKXn5avUjrB1jJ3XOdWcK2vUJogf5slt+zzRplUv5BCijw5AR + DHLwlpjyHPwkB1UkyXr3K+F661ygk0p7rqODfyrYTvdKLm5qbHngMB1n3RqmkzR+/L + IIZoihD7KppwrQgugZq52SXPfu3C/T/5i1qeb/jmu74y+Zjrz8t2A6zHKdyWLUChSy + 1b8DTa1PddPfExApfAGmvHExDPhatfX3WZanZE8o63cIgui4PdWM89F7Q7h3QN1ru0 + z6YNq9CPIexEQ== +From: =?UTF-8?Q?Notifik=C3=A1cie_SLSP?= +To: platby@example.com +Message-ID: <229026156.332214.1575996842593@sk01sms01v.dc.example.com> +Subject: Notifikacia +MIME-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_332213_11267809.1575996842591" + +------=_Part_332213_11267809.1575996842591 +Content-Type: text/plain; charset=us-ascii +Content-Transfer-Encoding: 7bit + +Sifrovana sprava sa nachadza v prilohe. / Encrypted message is attached. +------=_Part_332213_11267809.1575996842591 +Content-Type: application/octet-stream; name=K201210.zip +Content-Transfer-Encoding: base64 +Content-Disposition: attachment; filename=K201210.zip + +UEsDBBQAAAAIAK9STlBrf1TD8AAAAKcCAAALABwASzIwMTIxMC50eHRVVAkAA5pmRl7xZUZedXgL +AAEE6AMAAAToAwAArVJBasMwELwX+od9gVkpke3VMfTUQC6mPvRSVOLSxCYbYsUQvbDf6K39QiHQ +DW2FGtqcPBexmtnd0SCALyiYNeGZPQ/c+80RhrZzS/gDCpVW9HPEW50hXl/FuprjFAkjiIzSkyKH +BQ9u3cIth+Yp0deVJVKKtKhymFf2u2+CJVSxEjLpAUiLhxGQzlu8Bh7g483vLczuoChl+dQg6VT0 +4nrYds5vJLSVlVAyCULjKZ/CGrSaUnV9yvQA/ZY7GXoeGdTHx2YXaTxjx37fvVh2nlsxkpcGTUa/ +1t2sxEe4rKk7J3/lHcJyx+vmH9E4vj8BUEsBAh4DFAAAAAgAr1JOUGt/VMPwAAAApwIAAAsAGAAA +AAAAAQAAALSBAAAAAEsyMDEyMTAudHh0VVQFAAOaZkZedXgLAAEE6AMAAAToAwAAUEsFBgAAAAAB +AAEAUQAAADUBAAAAAA== +------=_Part_332213_11267809.1575996842591-- diff --git a/src/lang/slsp_sporopay.en_US.neon b/src/lang/slsp_sporopay.en_US.neon index d6721c5..2fdc166 100644 --- a/src/lang/slsp_sporopay.en_US.neon +++ b/src/lang/slsp_sporopay.en_US.neon @@ -14,3 +14,33 @@ config: mode: name: "SLSP Sporopay mód" description: 'Mode in which the gateway is running ("test" or "live")' + slsp_confirmation_host: + name: SLSP host + description: "IMAP connection host (eg. imap.gmail.com) (info)" + slsp_confirmation_port: + name: SLSP port + description: "IMAP connection port (eg. 993) (info)" + slsp_confirmation_username: + name: SLSP username + description: "IMAP prihlasovacie meno pre pripojenie (napr. example@gmail.com) (info)" + slsp_confirmation_password: + name: SLSP password + description: "IMAP heslo pre pripojenie (napr. password) (info)" + slsp_confirmation_processed_folder: + name: SLSP folder + description: "IMAP folder to which the email will be moved after processing (napr. INBOX/processed) (info)" + slsp_notification_confirmation_host: + name: SLSP notification host + description: "IMAP connection host (eg. imap.gmail.com) (info)" + slsp_notification_confirmation_port: + name: SLSP notification port + description: "IMAP connection port (eg. 993) (info)" + slsp_notification_confirmation_username: + name: SLSP notification username + description: "IMAP prihlasovacie meno pre pripojenie (napr. example@gmail.com) (info)" + slsp_notification_confirmation_password: + name: SLSP notification password + description: "IMAP heslo pre pripojenie (napr. password) (info)" + slsp_notification_confirmation_processed_folder: + name: SLSP notification folder + description: "IMAP folder to which the email will be moved after processing (napr. INBOX/processed) (info)" diff --git a/src/lang/slsp_sporopay.sk_SK.neon b/src/lang/slsp_sporopay.sk_SK.neon index 28621e8..943602b 100644 --- a/src/lang/slsp_sporopay.sk_SK.neon +++ b/src/lang/slsp_sporopay.sk_SK.neon @@ -14,3 +14,33 @@ config: mode: name: "SLSP Sporopay mód" description: 'Mód, v ktorom platobná brána bude inicializovaná ("test" alebo "live")' + slsp_confirmation_host: + name: SLSP host + description: "IMAP host pre pripojenie (napr. imap.gmail.com) (info)" + slsp_confirmation_port: + name: SLSP port + description: "IMAP port pre pripojenie (napr. 993) (info)" + slsp_confirmation_username: + name: SLSP username + description: "IMAP prihlasovacie meno pre pripojenie (napr. example@gmail.com) (info)" + slsp_confirmation_password: + name: SLSP password + description: "IMAP heslo pre pripojenie (napr. password) (info)" + slsp_confirmation_processed_folder: + name: SLSP zložka + description: "IMAP zložka do ktoreho sa presunie email po spracovani (napr. INBOX/processed) (info)" + slsp_notification_confirmation_host: + name: SLSP notifikacia host + description: "IMAP host pre pripojenie (napr. imap.gmail.com) (info)" + slsp_notification_confirmation_port: + name: SLSP notifikacia port + description: "IMAP port pre pripojenie (napr. 993) (info)" + slsp_notification_confirmation_username: + name: SLSP notifikacia username + description: "IMAP prihlasovacie meno pre pripojenie (napr. example@gmail.com) (info)" + slsp_notification_confirmation_password: + name: SLSP notifikacia password + description: "IMAP heslo pre pripojenie (napr. password) (info)" + slsp_notification_confirmation_processed_folder: + name: SLSP notifikacia zložka + description: "IMAP zložka do ktoreho sa presunie email po spracovani (napr. INBOX/processed) (info)" diff --git a/src/model/MailDownloader/SlspMailDownloader.php b/src/model/MailDownloader/SlspMailDownloader.php index c3298b3..1de27d4 100644 --- a/src/model/MailDownloader/SlspMailDownloader.php +++ b/src/model/MailDownloader/SlspMailDownloader.php @@ -22,11 +22,11 @@ class SlspMailDownloader public function __construct(ApplicationConfig $config) { - $this->imapHost = $config->get('confirmation_mail_host'); - $this->imapPort = $config->get('confirmation_mail_port'); - $this->username = $config->get('confirmation_mail_username'); - $this->password = $config->get('confirmation_mail_password'); - $this->processedFolder = $config->get('confirmation_mail_processed_folder'); + $this->imapHost = $config->get('slsp_confirmation_host'); + $this->imapPort = $config->get('slsp_confirmation_port'); + $this->username = $config->get('slsp_confirmation_username'); + $this->password = $config->get('slsp_confirmation_password'); + $this->processedFolder = $config->get('slsp_confirmation_processed_folder'); } public function download($callback) diff --git a/src/model/MailDownloader/SlspNotificationMailDownloader.php b/src/model/MailDownloader/SlspNotificationMailDownloader.php index 34f7964..acdf3e2 100644 --- a/src/model/MailDownloader/SlspNotificationMailDownloader.php +++ b/src/model/MailDownloader/SlspNotificationMailDownloader.php @@ -29,11 +29,11 @@ public function __construct($tempDir, ApplicationConfig $config) { $this->tempDir = $tempDir; - $this->imapHost = $config->get('confirmation_mail_host'); - $this->imapPort = $config->get('confirmation_mail_port'); - $this->username = $config->get('confirmation_mail_username'); - $this->password = $config->get('confirmation_mail_password'); - $this->processedFolder = $config->get('confirmation_mail_processed_folder'); + $this->imapHost = $config->get('slsp_notification_confirmation_host'); + $this->imapPort = $config->get('slsp_notification_confirmation_port'); + $this->username = $config->get('slsp_notification_confirmation_username'); + $this->password = $config->get('slsp_notification_confirmation_password'); + $this->processedFolder = $config->get('slsp_notification_confirmation_processed_folder'); } public function download($callback) diff --git a/src/seeders/ConfigsSeeder.php b/src/seeders/ConfigsSeeder.php index 6cee7b3..80b337d 100644 --- a/src/seeders/ConfigsSeeder.php +++ b/src/seeders/ConfigsSeeder.php @@ -77,6 +77,115 @@ public function seed(OutputInterface $output) $sorting++, 'slsp_sporopay.config.mode.description' ); + + $categoryName = 'payments.config.category_confirmation'; + $category = $category = $this->configCategoriesRepository->loadByName($categoryName); + if (!$category) { + $category = $category = $this->configCategoriesRepository->add($categoryName, 'fa fa-check-double', 1600); + $output->writeln(' * config category Potvrdzovacie e-maily created'); + } else { + $output->writeln(' * config category Potvrdzovacie e-maily exists'); + } + + $this->addPaymentConfig( + $output, + $category, + 'slsp_confirmation_host', + 'slsp_sporopay.config.slsp_confirmation_host.name', + '', + 100, + 'slsp_sporopay.config.slsp_confirmation_host.description' + ); + + $this->addPaymentConfig( + $output, + $category, + 'slsp_confirmation_port', + 'slsp_sporopay.config.slsp_confirmation_port.name', + '', + 101, + 'slsp_sporopay.config.slsp_confirmation_port.description' + ); + + $this->addPaymentConfig( + $output, + $category, + 'slsp_confirmation_username', + 'slsp_sporopay.config.slsp_confirmation_username.name', + '', + 102, + 'slsp_sporopay.config.slsp_confirmation_username.description' + ); + + $this->addPaymentConfig( + $output, + $category, + 'slsp_confirmation_password', + 'slsp_sporopay.config.slsp_confirmation_password.name', + '', + 103, + 'slsp_sporopay.config.slsp_confirmation_password.description' + ); + + $this->addPaymentConfig( + $output, + $category, + 'slsp_confirmation_processed_folder', + 'slsp_sporopay.config.slsp_confirmation_processed_folder.name', + '', + 104, + 'slsp_sporopay.config.slsp_confirmation_processed_folder.description' + ); + + $this->addPaymentConfig( + $output, + $category, + 'slsp_notification_confirmation_host', + 'slsp_sporopay.config.slsp_notification_confirmation_host.name', + '', + 105, + 'slsp_sporopay.config.slsp_notification_confirmation_host.description' + ); + + $this->addPaymentConfig( + $output, + $category, + 'slsp_notification_confirmation_port', + 'slsp_sporopay.config.slsp_notification_confirmation_port.name', + '', + 106, + 'slsp_sporopay.config.slsp_notification_confirmation_port.description' + ); + + $this->addPaymentConfig( + $output, + $category, + 'slsp_notification_confirmation_username', + 'slsp_sporopay.config.slsp_notification_confirmation_username.name', + '', + 107, + 'slsp_sporopay.config.slsp_notification_confirmation_username.description' + ); + + $this->addPaymentConfig( + $output, + $category, + 'slsp_notification_confirmation_password', + 'slsp_sporopay.config.slsp_notification_confirmation_password.name', + '', + 108, + 'slsp_sporopay.config.slsp_notification_confirmation_password.description' + ); + + $this->addPaymentConfig( + $output, + $category, + 'slsp_notification_confirmation_processed_folder', + 'slsp_sporopay.config.slsp_notification_confirmation_processed_folder.name', + '', + 109, + 'slsp_sporopay.config.slsp_notification_confirmation_processed_folder.description' + ); } private function addPaymentConfig(OutputInterface $output, $category, $name, $displayName, $value, $sorting, $description = null)