From b4c6a94278780bc54e6ecdb45ed799b9a4eefc60 Mon Sep 17 00:00:00 2001 From: esposimo Date: Mon, 15 Apr 2024 19:41:28 +0200 Subject: [PATCH] add pspNotifyPayment to the crawler --- src/mock_crawler.php | 24 +- src/mock_insert.php | 668 ++++++++++++++++++ src/sql/05_2024_insert_data.sql | 12 +- .../crawler/events/req/pspNotifyPayment.php | 171 +++++ .../crawler/events/resp/pspNotifyPayment.php | 180 +++++ .../crawler/methods/req/pspNotifyPayment.php | 554 +++++++++++++++ .../crawler/methods/resp/pspNotifyPayment.php | 317 +++++++++ .../paymentlist/req/pspNotifyPayment.php | 149 ++++ .../paymentlist/resp/pspNotifyPayment.php | 34 + .../events/req/pspNotifyPaymentTest.php | 273 +++++++ .../events/resp/pspNotifyPaymentTest.php | 177 +++++ .../methods/req/pspNotifyPaymentTest.php | 413 +++++++++++ .../methods/resp/pspNotifyPaymentTest.php | 268 +++++++ src/tests/phpunit.xml | 9 +- ...rkFlow_WithPspNotifyPayment_CreditCard.php | 193 +++++ ...kFlow_WithPspNotifyPayment_BancomatPay.php | 193 +++++ ...9_WorkFlow_WithPspNotifyPayment_Paypal.php | 193 +++++ 17 files changed, 3813 insertions(+), 15 deletions(-) create mode 100644 src/src/crawler/events/req/pspNotifyPayment.php create mode 100644 src/src/crawler/events/resp/pspNotifyPayment.php create mode 100644 src/src/crawler/methods/req/pspNotifyPayment.php create mode 100644 src/src/crawler/methods/resp/pspNotifyPayment.php create mode 100644 src/src/crawler/paymentlist/req/pspNotifyPayment.php create mode 100644 src/src/crawler/paymentlist/resp/pspNotifyPayment.php create mode 100644 src/tests/pagopa/events/req/pspNotifyPaymentTest.php create mode 100644 src/tests/pagopa/events/resp/pspNotifyPaymentTest.php create mode 100644 src/tests/pagopa/methods/req/pspNotifyPaymentTest.php create mode 100644 src/tests/pagopa/methods/resp/pspNotifyPaymentTest.php create mode 100644 src/tests/process/crawler/pspNotifyPayment/T00047_WorkFlow_WithPspNotifyPayment_CreditCard.php create mode 100644 src/tests/process/crawler/pspNotifyPayment/T00048_WorkFlow_WithPspNotifyPayment_BancomatPay.php create mode 100644 src/tests/process/crawler/pspNotifyPayment/T00049_WorkFlow_WithPspNotifyPayment_Paypal.php diff --git a/src/mock_crawler.php b/src/mock_crawler.php index a0c98f7f..8a2e743c 100644 --- a/src/mock_crawler.php +++ b/src/mock_crawler.php @@ -99,32 +99,38 @@ $a->run(); +$a = new \pagopa\crawler\paymentlist\req\pspNotifyPayment(new \DateTime('2024-03-10'), 'pspNotifyPayment', 'REQ', $redis_cache); +$a->run(); -$a = new \pagopa\crawler\paymentlist\req\sendPaymentOutcome(new DateTime('2024-03-10'), 'sendPaymentOutcome', 'REQ', $redis_cache); +$a = new \pagopa\crawler\paymentlist\resp\pspNotifyPayment(new \DateTime('2024-03-10'), 'pspNotifyPayment', 'RESP', $redis_cache); $a->run(); -$a = new \pagopa\crawler\paymentlist\resp\sendPaymentOutcome(new DateTime('2024-03-10'), 'sendPaymentOutcome', 'RESP', $redis_cache); + +$a = new \pagopa\crawler\paymentlist\req\pspInviaCarrelloRPT(new DateTime('2024-03-10'), 'pspInviaCarrelloRPT', 'REQ', $redis_cache); $a->run(); -$a = new \pagopa\crawler\paymentlist\req\sendPaymentOutcome(new DateTime('2024-03-11'), 'sendPaymentOutcome', 'REQ', $redis_cache); +$a = new \pagopa\crawler\paymentlist\resp\pspInviaCarrelloRPT(new DateTime('2024-03-10'), 'pspInviaCarrelloRPT', 'RESP', $redis_cache); $a->run(); -$a = new \pagopa\crawler\paymentlist\resp\sendPaymentOutcome(new DateTime('2024-03-11'), 'sendPaymentOutcome', 'RESP', $redis_cache); +$a = new \pagopa\crawler\paymentlist\req\pspInviaCarrelloRPTCarte(new DateTime('2024-03-10'), 'pspInviaCarrelloRPTCarte', 'REQ', $redis_cache); $a->run(); - -$a = new \pagopa\crawler\paymentlist\req\pspInviaCarrelloRPT(new DateTime('2024-03-10'), 'pspInviaCarrelloRPT', 'REQ', $redis_cache); +$a = new \pagopa\crawler\paymentlist\resp\pspInviaCarrelloRPTCarte(new DateTime('2024-03-10'), 'pspInviaCarrelloRPTCarte', 'RESP', $redis_cache); $a->run(); -$a = new \pagopa\crawler\paymentlist\resp\pspInviaCarrelloRPT(new DateTime('2024-03-10'), 'pspInviaCarrelloRPT', 'RESP', $redis_cache); + +$a = new \pagopa\crawler\paymentlist\req\sendPaymentOutcome(new DateTime('2024-03-10'), 'sendPaymentOutcome', 'REQ', $redis_cache); $a->run(); +$a = new \pagopa\crawler\paymentlist\resp\sendPaymentOutcome(new DateTime('2024-03-10'), 'sendPaymentOutcome', 'RESP', $redis_cache); +$a->run(); -$a = new \pagopa\crawler\paymentlist\req\pspInviaCarrelloRPTCarte(new DateTime('2024-03-10'), 'pspInviaCarrelloRPTCarte', 'REQ', $redis_cache); +$a = new \pagopa\crawler\paymentlist\req\sendPaymentOutcome(new DateTime('2024-03-11'), 'sendPaymentOutcome', 'REQ', $redis_cache); $a->run(); -$a = new \pagopa\crawler\paymentlist\resp\pspInviaCarrelloRPTCarte(new DateTime('2024-03-10'), 'pspInviaCarrelloRPTCarte', 'RESP', $redis_cache); + +$a = new \pagopa\crawler\paymentlist\resp\sendPaymentOutcome(new DateTime('2024-03-11'), 'sendPaymentOutcome', 'RESP', $redis_cache); $a->run(); diff --git a/src/mock_insert.php b/src/mock_insert.php index 84830fd0..761fc4a3 100644 --- a/src/mock_insert.php +++ b/src/mock_insert.php @@ -2340,5 +2340,673 @@ ':payload' => 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/Pgo8c29hcGVudjpFbnZlbG9wZSB4bWxuczpiYz0iaHR0cDovL1B1bnRvQWNjZXNzb1BTUC5zcGNvb3AuZ292Lml0L0JhckNvZGVfR1MxXzEyOF9Nb2RpZmllZCIgeG1sbnM6cGF5X2k9Imh0dHA6Ly93d3cuZGlnaXRwYS5nb3YuaXQvc2NoZW1hcy8yMDExL1BhZ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Bvc3RhPgoJPC9zb2FwZW52OkJvZHk+Cjwvc29hcGVudjpFbnZlbG9wZT4=', ]; +Capsule::statement($render_query, $data_req); +Capsule::statement($render_query, $data_resp); + + + + + + + + + + + + + + + + + + + + + + + + + + + + +$data_req = [ + ':id' => 100, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:43:00.197', + ':tipoevento' => 'activatePaymentNotice', + ':sottotipoevento' => 'REQ', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000100', + ':ccp' => 'c0000000000000000000000000000100', + ':noticenumber' => '301000000000000100', + ':creditorreferenceid' => '01000000000000100', + ':paymenttoken' => 'c0000000000000000000000000000100', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000100', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000100', + ':payload' => 'PHNvYXBlbnY6RW52ZWxvcGUgeG1sbnM6bm9kPSJodHRwOi8vcGFnb3BhLWFwaS5wYWdvcGEuZ292Lml0L25vZGUvbm9kZUZvclBzcC54c2QiIHhtbG5zOnNvYXBlbnY9Imh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3NvYXAvZW52ZWxvcGUvIj4KCTxzb2FwZW52OkhlYWRlci8+Cgk8c29hcGVudjpCb2R5PgoJCTxub2Q6YWN0aXZhdGVQYXltZW50Tm90aWNlUmVxPgoJCQk8aWRQU1A+QUdJRF8wMTwvaWRQU1A+CgkJCTxpZEJyb2tlclBTUD44ODg4ODg4ODg4ODwvaWRCcm9rZXJQU1A+CgkJCTxpZENoYW5uZWw+ODg4ODg4ODg4ODhfMDE8L2lkQ2hhbm5lbD4KCQkJPHBhc3N3b3JkPioqKioqPC9wYXNzd29yZD4KCQkJPHFyQ29kZT4KCQkJCTxmaXNjYWxDb2RlPjc3Nzc3Nzc3Nzc3PC9maXNjYWxDb2RlPgoJCQkJPG5vdGljZU51bWJlcj4zMDEwMDAwMDAwMDAwMDAxMDA8L25vdGljZU51bWJlcj4KCQkJPC9xckNvZGU+CgkJCTxhbW91bnQ+MC4wMDwvYW1vdW50PgoJCTwvbm9kOmFjdGl2YXRlUGF5bWVudE5vdGljZVJlcT4KCTwvc29hcGVudjpCb2R5Pgo8L3NvYXBlbnY6RW52ZWxvcGU+', +]; +$data_resp = [ + ':id' => 101, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:43:01.197', + ':tipoevento' => 'activatePaymentNotice', + ':sottotipoevento' => 'RESP', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000100', + ':ccp' => 'c0000000000000000000000000000100', + ':noticenumber' => '301000000000000100', + ':creditorreferenceid' => '01000000000000100', + ':paymenttoken' => 'c0000000000000000000000000000100', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000100', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000101', + ':payload' => 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/Pgo8c29hcGVudjpFbnZlbG9wZSB4bWxuczpjb21tb249Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQveHNkL2NvbW1vbi10eXBlcy92MS4wLjAvIiB4bWxuczpuZnA9Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQvbm9kZS9ub2RlRm9yUHNwLnhzZCIgeG1sbnM6c29hcGVudj0iaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvc29hcC9lbnZlbG9wZS8iIHhtbG5zOnhzPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYSIgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSI+Cgk8c29hcGVudjpCb2R5PgoJCTxuZnA6YWN0aXZhdGVQYXltZW50Tm90aWNlUmVzPgoJCQk8b3V0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Fuc2Zlcj4yPC9pZFRyYW5zZmVyPgoJCQkJCTx0cmFuc2ZlckFtb3VudD40MC4wMDwvdHJhbnNmZXJBbW91bnQ+CgkJCQkJPGZpc2NhbENvZGVQQT43Nzc3Nzc3Nzc3ODwvZmlzY2FsQ29kZVBBPgoJCQkJCTxJQkFOPklUMThVMDAwMDAwMDAwMDAwMDAwMDAwMDAwMjwvSUJBTj4KCQkJCQk8cmVtaXR0YW5jZUluZm9ybWF0aW9uPnh4eHg8L3JlbWl0dGFuY2VJbmZvcm1hdGlvbj4KCQkJCQk8bWV0YWRhdGE+CgkJCQkJCTxtYXBFbnRyeT4KCQkJCQkJCTxrZXk+Y2hpYXZlXzJfMTwva2V5PgoJCQkJCQkJPHZhbHVlPnZhbG9yZV8yXzE8L3ZhbHVlPgoJCQkJCQk8L21hcEVudHJ5PgoJCQkJCQk8bWFwRW50cnk+CgkJCQkJCQk8a2V5PmNoaWF2ZV8yXzI8L2tleT4KCQkJCQkJCTx2YWx1ZT52YWxvcmVfMl8yPC92YWx1ZT4KCQkJCQkJPC9tYXBFbnRyeT4KCQkJCQk8L21ldGFkYXRhPgoJCQkJPC90cmFuc2Zlcj4KCQkJPC90cmFuc2Zlckxpc3Q+CgkJCTxjcmVkaXRvclJlZmVyZW5jZUlkPjAxMDAwMDAwMDAwMDAwMTAwPC9jcmVkaXRvclJlZmVyZW5jZUlkPgoJCTwvbmZwOmFjdGl2YXRlUGF5bWVudE5vdGljZVJlcz4KCTwvc29hcGVudjpCb2R5Pgo8L3NvYXBlbnY6RW52ZWxvcGU+', +]; +Capsule::statement($render_query, $data_req); +Capsule::statement($render_query, $data_resp); + + +$data_req = [ + ':id' => 102, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:44:00.197', + ':tipoevento' => 'pspNotifyPayment', + ':sottotipoevento' => 'REQ', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000100', + ':ccp' => 'c0000000000000000000000000000100', + ':noticenumber' => '301000000000000100', + ':creditorreferenceid' => '01000000000000100', + ':paymenttoken' => 'c0000000000000000000000000000100', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000101', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000102', + ':payload' => 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/Pgo8c29hcGVudjpFbnZlbG9wZSB4bWxuczpjb21tb249Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQveHNkL2NvbW1vbi10eXBlcy92MS4wLjAvIiB4bWxuczpwZm49Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQvcHNwL3BzcEZvck5vZGUueHNkIiB4bWxuczpzb2FwZW52PSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy9zb2FwL2VudmVsb3BlLyIgeG1sbnM6eHM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hIiB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIj4KCTxzb2FwZW52OkJvZHk+CgkJPHBmbjpwc3BOb3RpZnlQYXltZW50UmVxPgoJCQk8aWRQU1A+QUdJRF8wMTwvaWRQU1A+CgkJCTxpZEJyb2tlclBTUD44ODg4ODg4ODg4ODwvaWRCcm9rZXJQU1A+CgkJCTxpZENoYW5uZWw+ODg4ODg4ODg4ODhfMDE8L2lkQ2hhbm5lbD4KCQkJPHBheW1lbnRUb2tlbj50MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEwMDwvcGF5bWVudFRva2VuPgoJCQk8cGF5bWVudERlc2NyaXB0aW9uPnBhZ2FtZW50byBtdWx0aWJlbmVmaWNpYXJpbzwvcGF5bWVudERlc2NyaXB0aW9uPgoJCQk8ZmlzY2FsQ29kZVBBPjc3Nzc3Nzc3N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+ ':inserted_timestamp' => '2024-03-10 15:44:01.197', + ':tipoevento' => 'pspNotifyPayment', + ':sottotipoevento' => 'RESP', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000100', + ':ccp' => 'c0000000000000000000000000000100', + ':noticenumber' => '301000000000000100', + ':creditorreferenceid' => '01000000000000100', + ':paymenttoken' => 'c0000000000000000000000000000100', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000101', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000103', + ':payload' => 'PFNPQVAtRU5WOkVudmVsb3BlIHhtbG5zOlNPQVAtRU5WPSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy9zb2FwL2VudmVsb3BlLyI+PFNPQVAtRU5WOkhlYWRlci8+PFNPQVAtRU5WOkJvZHk+PG5zMzpwc3BOb3RpZnlQYXltZW50UmVzIHhtbG5zOm5zMz0iaHR0cDovL3BhZ29wYS1hcGkucGFnb3BhLmdvdi5pdC9wc3AvcHNwRm9yTm9kZS54c2QiPjxvdXRjb21lPk9LPC9vdXRjb21lPjwvbnMzOnBzcE5vdGlmeVBheW1lbnRSZXM+PC9TT0FQLUVOVjpCb2R5PjwvU09BUC1FTlY6RW52ZWxvcGU+', +]; + +Capsule::statement($render_query, $data_req); +Capsule::statement($render_query, $data_resp); + + + + +$data_req = [ + ':id' => 104, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:45:00.197', + ':tipoevento' => 'pspNotifyPayment', + ':sottotipoevento' => 'REQ', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000100', + ':ccp' => 'c0000000000000000000000000000100', + ':noticenumber' => '301000000000000100', + ':creditorreferenceid' => '01000000000000100', + ':paymenttoken' => 'c0000000000000000000000000000100', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000102', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000104', + ':payload' => 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bmNlSW5mb3JtYXRpb24+CgkJCQkJPG1ldGFkYXRhPgoJCQkJCQk8bWFwRW50cnk+CgkJCQkJCQk8a2V5PmNoaWF2ZV8yXzE8L2tleT4KCQkJCQkJCTx2YWx1ZT52YWxvcmVfMl8xPC92YWx1ZT4KCQkJCQkJPC9tYXBFbnRyeT4KCQkJCQkJPG1hcEVudHJ5PgoJCQkJCQkJPGtleT5jaGlhdmVfMl8yPC9rZXk+CgkJCQkJCQk8dmFsdWU+dmFsb3JlXzJfMjwvdmFsdWU+CgkJCQkJCTwvbWFwRW50cnk+CgkJCQkJPC9tZXRhZGF0YT4KCQkJCTwvdHJhbnNmZXI+CgkJCTwvdHJhbnNmZXJMaXN0PgoJCQk8Y3JlZGl0Q2FyZFBheW1lbnQ+CgkJCQk8cnJuPjExMTExMTExMTExMTwvcnJuPgoJCQkJPG91dGNvbWVQYXltZW50R2F0ZXdheT5PSzwvb3V0Y29tZVBheW1lbnRHYXRld2F5PgoJCQkJPHRvdGFsQW1vdW50PjE1MS4zMDwvdG90YWxBbW91bnQ+CgkJCQk8ZmVlPjEuMzA8L2ZlZT4KCQkJCTx0aW1lc3RhbXBPcGVyYXRpb24+MjAyNC0wNC0xMFQyMToxNDo0NzwvdGltZXN0YW1wT3BlcmF0aW9uPgoJCQkJPGF1dGhvcml6YXRpb25Db2RlPjExMTExMTwvYXV0aG9yaXphdGlvbkNvZGU+CgkJCTwvY3JlZGl0Q2FyZFBheW1lbnQ+CgkJPC9wZm46cHNwTm90aWZ5UGF5bWVudFJlcT4KCTwvc29hcGVudjpCb2R5Pgo8L3NvYXBlbnY6RW52ZWxvcGU+', +]; +$data_resp = [ + ':id' => 105, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:45:01.197', + ':tipoevento' => 'pspNotifyPayment', + ':sottotipoevento' => 'RESP', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000100', + ':ccp' => 'c0000000000000000000000000000100', + ':noticenumber' => '301000000000000100', + ':creditorreferenceid' => '01000000000000100', + ':paymenttoken' => 'c0000000000000000000000000000100', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000102', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000105', + ':payload' => 'PFNPQVAtRU5WOkVudmVsb3BlIHhtbG5zOlNPQVAtRU5WPSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy9zb2FwL2VudmVsb3BlLyI+PFNPQVAtRU5WOkhlYWRlci8+PFNPQVAtRU5WOkJvZHk+PG5zMzpwc3BOb3RpZnlQYXltZW50UmVzIHhtbG5zOm5zMz0iaHR0cDovL3BhZ29wYS1hcGkucGFnb3BhLmdvdi5pdC9wc3AvcHNwRm9yTm9kZS54c2QiPjxvdXRjb21lPk9LPC9vdXRjb21lPjwvbnMzOnBzcE5vdGlmeVBheW1lbnRSZXM+PC9TT0FQLUVOVjpCb2R5PjwvU09BUC1FTlY6RW52ZWxvcGU+', +]; + +Capsule::statement($render_query, $data_req); +Capsule::statement($render_query, $data_resp); + + + + +$data_req = [ + ':id' => 106, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:46:00.197', + ':tipoevento' => 'sendPaymentOutcome', + ':sottotipoevento' => 'REQ', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000100', + ':ccp' => 'c0000000000000000000000000000100', + ':noticenumber' => '301000000000000100', + ':creditorreferenceid' => '01000000000000100', + ':paymenttoken' => 'c0000000000000000000000000000100', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000103', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000106', + ':payload' => 'PHNvYXA6RW52ZWxvcGUgeG1sbnM6c29hcD0iaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvc29hcC9lbnZlbG9wZS8iPgoJPHNvYXA6Qm9keT4KCQk8bnMyOnNlbmRQYXltZW50T3V0Y29tZVJlcSB4bWxuczpuczI9Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQvbm9kZS9ub2RlRm9yUHNwLnhzZCIgeG1sbnM6bnMzPSJodHRwOi8vd3MucGFnYW1lbnRpLnRlbGVtYXRpY2kuZ292LyI+CgkJCTxpZFBTUD5BR0lEXzAxPC9pZFBTUD4KCQkJPGlkQnJva2VyUFNQPjg4ODg4ODg4ODg4PC9pZEJyb2tlclBTUD4KCQkJPGlkQ2hhbm5lbD44ODg4ODg4ODg4OF8wMTwvaWRDaGFubmVsPgoJCQk8cGFzc3dvcmQ+eHh4eHh4eHg8L3Bhc3N3b3JkPgoJCQk8cGF5bWVudFRva2VuPmMwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMTAwPC9wYXltZW50VG9rZW4+CgkJCTxvdXRjb21lPk9LPC9vdXRjb21lPgoJCQk8ZGV0YWlscz4KCQkJCTxwYXltZW50TWV0aG9kPm90aGVyPC9wYXltZW50TWV0aG9kPgoJCQkJPGZlZT4xLjAwPC9mZWU+CgkJCQk8YXBwbGljYXRpb25EYXRlPjIwMjQtMDQtMDI8L2FwcGxpY2F0aW9uRGF0ZT4KCQkJCTx0cmFuc2ZlckRhdGU+MjAyNC0wNC0wMzwvdHJhbnNmZXJEYXRlPgoJCQk8L2RldGFpbHM+CgkJPC9uczI6c2VuZFBheW1lbnRPdXRjb21lUmVxPgoJPC9zb2FwOkJvZHk+Cjwvc29hcDpFbnZlbG9wZT4=', +]; +$data_resp = [ + ':id' => 107, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:46:01.197', + ':tipoevento' => 'sendPaymentOutcome', + ':sottotipoevento' => 'RESP', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000100', + ':ccp' => 'c0000000000000000000000000000100', + ':noticenumber' => '301000000000000100', + ':creditorreferenceid' => '01000000000000100', + ':paymenttoken' => 'c0000000000000000000000000000100', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000103', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000107', + ':payload' => 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/Pgo8c29hcGVudjpFbnZlbG9wZSB4bWxuczpjb21tb249Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQveHNkL2NvbW1vbi10eXBlcy92MS4wLjAvIiB4bWxuczpuZnA9Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQvbm9kZS9ub2RlRm9yUHNwLnhzZCIgeG1sbnM6c29hcGVudj0iaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvc29hcC9lbnZlbG9wZS8iIHhtbG5zOnhzPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYSIgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSI+Cgk8c29hcGVudjpCb2R5PgoJCTxuZnA6c2VuZFBheW1lbnRPdXRjb21lUmVzPgoJCQk8b3V0Y29tZT5PSzwvb3V0Y29tZT4KCQk8L25mcDpzZW5kUGF5bWVudE91dGNvbWVSZXM+Cgk8L3NvYXBlbnY6Qm9keT4KPC9zb2FwZW52OkVudmVsb3BlPg==', +]; + +Capsule::statement($render_query, $data_req); +Capsule::statement($render_query, $data_resp); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +$data_req = [ + ':id' => 108, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:43:00.197', + ':tipoevento' => 'activatePaymentNotice', + ':sottotipoevento' => 'REQ', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000101', + ':ccp' => 'c0000000000000000000000000000101', + ':noticenumber' => '301000000000000101', + ':creditorreferenceid' => '01000000000000101', + ':paymenttoken' => 'c0000000000000000000000000000101', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000107', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000108', + ':payload' => 'PHNvYXBlbnY6RW52ZWxvcGUgeG1sbnM6bm9kPSJodHRwOi8vcGFnb3BhLWFwaS5wYWdvcGEuZ292Lml0L25vZGUvbm9kZUZvclBzcC54c2QiIHhtbG5zOnNvYXBlbnY9Imh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3NvYXAvZW52ZWxvcGUvIj4KCTxzb2FwZW52OkhlYWRlci8+Cgk8c29hcGVudjpCb2R5PgoJCTxub2Q6YWN0aXZhdGVQYXltZW50Tm90aWNlUmVxPgoJCQk8aWRQU1A+QUdJRF8wMTwvaWRQU1A+CgkJCTxpZEJyb2tlclBTUD44ODg4ODg4ODg4ODwvaWRCcm9rZXJQU1A+CgkJCTxpZENoYW5uZWw+ODg4ODg4ODg4ODhfMDE8L2lkQ2hhbm5lbD4KCQkJPHBhc3N3b3JkPioqKioqPC9wYXNzd29yZD4KCQkJPHFyQ29kZT4KCQkJCTxmaXNjYWxDb2RlPjc3Nzc3Nzc3Nzc3PC9maXNjYWxDb2RlPgoJCQkJPG5vdGljZU51bWJlcj4zMDEwMDAwMDAwMDAwMDAxMDE8L25vdGljZU51bWJlcj4KCQkJPC9xckNvZGU+CgkJCTxhbW91bnQ+MC4wMDwvYW1vdW50PgoJCTwvbm9kOmFjdGl2YXRlUGF5bWVudE5vdGljZVJlcT4KCTwvc29hcGVudjpCb2R5Pgo8L3NvYXBlbnY6RW52ZWxvcGU+', +]; +$data_resp = [ + ':id' => 109, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:43:01.197', + ':tipoevento' => 'activatePaymentNotice', + ':sottotipoevento' => 'RESP', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000101', + ':ccp' => 'c0000000000000000000000000000101', + ':noticenumber' => '301000000000000101', + ':creditorreferenceid' => '01000000000000101', + ':paymenttoken' => 'c0000000000000000000000000000101', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000107', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000109', + ':payload' => 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/Pgo8c29hcGVudjpFbnZlbG9wZSB4bWxuczpjb21tb249Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQveHNkL2NvbW1vbi10eXBlcy92MS4wLjAvIiB4bWxuczpuZnA9Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQvbm9kZS9ub2RlRm9yUHNwLnhzZCIgeG1sbnM6c29hcGVudj0iaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvc29hcC9lbnZlbG9wZS8iIHhtbG5zOnhzPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYSIgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSI+Cgk8c29hcGVudjpCb2R5PgoJCTxuZnA6YWN0aXZhdGVQYXltZW50Tm90aWNlUmVzPgoJCQk8b3V0Y29tZT5PSzwvb3V0Y29tZT4KCQkJPHRvdGFsQW1vdW50PjE1MC4wMDwvdG90YWxBbW91bnQ+CgkJCTxwYXltZW50RGVzY3JpcHRpb24+eHh4eHh4eDwvcGF5bWVudERlc2NyaXB0aW9uPgoJCQk8ZmlzY2FsQ29kZVBBPjc3Nzc3Nzc3Nzc3PC9maXNjYWxDb2RlUEE+CgkJCTxjb21wYW55TmFtZT54eHh4eHh4PC9jb21wYW55TmFtZT4KCQkJPHBheW1lbnRUb2tlbj50MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDEwMTwvcGF5bWVudFRva2VuPgoJCQk8dHJhbnNmZXJMaX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2hpYXZlXzJfMTwva2V5PgoJCQkJCQkJPHZhbHVlPnZhbG9yZV8yXzE8L3ZhbHVlPgoJCQkJCQk8L21hcEVudHJ5PgoJCQkJCQk8bWFwRW50cnk+CgkJCQkJCQk8a2V5PmNoaWF2ZV8yXzI8L2tleT4KCQkJCQkJCTx2YWx1ZT52YWxvcmVfMl8yPC92YWx1ZT4KCQkJCQkJPC9tYXBFbnRyeT4KCQkJCQk8L21ldGFkYXRhPgoJCQkJPC90cmFuc2Zlcj4KCQkJPC90cmFuc2Zlckxpc3Q+CgkJCTxjcmVkaXRvclJlZmVyZW5jZUlkPjAxMDAwMDAwMDAwMDAwMTAxPC9jcmVkaXRvclJlZmVyZW5jZUlkPgoJCTwvbmZwOmFjdGl2YXRlUGF5bWVudE5vdGljZVJlcz4KCTwvc29hcGVudjpCb2R5Pgo8L3NvYXBlbnY6RW52ZWxvcGU+', +]; +Capsule::statement($render_query, $data_req); +Capsule::statement($render_query, $data_resp); + + +$data_req = [ + ':id' => 110, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:44:00.197', + ':tipoevento' => 'pspNotifyPayment', + ':sottotipoevento' => 'REQ', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000101', + ':ccp' => 'c0000000000000000000000000000101', + ':noticenumber' => '301000000000000101', + ':creditorreferenceid' => '01000000000000101', + ':paymenttoken' => 'c0000000000000000000000000000101', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000108', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000110', + ':payload' => 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/Pgo8c29hcGVudjpFbnZlbG9wZSB4bWxuczpjb21tb249Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQveHNkL2NvbW1vbi10eXBlcy92MS4wLjAvIiB4bWxuczpwZm49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JCQkJPGtleT5jaGlhdmVfMl8yPC9rZXk+CgkJCQkJCQk8dmFsdWU+dmFsb3JlXzJfMjwvdmFsdWU+CgkJCQkJCTwvbWFwRW50cnk+CgkJCQkJPC9tZXRhZGF0YT4KCQkJCTwvdHJhbnNmZXI+CgkJCTwvdHJhbnNmZXJMaXN0PgoJCQk8YmFuY29tYXRwYXlQYXltZW50PgoJCQkJPHRyYW5zYWN0aW9uSWQ+MTExMTExMTEyPC90cmFuc2FjdGlvbklkPgoJCQkJPG91dGNvbWVQYXltZW50R2F0ZXdheT4wPC9vdXRjb21lUGF5bWVudEdhdGV3YXk+CgkJCQk8dG90YWxBbW91bnQ+MTUwLjUwPC90b3RhbEFtb3VudD4KCQkJCTxmZWU+MC41MDwvZmVlPgoJCQkJPHRpbWVzdGFtcE9wZXJhdGlvbj4yMDI0LTA0LTEzVDIxOjE5OjQ1PC90aW1lc3RhbXBPcGVyYXRpb24+CgkJCQk8YXV0aG9yaXphdGlvbkNvZGU+MTExMTExMTExMTExMTExMTExMTExMTA8L2F1dGhvcml6YXRpb25Db2RlPgoJCQk8L2JhbmNvbWF0cGF5UGF5bWVudD4KCQk8L3Bmbjpwc3BOb3RpZnlQYXltZW50UmVxPgoJPC9zb2FwZW52OkJvZHk+Cjwvc29hcGVudjpFbnZlbG9wZT4=', +]; +$data_resp = [ + ':id' => 111, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:44:01.197', + ':tipoevento' => 'pspNotifyPayment', + ':sottotipoevento' => 'RESP', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000101', + ':ccp' => 'c0000000000000000000000000000101', + ':noticenumber' => '301000000000000101', + ':creditorreferenceid' => '01000000000000101', + ':paymenttoken' => 'c0000000000000000000000000000101', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000108', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000111', + ':payload' => 'PFNPQVAtRU5WOkVudmVsb3BlIHhtbG5zOlNPQVAtRU5WPSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy9zb2FwL2VudmVsb3BlLyI+PFNPQVAtRU5WOkhlYWRlci8+PFNPQVAtRU5WOkJvZHk+PG5zMzpwc3BOb3RpZnlQYXltZW50UmVzIHhtbG5zOm5zMz0iaHR0cDovL3BhZ29wYS1hcGkucGFnb3BhLmdvdi5pdC9wc3AvcHNwRm9yTm9kZS54c2QiPjxvdXRjb21lPk9LPC9vdXRjb21lPjwvbnMzOnBzcE5vdGlmeVBheW1lbnRSZXM+PC9TT0FQLUVOVjpCb2R5PjwvU09BUC1FTlY6RW52ZWxvcGU+', +]; + +Capsule::statement($render_query, $data_req); +Capsule::statement($render_query, $data_resp); + + + + +$data_req = [ + ':id' => 112, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:45:00.197', + ':tipoevento' => 'pspNotifyPayment', + ':sottotipoevento' => 'REQ', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000101', + ':ccp' => 'c0000000000000000000000000000101', + ':noticenumber' => '301000000000000101', + ':creditorreferenceid' => '01000000000000101', + ':paymenttoken' => 'c0000000000000000000000000000101', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000109', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000112', + ':payload' => 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/Pgo8c29hcGVudjpFbnZlbG9wZSB4bWxuczpjb21tb249Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQveHNkL2NvbW1vbi10eXBlcy92MS4wLjAvIiB4bWxuczpwZm49Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQvcHNwL3BzcEZvck5vZGUueHNkIiB4bWxuczpzb2FwZW52PSJodHRwOi8vc2NoZW1hcy54bWxz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ZXRhZGF0YT4KCQkJCTwvdHJhbnNmZXI+CgkJCTwvdHJhbnNmZXJMaXN0PgoJCQk8YmFuY29tYXRwYXlQYXltZW50PgoJCQkJPHRyYW5zYWN0aW9uSWQ+MTExMTExMTEyPC90cmFuc2FjdGlvbklkPgoJCQkJPG91dGNvbWVQYXltZW50R2F0ZXdheT4wPC9vdXRjb21lUGF5bWVudEdhdGV3YXk+CgkJCQk8dG90YWxBbW91bnQ+MTUwLjUwPC90b3RhbEFtb3VudD4KCQkJCTxmZWU+MC41MDwvZmVlPgoJCQkJPHRpbWVzdGFtcE9wZXJhdGlvbj4yMDI0LTA0LTEzVDIxOjE5OjQ1PC90aW1lc3RhbXBPcGVyYXRpb24+CgkJCQk8YXV0aG9yaXphdGlvbkNvZGU+MTExMTExMTExMTExMTExMTExMTExMTA8L2F1dGhvcml6YXRpb25Db2RlPgoJCQk8L2JhbmNvbWF0cGF5UGF5bWVudD4KCQk8L3Bmbjpwc3BOb3RpZnlQYXltZW50UmVxPgoJPC9zb2FwZW52OkJvZHk+Cjwvc29hcGVudjpFbnZlbG9wZT4=', +]; +$data_resp = [ + ':id' => 113, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:45:01.197', + ':tipoevento' => 'pspNotifyPayment', + ':sottotipoevento' => 'RESP', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000101', + ':ccp' => 'c0000000000000000000000000000101', + ':noticenumber' => '301000000000000101', + ':creditorreferenceid' => '01000000000000101', + ':paymenttoken' => 'c0000000000000000000000000000101', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000109', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000113', + ':payload' => 'PFNPQVAtRU5WOkVudmVsb3BlIHhtbG5zOlNPQVAtRU5WPSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy9zb2FwL2VudmVsb3BlLyI+PFNPQVAtRU5WOkhlYWRlci8+PFNPQVAtRU5WOkJvZHk+PG5zMzpwc3BOb3RpZnlQYXltZW50UmVzIHhtbG5zOm5zMz0iaHR0cDovL3BhZ29wYS1hcGkucGFnb3BhLmdvdi5pdC9wc3AvcHNwRm9yTm9kZS54c2QiPjxvdXRjb21lPk9LPC9vdXRjb21lPjwvbnMzOnBzcE5vdGlmeVBheW1lbnRSZXM+PC9TT0FQLUVOVjpCb2R5PjwvU09BUC1FTlY6RW52ZWxvcGU+', +]; + +Capsule::statement($render_query, $data_req); +Capsule::statement($render_query, $data_resp); + + + + +$data_req = [ + ':id' => 114, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:46:00.197', + ':tipoevento' => 'sendPaymentOutcome', + ':sottotipoevento' => 'REQ', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000101', + ':ccp' => 'c0000000000000000000000000000101', + ':noticenumber' => '301000000000000101', + ':creditorreferenceid' => '01000000000000101', + ':paymenttoken' => 'c0000000000000000000000000000101', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000110', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000114', + ':payload' => 'PHNvYXA6RW52ZWxvcGUgeG1sbnM6c29hcD0iaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvc29hcC9lbnZlbG9wZS8iPgoJPHNvYXA6Qm9keT4KCQk8bnMyOnNlbmRQYXltZW50T3V0Y29tZVJlcSB4bWxuczpuczI9Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQvbm9kZS9ub2RlRm9yUHNwLnhzZCIgeG1sbnM6bnMzPSJodHRwOi8vd3MucGFnYW1lbnRpLnRlbGVtYXRpY2kuZ292LyI+CgkJCTxpZFBTUD5BR0lEXzAxPC9pZFBTUD4KCQkJPGlkQnJva2VyUFNQPjg4ODg4ODg4ODg4PC9pZEJyb2tlclBTUD4KCQkJPGlkQ2hhbm5lbD44ODg4ODg4ODg4OF8wMTwvaWRDaGFubmVsPgoJCQk8cGFzc3dvcmQ+eHh4eHh4eHg8L3Bhc3N3b3JkPgoJCQk8cGF5bWVudFRva2VuPmMwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMTAxPC9wYXltZW50VG9rZW4+CgkJCTxvdXRjb21lPk9LPC9vdXRjb21lPgoJCQk8ZGV0YWlscz4KCQkJCTxwYXltZW50TWV0aG9kPm90aGVyPC9wYXltZW50TWV0aG9kPgoJCQkJPGZlZT4xLjAwPC9mZWU+CgkJCQk8YXBwbGljYXRpb25EYXRlPjIwMjQtMDQtMDI8L2FwcGxpY2F0aW9uRGF0ZT4KCQkJCTx0cmFuc2ZlckRhdGU+MjAyNC0wNC0wMzwvdHJhbnNmZXJEYXRlPgoJCQk8L2RldGFpbHM+CgkJPC9uczI6c2VuZFBheW1lbnRPdXRjb21lUmVxPgoJPC9zb2FwOkJvZHk+Cjwvc29hcDpFbnZlbG9wZT4=', +]; +$data_resp = [ + ':id' => 115, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:46:01.197', + ':tipoevento' => 'sendPaymentOutcome', + ':sottotipoevento' => 'RESP', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000101', + ':ccp' => 'c0000000000000000000000000000101', + ':noticenumber' => '301000000000000101', + ':creditorreferenceid' => '01000000000000101', + ':paymenttoken' => 'c0000000000000000000000000000101', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000110', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000115', + ':payload' => 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/Pgo8c29hcGVudjpFbnZlbG9wZSB4bWxuczpjb21tb249Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQveHNkL2NvbW1vbi10eXBlcy92MS4wLjAvIiB4bWxuczpuZnA9Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQvbm9kZS9ub2RlRm9yUHNwLnhzZCIgeG1sbnM6c29hcGVudj0iaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvc29hcC9lbnZlbG9wZS8iIHhtbG5zOnhzPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYSIgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSI+Cgk8c29hcGVudjpCb2R5PgoJCTxuZnA6c2VuZFBheW1lbnRPdXRjb21lUmVzPgoJCQk8b3V0Y29tZT5PSzwvb3V0Y29tZT4KCQk8L25mcDpzZW5kUGF5bWVudE91dGNvbWVSZXM+Cgk8L3NvYXBlbnY6Qm9keT4KPC9zb2FwZW52OkVudmVsb3BlPg==', +]; + +Capsule::statement($render_query, $data_req); +Capsule::statement($render_query, $data_resp); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +$data_req = [ + ':id' => 116, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:43:00.197', + ':tipoevento' => 'activatePaymentNotice', + ':sottotipoevento' => 'REQ', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000102', + ':ccp' => 'c0000000000000000000000000000102', + ':noticenumber' => '301000000000000102', + ':creditorreferenceid' => '01000000000000102', + ':paymenttoken' => 'c0000000000000000000000000000102', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000116', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000116', + ':payload' => 'PHNvYXBlbnY6RW52ZWxvcGUgeG1sbnM6bm9kPSJodHRwOi8vcGFnb3BhLWFwaS5wYWdvcGEuZ292Lml0L25vZGUvbm9kZUZvclBzcC54c2QiIHhtbG5zOnNvYXBlbnY9Imh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3NvYXAvZW52ZWxvcGUvIj4KCTxzb2FwZW52OkhlYWRlci8+Cgk8c29hcGVudjpCb2R5PgoJCTxub2Q6YWN0aXZhdGVQYXltZW50Tm90aWNlUmVxPgoJCQk8aWRQU1A+QUdJRF8wMTwvaWRQU1A+CgkJCTxpZEJyb2tlclBTUD44ODg4ODg4ODg4ODwvaWRCcm9rZXJQU1A+CgkJCTxpZENoYW5uZWw+ODg4ODg4ODg4ODhfMDE8L2lkQ2hhbm5lbD4KCQkJPHBhc3N3b3JkPioqKioqPC9wYXNzd29yZD4KCQkJPHFyQ29kZT4KCQkJCTxmaXNjYWxDb2RlPjc3Nzc3Nzc3Nzc3PC9maXNjYWxDb2RlPgoJCQkJPG5vdGljZU51bWJlcj4zMDEwMDAwMDAwMDAwMDAxMDI8L25vdGljZU51bWJlcj4KCQkJPC9xckNvZGU+CgkJCTxhbW91bnQ+MC4wMDwvYW1vdW50PgoJCTwvbm9kOmFjdGl2YXRlUGF5bWVudE5vdGljZVJlcT4KCTwvc29hcGVudjpCb2R5Pgo8L3NvYXBlbnY6RW52ZWxvcGU+', +]; +$data_resp = [ + ':id' => 117, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:43:01.197', + ':tipoevento' => 'activatePaymentNotice', + ':sottotipoevento' => 'RESP', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000102', + ':ccp' => 'c0000000000000000000000000000102', + ':noticenumber' => '301000000000000102', + ':creditorreferenceid' => '01000000000000102', + ':paymenttoken' => 'c0000000000000000000000000000102', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000116', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000117', + ':payload' => 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/Pgo8c29hcGVudjpFbnZlbG9wZSB4bWxuczpjb21tb249Imh0dHA6Ly9wYWdvc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PC90cmFuc2Zlckxpc3Q+CgkJCTxjcmVkaXRvclJlZmVyZW5jZUlkPjAxMDAwMDAwMDAwMDAwMTAyPC9jcmVkaXRvclJlZmVyZW5jZUlkPgoJCTwvbmZwOmFjdGl2YXRlUGF5bWVudE5vdGljZVJlcz4KCTwvc29hcGVudjpCb2R5Pgo8L3NvYXBlbnY6RW52ZWxvcGU+', +]; +Capsule::statement($render_query, $data_req); +Capsule::statement($render_query, $data_resp); + + +$data_req = [ + ':id' => 118, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:44:00.197', + ':tipoevento' => 'pspNotifyPayment', + ':sottotipoevento' => 'REQ', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000102', + ':ccp' => 'c0000000000000000000000000000102', + ':noticenumber' => '301000000000000102', + ':creditorreferenceid' => '01000000000000102', + ':paymenttoken' => 'c0000000000000000000000000000102', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000117', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000118', + ':payload' => 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/Pgo8c29hcGVudjpFbnZlbG9wZSB4bWxuczpjb21tb249Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQveHNkL2NvbW1vbi10eXBlcy92MS4wLjAvIiB4bWxuczpwZm49Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQvcHNwL3BzcEZvck5vZGUueHNkIiB4bWxuczpzb2FwZW52PSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy9zb2FwL2VudmVsb3BlLyIgeG1sbnM6eHM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hIiB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNl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Fuc2FjdGlvbklkPjExMTExMTExMTExMTEzPC9wc3BUcmFuc2FjdGlvbklkPgoJCQkJPHRvdGFsQW1vdW50PjQ0LjQwPC90b3RhbEFtb3VudD4KCQkJCTxmZWU+MS41MDwvZmVlPgoJCQkJPHRpbWVzdGFtcE9wZXJhdGlvbj4yMDI0LTA0LTEzVDIzOjIwOjIyPC90aW1lc3RhbXBPcGVyYXRpb24+CgkJCTwvcGF5cGFsUGF5bWVudD4KCQk8L3Bmbjpwc3BOb3RpZnlQYXltZW50UmVxPgoJPC9zb2FwZW52OkJvZHk+Cjwvc29hcGVudjpFbnZlbG9wZT4=', +]; +$data_resp = [ + ':id' => 119, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:44:01.197', + ':tipoevento' => 'pspNotifyPayment', + ':sottotipoevento' => 'RESP', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000102', + ':ccp' => 'c0000000000000000000000000000102', + ':noticenumber' => '301000000000000102', + ':creditorreferenceid' => '01000000000000102', + ':paymenttoken' => 'c0000000000000000000000000000102', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000117', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000119', + ':payload' => 'PFNPQVAtRU5WOkVudmVsb3BlIHhtbG5zOlNPQVAtRU5WPSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy9zb2FwL2VudmVsb3BlLyI+PFNPQVAtRU5WOkhlYWRlci8+PFNPQVAtRU5WOkJvZHk+PG5zMzpwc3BOb3RpZnlQYXltZW50UmVzIHhtbG5zOm5zMz0iaHR0cDovL3BhZ29wYS1hcGkucGFnb3BhLmdvdi5pdC9wc3AvcHNwRm9yTm9kZS54c2QiPjxvdXRjb21lPk9LPC9vdXRjb21lPjwvbnMzOnBzcE5vdGlmeVBheW1lbnRSZXM+PC9TT0FQLUVOVjpCb2R5PjwvU09BUC1FTlY6RW52ZWxvcGU+', +]; + +Capsule::statement($render_query, $data_req); +Capsule::statement($render_query, $data_resp); + + + + +$data_req = [ + ':id' => 120, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:45:00.197', + ':tipoevento' => 'pspNotifyPayment', + ':sottotipoevento' => 'REQ', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000102', + ':ccp' => 'c0000000000000000000000000000102', + ':noticenumber' => '301000000000000102', + ':creditorreferenceid' => '01000000000000102', + ':paymenttoken' => 'c0000000000000000000000000000102', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000118', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000120', + ':payload' => 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/Pgo8c29hcGVudjpFbnZlbG9wZSB4bWxuczpjb21tb249Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQveHNkL2NvbW1vbi10eXBlcy92MS4wLjAvIiB4bWxuczpwZm49Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQvcHNwL3BzcEZvck5vZGUueHNkIiB4bWxuczpzb2FwZW52PSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy9zb2FwL2VudmVsb3BlLyIgeG1sbnM6eHM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hIiB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIj4KCTxzb2FwZW52OkJvZHk+CgkJPHBmbjpwc3BOb3RpZnlQYXltZW50UmVxPgoJCQk8aWRQU1A+QUdJRF8wMTwvaWRQU1A+CgkJCTxpZEJyb2tlclBTUD44ODg4ODg4ODg4ODwvaWRCcm9rZXJQU1A+CgkJCTxpZENoYW5uZWw+ODg4ODg4ODg4ODhfMDE8L2lkQ2hhbm5lbD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GVyYXRpb24+CgkJCTwvcGF5cGFsUGF5bWVudD4KCQk8L3Bmbjpwc3BOb3RpZnlQYXltZW50UmVxPgoJPC9zb2FwZW52OkJvZHk+Cjwvc29hcGVudjpFbnZlbG9wZT4=', +]; +$data_resp = [ + ':id' => 121, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:45:01.197', + ':tipoevento' => 'pspNotifyPayment', + ':sottotipoevento' => 'RESP', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000102', + ':ccp' => 'c0000000000000000000000000000102', + ':noticenumber' => '301000000000000102', + ':creditorreferenceid' => '01000000000000102', + ':paymenttoken' => 'c0000000000000000000000000000102', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000118', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000121', + ':payload' => 'PFNPQVAtRU5WOkVudmVsb3BlIHhtbG5zOlNPQVAtRU5WPSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy9zb2FwL2VudmVsb3BlLyI+PFNPQVAtRU5WOkhlYWRlci8+PFNPQVAtRU5WOkJvZHk+PG5zMzpwc3BOb3RpZnlQYXltZW50UmVzIHhtbG5zOm5zMz0iaHR0cDovL3BhZ29wYS1hcGkucGFnb3BhLmdvdi5pdC9wc3AvcHNwRm9yTm9kZS54c2QiPjxvdXRjb21lPk9LPC9vdXRjb21lPjwvbnMzOnBzcE5vdGlmeVBheW1lbnRSZXM+PC9TT0FQLUVOVjpCb2R5PjwvU09BUC1FTlY6RW52ZWxvcGU+', +]; + +Capsule::statement($render_query, $data_req); +Capsule::statement($render_query, $data_resp); + + + + +$data_req = [ + ':id' => 122, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:46:00.197', + ':tipoevento' => 'sendPaymentOutcome', + ':sottotipoevento' => 'REQ', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000102', + ':ccp' => 'c0000000000000000000000000000102', + ':noticenumber' => '301000000000000102', + ':creditorreferenceid' => '01000000000000102', + ':paymenttoken' => 'c0000000000000000000000000000102', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000119', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000122', + ':payload' => 'PHNvYXA6RW52ZWxvcGUgeG1sbnM6c29hcD0iaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvc29hcC9lbnZlbG9wZS8iPgoJPHNvYXA6Qm9keT4KCQk8bnMyOnNlbmRQYXltZW50T3V0Y29tZVJlcSB4bWxuczpuczI9Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQvbm9kZS9ub2RlRm9yUHNwLnhzZCIgeG1sbnM6bnMzPSJodHRwOi8vd3MucGFnYW1lbnRpLnRlbGVtYXRpY2kuZ292LyI+CgkJCTxpZFBTUD5BR0lEXzAxPC9pZFBTUD4KCQkJPGlkQnJva2VyUFNQPjg4ODg4ODg4ODg4PC9pZEJyb2tlclBTUD4KCQkJPGlkQ2hhbm5lbD44ODg4ODg4ODg4OF8wMTwvaWRDaGFubmVsPgoJCQk8cGFzc3dvcmQ+eHh4eHh4eHg8L3Bhc3N3b3JkPgoJCQk8cGF5bWVudFRva2VuPmMwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMTAxPC9wYXltZW50VG9rZW4+CgkJCTxvdXRjb21lPk9LPC9vdXRjb21lPgoJCQk8ZGV0YWlscz4KCQkJCTxwYXltZW50TWV0aG9kPm90aGVyPC9wYXltZW50TWV0aG9kPgoJCQkJPGZlZT4xLjAwPC9mZWU+CgkJCQk8YXBwbGljYXRpb25EYXRlPjIwMjQtMDQtMDI8L2FwcGxpY2F0aW9uRGF0ZT4KCQkJCTx0cmFuc2ZlckRhdGU+MjAyNC0wNC0wMzwvdHJhbnNmZXJEYXRlPgoJCQk8L2RldGFpbHM+CgkJPC9uczI6c2VuZFBheW1lbnRPdXRjb21lUmVxPgoJPC9zb2FwOkJvZHk+Cjwvc29hcDpFbnZlbG9wZT4=', +]; +$data_resp = [ + ':id' => 123, + ':date_event' => '2024-03-10', + ':inserted_timestamp' => '2024-03-10 15:46:01.197', + ':tipoevento' => 'sendPaymentOutcome', + ':sottotipoevento' => 'RESP', + ':iddominio' => '77777777777', + ':iuv' => '01000000000000102', + ':ccp' => 'c0000000000000000000000000000102', + ':noticenumber' => '301000000000000102', + ':creditorreferenceid' => '01000000000000102', + ':paymenttoken' => 'c0000000000000000000000000000102', + ':psp' => 'AGID_01', + ':stazione' => '77777777777_01', + ':canale' => '88888888888_01', + ':sessionid' => 'sessid_000119', + ':sessionidoriginal' => '', + ':uniqueid' => 'T000123', + ':payload' => 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/Pgo8c29hcGVudjpFbnZlbG9wZSB4bWxuczpjb21tb249Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQveHNkL2NvbW1vbi10eXBlcy92MS4wLjAvIiB4bWxuczpuZnA9Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQvbm9kZS9ub2RlRm9yUHNwLnhzZCIgeG1sbnM6c29hcGVudj0iaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvc29hcC9lbnZlbG9wZS8iIHhtbG5zOnhzPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYSIgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSI+Cgk8c29hcGVudjpCb2R5PgoJCTxuZnA6c2VuZFBheW1lbnRPdXRjb21lUmVzPgoJCQk8b3V0Y29tZT5PSzwvb3V0Y29tZT4KCQk8L25mcDpzZW5kUGF5bWVudE91dGNvbWVSZXM+Cgk8L3NvYXBlbnY6Qm9keT4KPC9zb2FwZW52OkVudmVsb3BlPg==', +]; + Capsule::statement($render_query, $data_req); Capsule::statement($render_query, $data_resp); \ No newline at end of file diff --git a/src/sql/05_2024_insert_data.sql b/src/sql/05_2024_insert_data.sql index 5d71a73d..f9057fcb 100644 --- a/src/sql/05_2024_insert_data.sql +++ b/src/sql/05_2024_insert_data.sql @@ -8,11 +8,13 @@ INSERT INTO mapped_events(tipo_evento,sotto_tipo_evento ,fk_event) values ('pspInviaCarrelloRPT' , 'REQ' , 7), ('pspInviaCarrelloRPT' , 'RESP', 8), ('pspInviaCarrelloRPTCarte' , 'REQ' , 9), - ('pspInviaCarrelloRPTCarte' , 'RESP', 10); - ('nodoInviaRPT' , 'REQ' , 11); - ('nodoInviaRPT' , 'RESP', 12); - ('nodoAttivaRPT' , 'REQ' , 13); - ('nodoAttivaRPT' , 'RESP', 14); + ('pspInviaCarrelloRPTCarte' , 'RESP', 10), + ('nodoInviaRPT' , 'REQ' , 11), + ('nodoInviaRPT' , 'RESP', 12), + ('nodoAttivaRPT' , 'REQ' , 13), + ('nodoAttivaRPT' , 'RESP', 14), + ('pspNotifyPayment' , 'REQ' , 15); + ('pspNotifyPayment' , 'RESP', 16); insert into mapped_payment_methods (tipoversamento, descrizione) values ('CC', 'Carta di Credito'), diff --git a/src/src/crawler/events/req/pspNotifyPayment.php b/src/src/crawler/events/req/pspNotifyPayment.php new file mode 100644 index 00000000..f1ae97df --- /dev/null +++ b/src/src/crawler/events/req/pspNotifyPayment.php @@ -0,0 +1,171 @@ +method = new Payload($this->data['payload']); + } + + /** + * @inheritDoc + */ + public function getIuvs(): array|null + { + $value = $this->getIuv(); + return (is_null($value)) ? $this->getMethodInterface()->getIuvs() : array($value); + } + + /** + * @inheritDoc + */ + public function getPaEmittenti(): array|null + { + $value = $this->getPaEmittente(); + return (is_null($value)) ? $this->getMethodInterface()->getPaEmittenti() : array($value); + } + + /** + * @inheritDoc + */ + public function getCcps(): array|null + { + $value = $this->getCcp(); + return (is_null($value)) ? $this->getMethodInterface()->getCcps() : array($value); + } + + /** + * @inheritDoc + */ + public function transaction(int $index = 0): Transaction|null + { + return null; + } + + public function transactionDetails(int $transfer, int $index = 0): TransactionDetails|null + { + return null; + } + + public function workflowEvent(int $index = 0): Workflow|null + { + $workflow = new Workflow($this->getInsertedTimestamp()); + $workflow->setNewColumnValue('date_event', $this->getInsertedTimestamp()->format('Y-m-d')); + $workflow->setEventTimestamp($this->getInsertedTimestamp()); + $workflow->setEventId($this->getUniqueId()); + $workflow->setFkTipoEvento(MapEvents::getMethodId($this->getTipoEvento(), $this->getSottoTipoEvento())); + + $id_psp = $this->getPsp(); + $stazione = $this->getStazione(); + $canale = $this->getCanale(); + + if (!is_null($id_psp)) + { + $workflow->setPsp($id_psp); + } + if (!is_null($stazione)) + { + $workflow->setStazione($stazione); + } + if (!is_null($canale)) + { + $workflow->setCanale($canale); + } + + return $workflow; + } + + /** + * @inheritDoc + */ + public function getMethodInterface(): Payload + { + return $this->method; + } + + /** + * @inheritDoc + */ + public function getPaymentsCount(): int|null + { + return 1; + } + + /** + * @inheritDoc + */ + public function getTransferCount(int $index = 0): int|null + { + return $this->getMethodInterface()->getTransferCount(); + } + + /** + * @inheritDoc + */ + public function getCacheKeyPayment(): string + { + $iuv = $this->getIuv(0); + $pa_emittente = $this->getPaEmittente(0); + + return base64_encode(sprintf('payment_%s_%s', $iuv, $pa_emittente)); + } + + /** + * @inheritDoc + */ + public function getCacheKeyAttempt(): string + { + $iuv = $this->getIuv(0); + $pa_emittente = $this->getPaEmittente(0); + $token = $this->getCcp(0); + + return base64_encode(sprintf('attempt_%s_%s_%s', $iuv, $pa_emittente, $token)); + } + + /** + * @inheritDoc + */ + public function isFaultEvent(): bool + { + return false; + } + + /** + * @inheritDoc + */ + public function getFaultCode(): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getFaultString(): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getFaultDescription(): string|null + { + return null; + } +} \ No newline at end of file diff --git a/src/src/crawler/events/resp/pspNotifyPayment.php b/src/src/crawler/events/resp/pspNotifyPayment.php new file mode 100644 index 00000000..351c9292 --- /dev/null +++ b/src/src/crawler/events/resp/pspNotifyPayment.php @@ -0,0 +1,180 @@ +method = new Payload($this->data['payload']); + } + + /** + * @inheritDoc + */ + public function getIuvs(): array|null + { + $value = $this->getIuv(); + return (is_null($value)) ? $this->getMethodInterface()->getIuvs() : array($value); + } + + /** + * @inheritDoc + */ + public function getPaEmittenti(): array|null + { + $value = $this->getPaEmittente(); + return (is_null($value)) ? $this->getMethodInterface()->getPaEmittenti() : array($value); + } + + /** + * @inheritDoc + */ + public function getCcps(): array|null + { + $value = $this->getCcp(); + return (is_null($value)) ? $this->getMethodInterface()->getCcps() : array($value); + } + + /** + * @inheritDoc + */ + public function transaction(int $index = 0): Transaction|null + { + return null; + } + + public function transactionDetails(int $transfer, int $index = 0): TransactionDetails|null + { + return null; + } + + public function workflowEvent(int $index = 0): Workflow|null + { + $workflow = new Workflow($this->getInsertedTimestamp()); + $workflow->setNewColumnValue('date_event', $this->getInsertedTimestamp()->format('Y-m-d')); + $workflow->setEventTimestamp($this->getInsertedTimestamp()); + $workflow->setEventId($this->getUniqueId()); + $workflow->setFkTipoEvento(MapEvents::getMethodId($this->getTipoEvento(), $this->getSottoTipoEvento())); + + $id_psp = $this->getPsp(); + $stazione = $this->getStazione(); + $canale = $this->getCanale(); + $faultcode = $this->getFaultcode(); + $outcome = $this->getMethodInterface()->outcome(); + + if (!is_null($id_psp)) + { + $workflow->setPsp($id_psp); + } + if (!is_null($stazione)) + { + $workflow->setStazione($stazione); + } + if (!is_null($canale)) + { + $workflow->setCanale($canale); + } + if (!is_null($faultcode)) + { + $workflow->setFaultcode($faultcode); + } + if (!is_null($outcome)) + { + $workflow->setOutcomeEvent($outcome); + } + + return $workflow; + } + + /** + * @inheritDoc + */ + public function getMethodInterface(): Payload + { + return $this->method; + } + + /** + * @inheritDoc + */ + public function getPaymentsCount(): int|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getTransferCount(int $index = 0): int|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getCacheKeyPayment(): string + { + $iuv = $this->getIuv(0); + $pa_emittente = $this->getPaEmittente(0); + + return base64_encode(sprintf('payment_%s_%s', $iuv, $pa_emittente)); + } + + /** + * @inheritDoc + */ + public function getCacheKeyAttempt(): string + { + $iuv = $this->getIuv(0); + $pa_emittente = $this->getPaEmittente(0); + $token = $this->getCcp(0); + + return base64_encode(sprintf('attempt_%s_%s_%s', $iuv, $pa_emittente, $token)); + } + + /** + * @inheritDoc + */ + public function isFaultEvent(): bool + { + return $this->getMethodInterface()->isFaultEvent(); + } + + /** + * @inheritDoc + */ + public function getFaultCode(): string|null + { + return $this->getMethodInterface()->getFaultCode(); + } + + /** + * @inheritDoc + */ + public function getFaultString(): string|null + { + return $this->getMethodInterface()->getFaultString(); + } + + /** + * @inheritDoc + */ + public function getFaultDescription(): string|null + { + return $this->getMethodInterface()->getFaultDescription(); + } +} \ No newline at end of file diff --git a/src/src/crawler/methods/req/pspNotifyPayment.php b/src/src/crawler/methods/req/pspNotifyPayment.php new file mode 100644 index 00000000..0195195a --- /dev/null +++ b/src/src/crawler/methods/req/pspNotifyPayment.php @@ -0,0 +1,554 @@ +payload = $payload; + } + + public function getChoiceAdditionalPayment() : string|null + { + $element = $this->getElemento('creditCardPayment'); + if (!is_null($element)) + { + return 'creditCardPayment'; + } + $element = $this->getElemento('paypalPayment'); + if (!is_null($element)) + { + return 'paypalPayment'; + } + + $element = $this->getElemento('bancomatpayPayment'); + if (!is_null($element)) + { + return 'bancomatpayPayment'; + } + + $element = $this->getElemento('additionalPaymentInformations'); + if (!is_null($element)) + { + return 'additionalPaymentInformations'; + } + return null; + } + + private function getElemento(string $elemento) : string|null + { + $xml = new \XMLReader(); + $xml->XML($this->payload); + while($xml->read()) + { + if (($xml->nodeType == XMLReader::ELEMENT) && (strtolower($xml->localName) == strtolower($elemento))) + { + return $xml->readString(); + } + } + return null; + } + + private function getTransferListBlock() : string|null + { + $xml = new \XMLReader(); + $xml->XML($this->payload); + while($xml->read()) + { + if (($xml->nodeType == XMLReader::ELEMENT) && (strtolower($xml->localName) == strtolower('transferList'))) + { + return $xml->readOuterXml(); + } + } + return null; + } + + private function getTransferNumber(int $index = 0) : string|null + { + $block = $this->getTransferListBlock(); + $count = 0; + $xml = new \XMLReader(); + $xml->XML($block); + while($xml->read()) + { + if (($xml->nodeType == XMLReader::ELEMENT) && (strtolower($xml->localName) == strtolower('transfer'))) + { + if ($count == $index) + { + return $xml->readOuterXml(); + } + $count++; + } + } + return null; + } + + private function getTransferElement(string $element, int $index = 0) : string|null + { + $block = $this->getTransferNumber($index); + if (is_null($block)) + { + return null; + } + $xml = new XMLReader(); + $xml->XML($block); + while($xml->read()) + { + if (($xml->nodeType == XMLReader::ELEMENT) && (strtolower($xml->localName) == strtolower($element))) + { + return $xml->readString(); + } + } + return null; + } + + private function getMetadataBlock(int $index = 0) : string|null + { + $block = $this->getTransferNumber($index); + $xml = new XMLReader(); + $xml->XML($block); + while($xml->read()) + { + if (($xml->nodeType == XMLreader::ELEMENT) && (strtolower($xml->localName) == strtolower('metadata'))) + { + return $xml->readOuterXml(); + } + } + return null; + } + + private function getAdditionalInfoBlock() : string|null + { + $xml = new XMLReader(); + $xml->XML($this->payload); + while($xml->read()) + { + if (($xml->nodeType == XMLReader::ELEMENT) && (strtolower($xml->localName) == strtolower('additionalPaymentInformations'))) + { + return $xml->readOuterXml(); + } + } + return null; + } + + + private function getMetadataPaymentBlock() : string|null + { + $block = $this->getAdditionalInfoBlock(); + if (is_null($block)) + { + return null; + } + $xml = new XMLReader(); + $xml->XML($block); + while($xml->read()) + { + if (($xml->nodeType == XMLReader::ELEMENT) && (strtolower($xml->localName) == strtolower('metadata'))) + { + return $xml->readOuterXml(); + } + } + return null; + } + + + /** + * @inheritDoc + */ + public function getPaymentsCount(): int|null + { + return 1; + } + + /** + * @inheritDoc + */ + public function getIuvs(): array|null + { + $value = $this->getElemento('creditorReferenceId'); + return (is_null($value)) ? null : array($value); + } + + /** + * @inheritDoc + */ + public function getPaEmittenti(): array|null + { + $value = $this->getElemento('fiscalCodePA'); + return (is_null($value)) ? null : array($value); + } + + /** + * @inheritDoc + */ + public function getCcps(): array|null + { + $value = $this->getElemento('paymentToken'); + return (is_null($value)) ? null : array($value); + } + + /** + * @inheritDoc + */ + public function getAllTokens(): array|null + { + return $this->getCcps(); + } + + /** + * @inheritDoc + */ + public function getAllNoticesNumbers(): array|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getIuv(int $index = 0): string|null + { + return $this->getElemento('creditorReferenceId'); + } + + /** + * @inheritDoc + */ + public function getPaEmittente(int $index = 0): string|null + { + return $this->getElemento('fiscalCodePA'); + } + + /** + * @inheritDoc + */ + public function getCcp(int $index = 0): string|null + { + return $this->getElemento('paymentToken'); + } + + /** + * @inheritDoc + */ + public function getToken(int $index = 0): string|null + { + return $this->getElemento('paymentToken'); + } + + /** + * @inheritDoc + */ + public function getNoticeNumber(int $index = 0): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getImportoTotale(): string|null + { + return $this->getElemento('debtAmount'); + } + + /** + * @inheritDoc + */ + public function getImporto(int $index = 0): string|null + { + return $this->getElemento('debtAmount'); + } + + /** + * @inheritDoc + */ + public function getTransferAmount(int $transfer = 0, int $index = 0): string|null + { + return $this->getTransferElement('transferAmount', $transfer); + } + + /** + * @inheritDoc + */ + public function getTransferPa(int $transfer = 0, int $index = 0): string|null + { + return $this->getTransferElement('fiscalCodePA', $transfer); + } + + /** + * @inheritDoc + */ + public function getTransferIban(int $transfer = 0, int $index = 0): string|null + { + return $this->getTransferElement('IBAN', $transfer); + } + + /** + * @inheritDoc + */ + public function getTransferId(int $transfer = 0, int $index = 0): string|null + { + return $this->getTransferElement('idTransfer', $transfer); + } + + /** + * @inheritDoc + */ + public function getTransferCount(int $index = 0): int|null + { + $xmlPart = $this->getTransferListBlock(); + $count = 0; + $xml = new XMLReader(); + $xml->XML($xmlPart); + while($xml->read()) + { + if (($xml->nodeType == XMLReader::ELEMENT) && (strtolower($xml->localName) == strtolower('transfer'))) + { + $count++; + } + } + return $count; + } + + /** + * @inheritDoc + */ + public function isBollo(int $transfer = 0, int $index = 0): bool + { + return false; + } + + /** + * @inheritDoc + */ + public function getPsp(): string|null + { + return $this->getElemento('idPSP'); + } + + /** + * @inheritDoc + */ + public function getBrokerPsp(): string|null + { + return $this->getElemento('idBrokerPSP'); + } + + /** + * @inheritDoc + */ + public function getCanale(): string|null + { + return $this->getElemento('idChannel'); + } + + /** + * @inheritDoc + */ + public function getBrokerPa(): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getStazione(): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function outcome(): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getPaymentMetaDataCount(int $index = 0): string|null + { + $metadata_block = $this->getMetadataPaymentBlock(); + if (is_null($metadata_block)) + { + return 0; + } + $count = 0; + $xml = new XMLReader(); + $xml->XML($metadata_block); + while($xml->read()) + { + if (($xml->nodeType == XMLReader::ELEMENT) && ($xml->localName == 'mapEntry')) + { + $count++; + } + } + return $count; + } + + /** + * @inheritDoc + */ + public function getPaymentMetaDataKey(int $index = 0, int $metaKey = 0): string|null + { + $block = $this->getMetadataPaymentBlock(); + if (is_null($block)) + { + return null; + } + $count = 0; + $xml = new XMLReader(); + $xml->XML($block); + while($xml->read()) + { + if (($xml->nodeType == XMLReader::ELEMENT) && ($xml->localName == 'key')) + { + if ($count == $metaKey) + { + return $xml->readString(); + } + $count++; + } + } + return null; + } + + /** + * @inheritDoc + */ + public function getPaymentMetaDataValue(int $index = 0, int $metaKey = 0): string|null + { + $block = $this->getMetadataPaymentBlock(); + if (is_null($block)) + { + return null; + } + $count = 0; + $xml = new XMLReader(); + $xml->XML($block); + while($xml->read()) + { + if (($xml->nodeType == XMLReader::ELEMENT) && ($xml->localName == 'value')) + { + if ($count == $metaKey) + { + return $xml->readString(); + } + $count++; + } + } + return null; + } + + /** + * @inheritDoc + */ + public function getTransferMetaDataCount(int $transfer = 0, int $index = 0): string|null + { + $block = $this->getMetadataBlock($transfer); + if (is_null($block)) + { + return 0; + } + $count = 0; + $xml = new XMLReader(); + $xml->XML($block); + while($xml->read()) + { + if (($xml->nodeType == XMLReader::ELEMENT) && (strtolower($xml->localName) == strtolower('key'))) + { + $count++; + } + } + return $count; + } + + /** + * @inheritDoc + */ + public function getTransferMetaDataKey(int $transfer = 0, int $index = 0, int $metaKey = 0): string|null + { + $block = $this->getMetadataBlock($transfer); + if (is_null($block)) + { + return null; + } + $count = 0; + $xml = new XMLReader(); + $xml->XML($block); + while($xml->read()) + { + if (($xml->nodeType == XMLReader::ELEMENT) && (strtolower($xml->localName) == strtolower('key'))) + { + if ($count == $metaKey) + { + return $xml->readString(); + } + $count++; + } + } + return null; + } + + /** + * @inheritDoc + */ + public function getTransferMetaDataValue(int $transfer = 0, int $index = 0, int $metaKey = 0): string|null + { + $block = $this->getMetadataBlock($transfer); + if (is_null($block)) + { + return null; + } + $count = 0; + $xml = new XMLReader(); + $xml->XML($block); + while($xml->read()) + { + if (($xml->nodeType == XMLReader::ELEMENT) && (strtolower($xml->localName) == strtolower('value'))) + { + if ($count == $metaKey) + { + return $xml->readString(); + } + $count++; + } + } + return null; + } + public function getRRN() : string|null + { + return $this->getElemento('rrn'); + } + + public function getAuthCode() : string|null + { + return $this->getElemento('authorizationCode'); + } + + public function getTransactionId() : string|null + { + return $this->getElemento('transactionId'); + } + + public function getPspTransactionId() : string|null + { + return $this->getElemento('pspTransactionId'); + } + +} \ No newline at end of file diff --git a/src/src/crawler/methods/resp/pspNotifyPayment.php b/src/src/crawler/methods/resp/pspNotifyPayment.php new file mode 100644 index 00000000..f88b7e32 --- /dev/null +++ b/src/src/crawler/methods/resp/pspNotifyPayment.php @@ -0,0 +1,317 @@ +payload = $payload; + } + + private function getElemento(string $elemento) : string|null + { + $xml = new \XMLReader(); + $xml->XML($this->payload); + while($xml->read()) + { + if (($xml->nodeType == XMLReader::ELEMENT) && (strtolower($xml->localName) == strtolower($elemento))) + { + return $xml->readString(); + } + } + return null; + } + + /** + * @inheritDoc + */ + public function getPaymentsCount(): int|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getIuvs(): array|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getPaEmittenti(): array|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getCcps(): array|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getAllTokens(): array|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getAllNoticesNumbers(): array|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getIuv(int $index = 0): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getPaEmittente(int $index = 0): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getCcp(int $index = 0): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getToken(int $index = 0): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getNoticeNumber(int $index = 0): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getImportoTotale(): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getImporto(int $index = 0): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getTransferAmount(int $transfer = 0, int $index = 0): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getTransferPa(int $transfer = 0, int $index = 0): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getTransferIban(int $transfer = 0, int $index = 0): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getTransferId(int $transfer = 0, int $index = 0): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getTransferCount(int $index = 0): int|null + { + return null; + } + + /** + * @inheritDoc + */ + public function isBollo(int $transfer = 0, int $index = 0): bool + { + return false; + } + + /** + * @inheritDoc + */ + public function getPsp(): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getBrokerPsp(): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getCanale(): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getBrokerPa(): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getStazione(): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function outcome(): string|null + { + return $this->getElemento('outcome'); + } + + /** + * @inheritDoc + */ + public function getPaymentMetaDataCount(int $index = 0): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getPaymentMetaDataKey(int $index = 0, int $metaKey = 0): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getPaymentMetaDataValue(int $index = 0, int $metaKey = 0): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getTransferMetaDataCount(int $transfer = 0, int $index = 0): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getTransferMetaDataKey(int $transfer = 0, int $index = 0, int $metaKey = 0): string|null + { + return null; + } + + /** + * @inheritDoc + */ + public function getTransferMetaDataValue(int $transfer = 0, int $index = 0, int $metaKey = 0): string|null + { + return null; + } + + /** + * @return bool + */ + public function isFaultEvent(): bool + { + return !is_null($this->getElemento('faultCode')); + } + + /** + * @return string|null + */ + public function getFaultCode(): string|null + { + return $this->getElemento('faultCode'); + } + + /** + * @return string|null + */ + public function getFaultString(): string|null + { + return $this->getElemento('faultString'); + } + + /** + * @return string|null + */ + public function getFaultDescription(): string|null + { + return $this->getElemento('description'); + } +} \ No newline at end of file diff --git a/src/src/crawler/paymentlist/req/pspNotifyPayment.php b/src/src/crawler/paymentlist/req/pspNotifyPayment.php new file mode 100644 index 00000000..b1c2073a --- /dev/null +++ b/src/src/crawler/paymentlist/req/pspNotifyPayment.php @@ -0,0 +1,149 @@ +setEvent($event); + } + + /** + * @inheritDoc + */ + public function isValidPayment(int $index = 0): bool + { + return ($this->getEvent()->getIuv(0) && $this->getEvent()->getPaEmittente(0)); + } + + /** + * @inheritDoc + */ + public function isAttempt(int $index = 0): bool + { + return ($this->getEvent()->getIuv(0) && $this->getEvent()->getPaEmittente(0) && $this->getEvent()->getPaymentToken(0)); + } + + public function createExtraInfo(CacheObject $cache, int $index = 0): array|null + { + $extra_info = $cache->getExtraInfo(); + if (array_key_exists('typePaymentPspNotifyPayment', $extra_info)) + { + return $cache->getCacheData(); + } + + $type_payment = $this->getEvent()->getMethodInterface()->getChoiceAdditionalPayment(); + if (is_null($type_payment)) + { + return $cache->getCacheData(); + } + $cache_data = [ + 'typePayment' => $this->getEvent()->getMethodInterface()->getChoiceAdditionalPayment() + ]; + + if ($type_payment == 'creditCardPayment') + { + $rrn = $this->getEvent()->getMethodInterface()->getRRN(); + $authcode = $this->getEvent()->getMethodInterface()->getAuthCode(); + $cache_data['rrn'] = $rrn; + $cache_data['authcode'] = $authcode; + $extra_info['typePaymentPspNotifyPayment'] = $cache_data; + $cache->setExtraInfo($extra_info); + + $db_rrn = new ExtraInfo(new \DateTime($cache->getDateEvent()), ['id' => $cache->getId(), 'date_event' => $cache->getDateEvent()]); + $db_rrn->setNewColumnValue('date_event', $cache->getDateEvent()); + $db_rrn->setFkPayment($cache->getId()); + $db_rrn->setMetaData('rrn', $rrn); + $db_rrn->insert(); + DB::statement($db_rrn->getQuery(), $db_rrn->getBindParams()); + + $db_authcode = new ExtraInfo(new \DateTime($cache->getDateEvent()), ['id' => $cache->getId(), 'date_event' => $cache->getDateEvent()]); + $db_authcode->setNewColumnValue('date_event', $cache->getDateEvent()); + $db_authcode->setFkPayment($cache->getId()); + $db_authcode->setMetaData('authcode', $authcode); + $db_authcode->insert(); + DB::statement($db_authcode->getQuery(), $db_authcode->getBindParams()); + + } + + if ($type_payment == 'paypalPayment') + { + $transaction_id = $this->getEvent()->getMethodInterface()->getTransactionId(); + $pspTransactionId = $this->getEvent()->getMethodInterface()->getPspTransactionId(); + $cache_data['pspTransactionId'] = $pspTransactionId; + $cache_data['transactionId'] = $transaction_id; + $extra_info['typePaymentPspNotifyPayment'] = $cache_data; + $cache->setExtraInfo($extra_info); + + $db_transactionId = new ExtraInfo(new \DateTime($cache->getDateEvent()), ['id' => $cache->getId(), 'date_event' => $cache->getDateEvent()]); + $db_transactionId->setNewColumnValue('date_event', $cache->getDateEvent()); + $db_transactionId->setFkPayment($cache->getId()); + $db_transactionId->setMetaData('transactionId', $transaction_id); + $db_transactionId->insert(); + DB::statement($db_transactionId->getQuery(), $db_transactionId->getBindParams()); + + $db_pspTransactionId = new ExtraInfo(new \DateTime($cache->getDateEvent()), ['id' => $cache->getId(), 'date_event' => $cache->getDateEvent()]); + $db_pspTransactionId->setNewColumnValue('date_event', $cache->getDateEvent()); + $db_pspTransactionId->setFkPayment($cache->getId()); + $db_pspTransactionId->setMetaData('pspTransactionId', $pspTransactionId); + $db_pspTransactionId->insert(); + DB::statement($db_pspTransactionId->getQuery(), $db_pspTransactionId->getBindParams()); + + } + + if ($type_payment == 'bancomatpayPayment') + { + $transactionId = $this->getEvent()->getMethodInterface()->getTransactionId(); + $authcode = $this->getEvent()->getMethodInterface()->getAuthCode(); + $cache_data['transactionId'] = $transactionId; + $cache_data['authcode'] = $authcode; + $extra_info['typePaymentPspNotifyPayment'] = $cache_data; + $cache->setExtraInfo($extra_info); + + + + $db_transactionId = new ExtraInfo(new \DateTime($cache->getDateEvent()), ['id' => $cache->getId(), 'date_event' => $cache->getDateEvent()]); + $db_transactionId->setNewColumnValue('date_event', $cache->getDateEvent()); + $db_transactionId->setFkPayment($cache->getId()); + $db_transactionId->setMetaData('transactionId', $transactionId); + $db_transactionId->insert(); + DB::statement($db_transactionId->getQuery(), $db_transactionId->getBindParams()); + + $db_authcode = new ExtraInfo(new \DateTime($cache->getDateEvent()), ['id' => $cache->getId(), 'date_event' => $cache->getDateEvent()]); + $db_authcode->setNewColumnValue('date_event', $cache->getDateEvent()); + $db_authcode->setFkPayment($cache->getId()); + $db_authcode->setMetaData('authcode', $authcode); + $db_authcode->insert(); + DB::statement($db_authcode->getQuery(), $db_authcode->getBindParams()); + } + return $cache->getCacheData(); + } + + + public function updateTransaction(CacheObject $cache, int $index = 0): array|null + { + $id = $cache->getId(); + $date_event = $cache->getDateEvent(); + $transaction = Transaction::getTransactionByIdAndDateEvent($id, $date_event); + + $transaction->setTouchPoint('CHECKOUT'); + $transaction->update(); + DB::statement($transaction->getQuery(), $transaction->getBindParams()); + return $cache->getCacheData(); + } + + +} \ No newline at end of file diff --git a/src/src/crawler/paymentlist/resp/pspNotifyPayment.php b/src/src/crawler/paymentlist/resp/pspNotifyPayment.php new file mode 100644 index 00000000..8c1082aa --- /dev/null +++ b/src/src/crawler/paymentlist/resp/pspNotifyPayment.php @@ -0,0 +1,34 @@ +setEvent($event); + } + + /** + * @inheritDoc + */ + public function isValidPayment(int $index = 0): bool + { + return ($this->getEvent()->getIuv(0) && $this->getEvent()->getPaEmittente(0)); + } + + /** + * @inheritDoc + */ + public function isAttempt(int $index = 0): bool + { + return ($this->getEvent()->getIuv(0) && $this->getEvent()->getPaEmittente(0) && $this->getEvent()->getPaymentToken(0)); + } +} \ No newline at end of file diff --git a/src/tests/pagopa/events/req/pspNotifyPaymentTest.php b/src/tests/pagopa/events/req/pspNotifyPaymentTest.php new file mode 100644 index 00000000..81c43aff --- /dev/null +++ b/src/tests/pagopa/events/req/pspNotifyPaymentTest.php @@ -0,0 +1,273 @@ +pspNotifyPayment_credit_cart = new pspNotifyPayment( + [ + 'date_event' => '2023-09-01', + 'inserted_timestamp' => '2023-09-01 07:37:50', + 'tipoevento' => 'pspNotifyPayment', + 'sottotipoevento' => 'REQ', + 'psp' => 'AGID_01', + 'stazione' => '77777777777_01', + 'canale' => '88888888888_01', + 'sessionid' => '6c9ce650-3542-4a10-b8bb-9c3331d2ebef', + 'sessionidoriginal' => '6c9ce650-3542-4a10-b8bb-9c3331d2ebef', + 'uniqueid' => 'event_no_data', + 'iddominio' => '77777777777', + 'iuv' => '01000000000000010', + 'ccp' => 'c0000000000000000000000000000010', + 'noticeNumber' => '301000000000000010', + 'creditorreferenceid' => '01000000000000010', + 'paymenttoken' => 'c0000000000000000000000000000010', + 'payload' => 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/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PGtleT5jaGlhdmVfMl8xPC9rZXk+CgkJCQkJCQk8dmFsdWU+dmFsdWVfMl8xPC92YWx1ZT4KCQkJCQkJPC9tYXBFbnRyeT4KCQkJCQkJPG1hcEVudHJ5PgoJCQkJCQkJPGtleT5jaGlhdmVfMl8yPC9rZXk+CgkJCQkJCQk8dmFsdWU+dmFsdWVfMl8yPC92YWx1ZT4KCQkJCQkJPC9tYXBFbnRyeT4KCQkJCQk8L21ldGFkYXRhPgoJCQkJPC90cmFuc2Zlcj4KCQkJPC90cmFuc2Zlckxpc3Q+CgkJCTxjcmVkaXRDYXJkUGF5bWVudD4KCQkJCTxycm4+MTExMTExMTExMTExPC9ycm4+CgkJCQk8b3V0Y29tZVBheW1lbnRHYXRld2F5Pk9LPC9vdXRjb21lUGF5bWVudEdhdGV3YXk+CgkJCQk8dG90YWxBbW91bnQ+MzYuMzA8L3RvdGFsQW1vdW50PgoJCQkJPGZlZT4xLjMwPC9mZWU+CgkJCQk8dGltZXN0YW1wT3BlcmF0aW9uPjIwMjQtMDQtMTBUMjE6MTQ6NDc8L3RpbWVzdGFtcE9wZXJhdGlvbj4KCQkJCTxhdXRob3JpemF0aW9uQ29kZT4xMTExMTE8L2F1dGhvcml6YXRpb25Db2RlPgoJCQk8L2NyZWRpdENhcmRQYXltZW50PgoJCTwvcGZuOnBzcE5vdGlmeVBheW1lbnRSZXE+Cgk8L3NvYXBlbnY6Qm9keT4KPC9zb2FwZW52OkVudmVsb3BlPg==' + ] + ); + + $this->pspNotifyPayment_paypal = new pspNotifyPayment( + [ + 'date_event' => '2023-09-01', + 'inserted_timestamp' => '2023-09-01 07:37:50', + 'tipoevento' => 'pspNotifyPayment', + 'sottotipoevento' => 'REQ', + 'psp' => 'AGID_01', + 'stazione' => '77777777777_01', + 'canale' => '88888888888_01', + 'sessionid' => '6c9ce650-3542-4a10-b8bb-9c3331d2ebef', + 'sessionidoriginal' => '6c9ce650-3542-4a10-b8bb-9c3331d2ebef', + 'uniqueid' => 'event_no_data', + 'iddominio' => '77777777777', + 'iuv' => '01000000000000010', + 'ccp' => 'c0000000000000000000000000000010', + 'noticeNumber' => '301000000000000010', + 'creditorreferenceid' => '01000000000000010', + 'paymenttoken' => 'c0000000000000000000000000000010', + 'payload' => 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/Pgo8c29hcGVudjpFbnZlbG9wZSB4bWxuczpjb21tb249Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQveHNkL2NvbW1vbi10eXBlcy92MS4wLjAvIiB4bWxuczpwZm49Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQvcHNwL3BzcEZvck5vZGUueHNkIiB4bWxuczpzb2FwZW52PSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy9zb2FwL2VudmVsb3BlLyIgeG1sbnM6eHM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hIiB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIj4KCTxzb2FwZW52OkJvZHk+CgkJPHBmbjpwc3BOb3RpZnlQYXltZW50UmVxPgoJCQk8aWRQU1A+QUdJRF8wMTwvaWRQU1A+CgkJCTxpZEJyb2tlclBTUD44ODg4ODg4ODg4ODwvaWRCcm9rZXJQU1A+CgkJCTxpZENoYW5uZWw+ODg4ODg4ODg4ODhfMDE8L2lkQ2hhbm5lbD4KCQkJPHBheW1lbnRUb2tlbj5jMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAxMDwvcGF5bWVudFRva2VuPgoJCQk8cGF5bWVudERlc2NyaXB0aW9uPnBhZ2FtZW50byBtdWx0aWJlbmVmaWNpYXJpbzwvcGF5bWVudERlc2NyaXB0aW9uPgoJCQk8ZmlzY2FsQ29kZVBBPjc3Nzc3Nzc3Nzc3PC9maXNjYWxD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NotifyPayment( + [ + 'date_event' => '2023-09-01', + 'inserted_timestamp' => '2023-09-01 07:37:50', + 'tipoevento' => 'pspNotifyPayment', + 'sottotipoevento' => 'REQ', + 'psp' => 'AGID_01', + 'stazione' => '77777777777_01', + 'canale' => '88888888888_01', + 'sessionid' => '6c9ce650-3542-4a10-b8bb-9c3331d2ebef', + 'sessionidoriginal' => '6c9ce650-3542-4a10-b8bb-9c3331d2ebef', + 'uniqueid' => 'event_no_data', + 'iddominio' => '77777777777', + 'iuv' => '01000000000000010', + 'ccp' => 'c0000000000000000000000000000010', + 'noticeNumber' => '301000000000000010', + 'creditorreferenceid' => '01000000000000010', + 'paymenttoken' => 'c0000000000000000000000000000010', + 'payload' => 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/Pgo8c29hcGVudjpFbnZlbG9wZSB4bWxuczpjb21tb249Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQveHNkL2NvbW1vbi10eXBlcy92MS4wLjAvIiB4bWxuczpwZm49Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQvcHNwL3BzcEZvck5vZGUueHNkIiB4bWxuczpzb2FwZW52PSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy9zb2FwL2VudmVsb3BlLyIgeG1sbnM6eHM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hIiB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIj4KCTxzb2FwZW52OkJvZHk+CgkJPHBmbjpwc3BOb3RpZnlQYXltZW50UmVxPgoJCQk8aWRQU1A+QUdJRF8wMTwvaWRQU1A+CgkJCTxpZEJyb2tlclBTUD44ODg4ODg4ODg4ODwvaWRCcm9rZXJQU1A+CgkJCTxpZENoYW5uZWw+ODg4ODg4ODg4ODhfMDE8L2lkQ2h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xLjMwPC9mZWU+CgkJCQk8dGltZXN0YW1wT3BlcmF0aW9uPjIwMjQtMDQtMTBUMjE6MTM6NDI8L3RpbWVzdGFtcE9wZXJhdGlvbj4KCQkJCTxhdXRob3JpemF0aW9uQ29kZT4xMTExMTExMTExMTExMTExMTExMTExMTwvYXV0aG9yaXphdGlvbkNvZGU+CgkJCTwvYmFuY29tYXRwYXlQYXltZW50PgoJCTwvcGZuOnBzcE5vdGlmeVBheW1lbnRSZXE+Cgk8L3NvYXBlbnY6Qm9keT4KPC9zb2FwZW52OkVudmVsb3BlPg==' + ] + ); + + $this->pspNotifyPayment_additionalPayment = new pspNotifyPayment( + [ + 'date_event' => '2023-09-01', + 'inserted_timestamp' => '2023-09-01 07:37:50', + 'tipoevento' => 'pspNotifyPayment', + 'sottotipoevento' => 'REQ', + 'psp' => 'AGID_01', + 'stazione' => '77777777777_01', + 'canale' => '88888888888_01', + 'sessionid' => '6c9ce650-3542-4a10-b8bb-9c3331d2ebef', + 'sessionidoriginal' => '6c9ce650-3542-4a10-b8bb-9c3331d2ebef', + 'uniqueid' => 'event_no_data', + 'iddominio' => '77777777777', + 'iuv' => '01000000000000010', + 'ccp' => 'c0000000000000000000000000000010', + 'noticeNumber' => '301000000000000010', + 'creditorreferenceid' => '01000000000000010', + 'paymenttoken' => 'c0000000000000000000000000000010', + 'payload' => 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/Pgo8c29hcGVudjpFbnZlbG9wZSB4bWxuczpjb21tb249Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQveHNkL2NvbW1vbi10eXBlcy92MS4wLjAvIiB4bWxuczpwZm49Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQvcHNwL3BzcEZvck5vZGUueHNkIiB4bWxuczpzb2FwZW52PSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy9zb2FwL2V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J5PgoJCQkJPC9tZXRhZGF0YT4KCQkJPC9hZGRpdGlvbmFsUGF5bWVudEluZm9ybWF0aW9ucz4KCQk8L3Bmbjpwc3BOb3RpZnlQYXltZW50UmVxPgoJPC9zb2FwZW52OkJvZHk+Cjwvc29hcGVudjpFbnZlbG9wZT4=' + ] + ); + } + + #[TestDox('transaction()')] + public function testTransaction() + { + $this->assertNull($this->pspNotifyPayment_credit_cart->transaction()); + $this->assertNull($this->pspNotifyPayment_bancomat->transaction()); + $this->assertNull($this->pspNotifyPayment_paypal->transaction()); + $this->assertNull($this->pspNotifyPayment_additionalPayment->transaction()); + } + + #[TestDox('getIuvs()')] + public function testGetIuvs() + { + $this->assertEquals(['01000000000000010'], $this->pspNotifyPayment_credit_cart->getIuvs()); + $this->assertEquals(['01000000000000010'], $this->pspNotifyPayment_bancomat->getIuvs()); + $this->assertEquals(['01000000000000010'], $this->pspNotifyPayment_paypal->getIuvs()); + $this->assertEquals(['01000000000000010'], $this->pspNotifyPayment_additionalPayment->getIuvs()); + } + + #[TestDox('workflowEvent()')] + public function testWorkflowEvent() + { + $workflow = $this->pspNotifyPayment_credit_cart->workflowEvent(0); + + $this->assertEquals(15, $workflow->getReadyColumnValue('fk_tipoevento')); + $this->assertEquals('2023-09-01 07:37:50.000', $workflow->getReadyColumnValue('event_timestamp')); + $this->assertEquals('event_no_data', $workflow->getReadyColumnValue('event_id')); + $this->assertEquals('AGID_01', $workflow->getReadyColumnValue('id_psp')); + $this->assertEquals('77777777777_01', $workflow->getReadyColumnValue('stazione')); + $this->assertEquals('88888888888_01', $workflow->getReadyColumnValue('canale')); + $this->assertNull($workflow->getReadyColumnValue('faultcode')); + $this->assertNull($workflow->getReadyColumnValue('outcome')); + + + $workflow = $this->pspNotifyPayment_bancomat->workflowEvent(0); + + $this->assertEquals(15, $workflow->getReadyColumnValue('fk_tipoevento')); + $this->assertEquals('2023-09-01 07:37:50.000', $workflow->getReadyColumnValue('event_timestamp')); + $this->assertEquals('event_no_data', $workflow->getReadyColumnValue('event_id')); + $this->assertEquals('AGID_01', $workflow->getReadyColumnValue('id_psp')); + $this->assertEquals('77777777777_01', $workflow->getReadyColumnValue('stazione')); + $this->assertEquals('88888888888_01', $workflow->getReadyColumnValue('canale')); + $this->assertNull($workflow->getReadyColumnValue('faultcode')); + $this->assertNull($workflow->getReadyColumnValue('outcome')); + + + $workflow = $this->pspNotifyPayment_paypal->workflowEvent(0); + + $this->assertEquals(15, $workflow->getReadyColumnValue('fk_tipoevento')); + $this->assertEquals('2023-09-01 07:37:50.000', $workflow->getReadyColumnValue('event_timestamp')); + $this->assertEquals('event_no_data', $workflow->getReadyColumnValue('event_id')); + $this->assertEquals('AGID_01', $workflow->getReadyColumnValue('id_psp')); + $this->assertEquals('77777777777_01', $workflow->getReadyColumnValue('stazione')); + $this->assertEquals('88888888888_01', $workflow->getReadyColumnValue('canale')); + $this->assertNull($workflow->getReadyColumnValue('faultcode')); + $this->assertNull($workflow->getReadyColumnValue('outcome')); + + + $workflow = $this->pspNotifyPayment_additionalPayment->workflowEvent(0); + + $this->assertEquals(15, $workflow->getReadyColumnValue('fk_tipoevento')); + $this->assertEquals('2023-09-01 07:37:50.000', $workflow->getReadyColumnValue('event_timestamp')); + $this->assertEquals('event_no_data', $workflow->getReadyColumnValue('event_id')); + $this->assertEquals('AGID_01', $workflow->getReadyColumnValue('id_psp')); + $this->assertEquals('77777777777_01', $workflow->getReadyColumnValue('stazione')); + $this->assertEquals('88888888888_01', $workflow->getReadyColumnValue('canale')); + $this->assertNull($workflow->getReadyColumnValue('faultcode')); + $this->assertNull($workflow->getReadyColumnValue('outcome')); + + } + + #[TestDox('getPaEmittenti()')] + public function testGetPaEmittenti() + { + $this->assertEquals(['77777777777'], $this->pspNotifyPayment_credit_cart->getPaEmittenti()); + $this->assertEquals(['77777777777'], $this->pspNotifyPayment_bancomat->getPaEmittenti()); + $this->assertEquals(['77777777777'], $this->pspNotifyPayment_paypal->getPaEmittenti()); + $this->assertEquals(['77777777777'], $this->pspNotifyPayment_additionalPayment->getPaEmittenti()); + } + + #[TestDox('getTransferCount()')] + public function testGetTransferCount() + { + $this->assertEquals(2, $this->pspNotifyPayment_credit_cart->getTransferCount()); + $this->assertEquals(1, $this->pspNotifyPayment_bancomat->getTransferCount()); + $this->assertEquals(1, $this->pspNotifyPayment_paypal->getTransferCount()); + $this->assertEquals(1, $this->pspNotifyPayment_additionalPayment->getTransferCount()); + + } + + #[TestDox('getFaultString()')] + public function testGetFaultString() + { + $this->assertNull($this->pspNotifyPayment_credit_cart->getFaultString()); + $this->assertNull($this->pspNotifyPayment_bancomat->getFaultString()); + $this->assertNull($this->pspNotifyPayment_paypal->getFaultString()); + $this->assertNull($this->pspNotifyPayment_additionalPayment->getFaultString()); + } + + #[TestDox('getMethodInterface()')] + public function testGetMethodInterface() + { + $this->assertInstanceOf(\pagopa\crawler\methods\req\pspNotifyPayment::class, $this->pspNotifyPayment_credit_cart->getMethodInterface()); + $this->assertInstanceOf(\pagopa\crawler\methods\req\pspNotifyPayment::class, $this->pspNotifyPayment_bancomat->getMethodInterface()); + $this->assertInstanceOf(\pagopa\crawler\methods\req\pspNotifyPayment::class, $this->pspNotifyPayment_paypal->getMethodInterface()); + $this->assertInstanceOf(\pagopa\crawler\methods\req\pspNotifyPayment::class, $this->pspNotifyPayment_additionalPayment->getMethodInterface()); + } + + #[TestDox('getFaultDescription()')] + public function testGetFaultDescription() + { + $this->assertNull($this->pspNotifyPayment_credit_cart->getFaultDescription()); + $this->assertNull($this->pspNotifyPayment_bancomat->getFaultDescription()); + $this->assertNull($this->pspNotifyPayment_paypal->getFaultDescription()); + $this->assertNull($this->pspNotifyPayment_additionalPayment->getFaultDescription()); + } + + #[TestDox('getCcps()')] + public function testGetCcps() + { + $this->assertEquals(['c0000000000000000000000000000010'], $this->pspNotifyPayment_credit_cart->getCcps()); + $this->assertEquals(['c0000000000000000000000000000010'], $this->pspNotifyPayment_bancomat->getCcps()); + $this->assertEquals(['c0000000000000000000000000000010'], $this->pspNotifyPayment_paypal->getCcps()); + $this->assertEquals(['c0000000000000000000000000000010'], $this->pspNotifyPayment_additionalPayment->getCcps()); + } + + #[TestDox('getFaultCode()')] + public function testGetFaultCode() + { + $this->assertNull($this->pspNotifyPayment_credit_cart->getFaultCode()); + $this->assertNull($this->pspNotifyPayment_bancomat->getFaultCode()); + $this->assertNull($this->pspNotifyPayment_paypal->getFaultCode()); + $this->assertNull($this->pspNotifyPayment_additionalPayment->getFaultCode()); + } + + #[TestDox('isFaultEvent()')] + public function testIsFaultEvent() + { + $this->assertFalse($this->pspNotifyPayment_credit_cart->isFaultEvent()); + $this->assertFalse($this->pspNotifyPayment_bancomat->isFaultEvent()); + $this->assertFalse($this->pspNotifyPayment_paypal->isFaultEvent()); + $this->assertFalse($this->pspNotifyPayment_additionalPayment->isFaultEvent()); + } + + #[TestDox('transactionDetails()')] + public function testTransactionDetails() + { + $this->assertNull($this->pspNotifyPayment_credit_cart->transactionDetails(0)); + $this->assertNull($this->pspNotifyPayment_bancomat->transactionDetails(0)); + $this->assertNull($this->pspNotifyPayment_paypal->transactionDetails(0)); + $this->assertNull($this->pspNotifyPayment_additionalPayment->transactionDetails(0)); + } + + #[TestDox('getPaymentsCount()')] + public function testGetPaymentsCount() + { + $this->assertEquals(1, $this->pspNotifyPayment_credit_cart->getPaymentsCount()); + $this->assertEquals(1, $this->pspNotifyPayment_bancomat->getPaymentsCount()); + $this->assertEquals(1, $this->pspNotifyPayment_paypal->getPaymentsCount()); + $this->assertEquals(1, $this->pspNotifyPayment_additionalPayment->getPaymentsCount()); + + } +} diff --git a/src/tests/pagopa/events/resp/pspNotifyPaymentTest.php b/src/tests/pagopa/events/resp/pspNotifyPaymentTest.php new file mode 100644 index 00000000..02757fb7 --- /dev/null +++ b/src/tests/pagopa/events/resp/pspNotifyPaymentTest.php @@ -0,0 +1,177 @@ +ok_payment = new pspNotifyPayment( + [ + 'date_event' => '2023-09-01', + 'inserted_timestamp' => '2023-09-01 07:37:50', + 'tipoevento' => 'pspNotifyPayment', + 'sottotipoevento' => 'RESP', + 'psp' => 'AGID_01', + 'stazione' => '77777777777_01', + 'canale' => '88888888888_01', + 'sessionid' => '6c9ce650-3542-4a10-b8bb-9c3331d2ebef', + 'sessionidoriginal' => '6c9ce650-3542-4a10-b8bb-9c3331d2ebef', + 'uniqueid' => 'event_no_data', + 'iddominio' => '77777777777', + 'iuv' => '01000000000000010', + 'ccp' => 'c0000000000000000000000000000010', + 'noticeNumber' => '301000000000000010', + 'creditorreferenceid' => '01000000000000010', + 'paymenttoken' => 'c0000000000000000000000000000010', + 'payload' => 'PFNPQVAtRU5WOkVudmVsb3BlIHhtbG5zOlNPQVAtRU5WPSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy9zb2FwL2VudmVsb3BlLyI+PFNPQVAtRU5WOkhlYWRlci8+PFNPQVAtRU5WOkJvZHk+PG5zMzpwc3BOb3RpZnlQYXltZW50UmVzIHhtbG5zOm5zMz0iaHR0cDovL3BhZ29wYS1hcGkucGFnb3BhLmdvdi5pdC9wc3AvcHNwRm9yTm9kZS54c2QiPjxvdXRjb21lPk9LPC9vdXRjb21lPjwvbnMzOnBzcE5vdGlmeVBheW1lbnRSZXM+PC9TT0FQLUVOVjpCb2R5PjwvU09BUC1FTlY6RW52ZWxvcGU+' + ] + ); + + $this->ko_payment = new pspNotifyPayment( + [ + 'date_event' => '2023-09-01', + 'inserted_timestamp' => '2023-09-01 07:37:50', + 'tipoevento' => 'pspNotifyPayment', + 'sottotipoevento' => 'RESP', + 'psp' => 'AGID_01', + 'stazione' => '77777777777_01', + 'canale' => '88888888888_01', + 'sessionid' => '6c9ce650-3542-4a10-b8bb-9c3331d2ebef', + 'sessionidoriginal' => '6c9ce650-3542-4a10-b8bb-9c3331d2ebef', + 'uniqueid' => 'event_no_data', + 'iddominio' => '77777777777', + 'iuv' => '01000000000000010', + 'ccp' => 'c0000000000000000000000000000010', + 'noticeNumber' => '301000000000000010', + 'creditorreferenceid' => '01000000000000010', + 'paymenttoken' => 'c0000000000000000000000000000010', + 'payload' => 'PHNvYXA6RW52ZWxvcGUgeG1sbnM6c29hcD0iaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvc29hcC9lbnZlbG9wZS8iPgoJPFNPQVAtRU5WOkhlYWRlciB4bWxuczpTT0FQLUVOVj0iaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvc29hcC9lbnZlbG9wZS8iLz4KCTxzb2FwOkJvZHk+CgkJPG5zMjpwc3BOb3RpZnlQYXltZW50UmVzIHhtbG5zOm5zMj0iaHR0cDovL3BhZ29wYS1hcGkucGFnb3BhLmdvdi5pdC9wc3AvcHNwRm9yTm9kZS54c2QiPgoJCQk8b3V0Y29tZT5LTzwvb3V0Y29tZT4KCQkJPGZhdWx0PgoJCQkJPGZhdWx0Q29kZT5DQU5BTEVfQ0FSUkVMTE9fUklGSVVUQVRPPC9mYXVsdENvZGU+CgkJCQk8ZmF1bHRTdHJpbmc+Q2FycmVsbG8gcmlmaXV0YXRvPC9mYXVsdFN0cmluZz4KCQkJCTxpZD4wPC9pZD4KCQkJCTxkZXNjcmlwdGlvbj5FcnJvcmUgQWNjcmVkaXRvOkFQUDo8L2Rlc2NyaXB0aW9uPgoJCQk8L2ZhdWx0PgoJCTwvbnMyOnBzcE5vdGlmeVBheW1lbnRSZXM+Cgk8L3NvYXA6Qm9keT4KPC9zb2FwOkVudmVsb3BlPg==' + ] + ); + } + + #[TestDox('transactionDetails()')] + public function testTransactionDetails() + { + $this->assertNull($this->ok_payment->transactionDetails(0)); + $this->assertNull($this->ko_payment->transactionDetails(0)); + } + + #[TestDox('getMethodInterface()')] + public function testGetMethodInterface() + { + $this->assertInstanceOf(\pagopa\crawler\methods\resp\pspNotifyPayment::class,$this->ok_payment->getMethodInterface()); + $this->assertInstanceOf(\pagopa\crawler\methods\resp\pspNotifyPayment::class,$this->ko_payment->getMethodInterface()); + } + + #[TestDox('getIuvs()')] + public function testGetIuvs() + { + $this->assertEquals(['01000000000000010'], $this->ok_payment->getIuvs()); + $this->assertEquals(['01000000000000010'], $this->ko_payment->getIuvs()); + } + + #[TestDox('getPaymentsCount()')] + public function testGetPaymentsCount() + { + $this->assertNull($this->ok_payment->getPaymentsCount()); + $this->assertNull($this->ko_payment->getPaymentsCount()); + } + + #[TestDox('getFaultDescription()')] + public function testGetFaultDescription() + { + $this->assertNull($this->ok_payment->getFaultDescription()); + $this->assertEquals('Errore Accredito:APP:', $this->ko_payment->getFaultDescription()); + } + + #[TestDox('getTransferCount()')] + public function testGetTransferCount() + { + $this->assertNull($this->ok_payment->getTransferCount()); + $this->assertNull($this->ko_payment->getTransferCount()); + } + + #[TestDox('getCcps()')] + public function testGetCcps() + { + $this->assertEquals(['c0000000000000000000000000000010'], $this->ok_payment->getCcps()); + $this->assertEquals(['c0000000000000000000000000000010'], $this->ko_payment->getCcps()); + } + + #[TestDox('getFaultString()')] + public function testGetFaultString() + { + $this->assertNull($this->ok_payment->getFaultString()); + $this->assertEquals('Carrello rifiutato', $this->ko_payment->getFaultString()); + } + + #[TestDox('getPaEmittenti()')] + public function testGetPaEmittenti() + { + $this->assertEquals(['77777777777'], $this->ok_payment->getPaEmittenti()); + $this->assertEquals(['77777777777'], $this->ko_payment->getPaEmittenti()); + } + + #[TestDox('getFaultCode()')] + public function testGetFaultCode() + { + $this->assertNull($this->ok_payment->getFaultCode()); + $this->assertEquals('CANALE_CARRELLO_RIFIUTATO', $this->ko_payment->getFaultCode()); + } + + #[TestDox('transaction()')] + public function testTransaction() + { + $this->assertNull($this->ok_payment->transaction()); + $this->assertNull($this->ko_payment->transaction()); + } + + #[TestDox('workflowEvent()')] + public function testWorkflowEvent() + { + $workflow = $this->ok_payment->workflowEvent(0); + + $this->assertEquals(16, $workflow->getReadyColumnValue('fk_tipoevento')); + $this->assertEquals('2023-09-01 07:37:50.000', $workflow->getReadyColumnValue('event_timestamp')); + $this->assertEquals('event_no_data', $workflow->getReadyColumnValue('event_id')); + $this->assertEquals('AGID_01', $workflow->getReadyColumnValue('id_psp')); + $this->assertEquals('77777777777_01', $workflow->getReadyColumnValue('stazione')); + $this->assertEquals('88888888888_01', $workflow->getReadyColumnValue('canale')); + $this->assertEquals('OK', $workflow->getReadyColumnValue('outcome')); + $this->assertNull($workflow->getReadyColumnValue('faultcode')); + + + $workflow = $this->ko_payment->workflowEvent(0); + + $this->assertEquals(16, $workflow->getReadyColumnValue('fk_tipoevento')); + $this->assertEquals('2023-09-01 07:37:50.000', $workflow->getReadyColumnValue('event_timestamp')); + $this->assertEquals('event_no_data', $workflow->getReadyColumnValue('event_id')); + $this->assertEquals('AGID_01', $workflow->getReadyColumnValue('id_psp')); + $this->assertEquals('77777777777_01', $workflow->getReadyColumnValue('stazione')); + $this->assertEquals('88888888888_01', $workflow->getReadyColumnValue('canale')); + $this->assertEquals('CANALE_CARRELLO_RIFIUTATO', $workflow->getReadyColumnValue('faultcode')); + $this->assertEquals('KO', $workflow->getReadyColumnValue('outcome')); + + } + + #[TestDox('isFaultEvent()')] + public function testIsFaultEvent() + { + $this->assertFalse($this->ok_payment->isFaultEvent()); + $this->assertTrue($this->ko_payment->isFaultEvent()); + + } +} diff --git a/src/tests/pagopa/methods/req/pspNotifyPaymentTest.php b/src/tests/pagopa/methods/req/pspNotifyPaymentTest.php new file mode 100644 index 00000000..95d735a6 --- /dev/null +++ b/src/tests/pagopa/methods/req/pspNotifyPaymentTest.php @@ -0,0 +1,413 @@ +pspNotifyPayment_credit_cart = new pspNotifyPayment(base64_decode('PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/Pgo8c29hcGVudjpFbnZlbG9wZSB4bWxuczpjb21tb249Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQveHNkL2NvbW1vbi10eXBlcy92MS4wLjAvIiB4bWxuczpwZm49Imh0dHA6Ly9wYWdvcGEtYXBpLnBhZ29wYS5nb3YuaXQvcHNwL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vPC9rZXk+CgkJCQkJCTx2YWx1ZT5DUDwvdmFsdWU+CgkJCQkJPC9tYXBFbnRyeT4KCQkJCQk8bWFwRW50cnk+CgkJCQkJCTxrZXk+b3V0Y29tZVBheW1lbnRHYXRld2F5PC9rZXk+CgkJCQkJCTx2YWx1ZT5PSzwvdmFsdWU+CgkJCQkJPC9tYXBFbnRyeT4KCQkJCQk8bWFwRW50cnk+CgkJCQkJCTxrZXk+dGltZXN0YW1wT3BlcmF0aW9uPC9rZXk+CgkJCQkJCTx2YWx1ZT4yMDI0LTA0LTEzVDIwOjUyOjEzPC92YWx1ZT4KCQkJCQk8L21hcEVudHJ5PgoJCQkJCTxtYXBFbnRyeT4KCQkJCQkJPGtleT50b3RhbEFtb3VudDwva2V5PgoJCQkJCQk8dmFsdWU+MzYuMzA8L3ZhbHVlPgoJCQkJCTwvbWFwRW50cnk+CgkJCQkJPG1hcEVudHJ5PgoJCQkJCQk8a2V5PmZlZTwva2V5PgoJCQkJCQk8dmFsdWU+MS4zMDwvdmFsdWU+CgkJCQkJPC9tYXBFbnRyeT4KCQkJCQk8bWFwRW50cnk+CgkJCQkJCTxrZXk+YXV0aG9yaXphdGlvbkNvZGU8L2tleT4KCQkJCQkJPHZhbHVlPjExMTExMTwvdmFsdWU+CgkJCQkJPC9tYXBFbnRyeT4KCQkJCQk8bWFwRW50cnk+CgkJCQkJCTxrZXk+cnJuPC9rZXk+CgkJCQkJCTx2YWx1ZT4xMTExMTExMTExMTExPC92YWx1ZT4KCQkJCQk8L21hcEVudHJ5PgoJCQkJPC9tZXRhZGF0YT4KCQkJPC9hZGRpdGlvbmFsUGF5bWVudEluZm9ybWF0aW9ucz4KCQk8L3Bmbjpwc3BOb3RpZnlQYXltZW50UmVxPgoJPC9zb2FwZW52OkJvZHk+Cjwvc29hcGVudjpFbnZlbG9wZT4=')); + } + + #[TestDox('getTransferPa()')] + public function testGetTransferPa() + { + $this->assertEquals('77777777777', $this->pspNotifyPayment_credit_cart->getTransferPa(0, 0)); + $this->assertEquals('77777777778', $this->pspNotifyPayment_credit_cart->getTransferPa(1, 0)); + $this->assertNull($this->pspNotifyPayment_credit_cart->getTransferPa(2, 0)); + + $this->assertEquals('77777777777', $this->pspNotifyPayment_paypal->getTransferPa(0, 0)); + $this->assertNull($this->pspNotifyPayment_paypal->getTransferPa(1, 0)); + + $this->assertEquals('77777777777', $this->pspNotifyPayment_bancomat->getTransferPa(0, 0)); + $this->assertNull($this->pspNotifyPayment_bancomat->getTransferPa(1, 0)); + + $this->assertEquals('77777777777', $this->pspNotifyPayment_additionalPayment->getTransferPa(0, 0)); + $this->assertNull($this->pspNotifyPayment_additionalPayment->getTransferPa(1, 0)); + + + } + + #[TestDox('getPaymentMetaDataKey()')] + public function testGetPaymentMetaDataKey() + { + $this->assertNull($this->pspNotifyPayment_credit_cart->getPaymentMetaDataKey(0, 0)); + $this->assertNull($this->pspNotifyPayment_paypal->getPaymentMetaDataKey(0, 0)); + $this->assertNull($this->pspNotifyPayment_bancomat->getPaymentMetaDataKey(0, 0)); + + $this->assertEquals('tipoVersamento', $this->pspNotifyPayment_additionalPayment->getPaymentMetaDataKey(0, 0)); + $this->assertEquals('outcomePaymentGateway', $this->pspNotifyPayment_additionalPayment->getPaymentMetaDataKey(0, 1)); + $this->assertEquals('timestampOperation', $this->pspNotifyPayment_additionalPayment->getPaymentMetaDataKey(0, 2)); + $this->assertEquals('totalAmount', $this->pspNotifyPayment_additionalPayment->getPaymentMetaDataKey(0, 3)); + $this->assertEquals('fee', $this->pspNotifyPayment_additionalPayment->getPaymentMetaDataKey(0, 4)); + $this->assertEquals('authorizationCode', $this->pspNotifyPayment_additionalPayment->getPaymentMetaDataKey(0, 5)); + $this->assertEquals('rrn', $this->pspNotifyPayment_additionalPayment->getPaymentMetaDataKey(0, 6)); + + } + + #[TestDox('getTransferId()')] + public function testGetTransferId() + { + $this->assertEquals(1, $this->pspNotifyPayment_credit_cart->getTransferId(0)); + $this->assertEquals(2, $this->pspNotifyPayment_credit_cart->getTransferId(1)); + $this->assertNull($this->pspNotifyPayment_credit_cart->getTransferId(2)); + + $this->assertEquals(1, $this->pspNotifyPayment_paypal->getTransferId(0)); + $this->assertNull($this->pspNotifyPayment_paypal->getTransferId(1)); + + $this->assertEquals(1, $this->pspNotifyPayment_bancomat->getTransferId(0)); + $this->assertNull($this->pspNotifyPayment_bancomat->getTransferId(1)); + + $this->assertEquals(1, $this->pspNotifyPayment_additionalPayment->getTransferId(0)); + $this->assertNull($this->pspNotifyPayment_additionalPayment->getTransferId(1)); + + } + + #[TestDox('getPaEmittente()')] + public function testGetPaEmittente() + { + $this->assertEquals('77777777777', $this->pspNotifyPayment_credit_cart->getPaEmittente()); + $this->assertEquals('77777777777', $this->pspNotifyPayment_paypal->getPaEmittente()); + $this->assertEquals('77777777777', $this->pspNotifyPayment_bancomat->getPaEmittente()); + $this->assertEquals('77777777777', $this->pspNotifyPayment_additionalPayment->getPaEmittente()); + } + + #[TestDox('getTransferAmount()')] + public function testGetTransferAmount() + { + $this->assertEquals('20.00', $this->pspNotifyPayment_credit_cart->getTransferAmount(0)); + $this->assertEquals('15.00', $this->pspNotifyPayment_credit_cart->getTransferAmount(1)); + $this->assertNull($this->pspNotifyPayment_credit_cart->getTransferAmount(2)); + + $this->assertEquals('35.00', $this->pspNotifyPayment_paypal->getTransferAmount(0)); + $this->assertNull($this->pspNotifyPayment_paypal->getTransferAmount(1)); + + $this->assertEquals('35.00', $this->pspNotifyPayment_bancomat->getTransferAmount(0)); + $this->assertNull($this->pspNotifyPayment_bancomat->getTransferAmount(1)); + + $this->assertEquals('35.00', $this->pspNotifyPayment_additionalPayment->getTransferAmount(0)); + $this->assertNull($this->pspNotifyPayment_additionalPayment->getTransferAmount(1)); + + } + + #[TestDox('getPsp()')] + public function testGetPsp() + { + $this->assertEquals('AGID_01', $this->pspNotifyPayment_credit_cart->getPsp()); + $this->assertEquals('AGID_01', $this->pspNotifyPayment_paypal->getPsp()); + $this->assertEquals('AGID_01', $this->pspNotifyPayment_bancomat->getPsp()); + $this->assertEquals('AGID_01', $this->pspNotifyPayment_additionalPayment->getPsp()); + } + + #[TestDox('getCanale()')] + public function testGetCanale() + { + $this->assertEquals('88888888888_01', $this->pspNotifyPayment_credit_cart->getCanale()); + $this->assertEquals('88888888888_01', $this->pspNotifyPayment_paypal->getCanale()); + $this->assertEquals('88888888888_01', $this->pspNotifyPayment_bancomat->getCanale()); + $this->assertEquals('88888888888_01', $this->pspNotifyPayment_additionalPayment->getCanale()); + } + + #[TestDox('getNoticeNumber()')] + public function testGetNoticeNumber() + { + $this->assertNull($this->pspNotifyPayment_credit_cart->getNoticeNumber()); + $this->assertNull($this->pspNotifyPayment_paypal->getNoticeNumber()); + $this->assertNull($this->pspNotifyPayment_bancomat->getNoticeNumber()); + $this->assertNull($this->pspNotifyPayment_additionalPayment->getNoticeNumber()); + } + + #[TestDox('getTransferCount()')] + public function testGetTransferCount() + { + $this->assertEquals(2, $this->pspNotifyPayment_credit_cart->getTransferCount(0)); + $this->assertEquals(1, $this->pspNotifyPayment_paypal->getTransferCount(0)); + $this->assertEquals(1, $this->pspNotifyPayment_bancomat->getTransferCount(0)); + $this->assertEquals(1, $this->pspNotifyPayment_additionalPayment->getTransferCount(0)); + } + + #[TestDox('getTransferMetaDataValue()')] + public function testGetTransferMetaDataValue() + { + $this->assertNull($this->pspNotifyPayment_additionalPayment->getTransferMetaDataValue(0, 0, 0)); + $this->assertNull($this->pspNotifyPayment_additionalPayment->getTransferMetaDataValue(0, 0, 1)); + + $this->assertNull($this->pspNotifyPayment_paypal->getTransferMetaDataValue(0, 0, 0)); + $this->assertNull($this->pspNotifyPayment_paypal->getTransferMetaDataValue(0, 0, 1)); + + $this->assertNull($this->pspNotifyPayment_bancomat->getTransferMetaDataValue(0, 0, 0)); + $this->assertNull($this->pspNotifyPayment_bancomat->getTransferMetaDataValue(0, 0, 1)); + + $this->assertEquals('value_1_1', $this->pspNotifyPayment_credit_cart->getTransferMetaDataValue(0, 0, 0)); + $this->assertEquals('value_1_2', $this->pspNotifyPayment_credit_cart->getTransferMetaDataValue(0, 0, 1)); + $this->assertNull($this->pspNotifyPayment_credit_cart->getTransferMetaDataValue(0, 0, 2)); + + $this->assertEquals('value_2_1', $this->pspNotifyPayment_credit_cart->getTransferMetaDataValue(1, 0, 0)); + $this->assertEquals('value_2_2', $this->pspNotifyPayment_credit_cart->getTransferMetaDataValue(1, 0, 1)); + $this->assertNull($this->pspNotifyPayment_credit_cart->getTransferMetaDataValue(1, 0, 2)); + + } + + #[TestDox('getRRN()')] + public function testGetRRN() + { + $this->assertEquals('111111111111', $this->pspNotifyPayment_credit_cart->getRRN(0)); + $this->assertNull($this->pspNotifyPayment_paypal->getRRN()); + $this->assertNull($this->pspNotifyPayment_bancomat->getRRN()); + $this->assertNull($this->pspNotifyPayment_additionalPayment->getRRN()); + } + + #[TestDox('getAllNoticesNumbers()')] + public function testGetAllNoticesNumbers() + { + $this->assertNull($this->pspNotifyPayment_credit_cart->getAllNoticesNumbers()); + $this->assertNull($this->pspNotifyPayment_paypal->getAllNoticesNumbers()); + $this->assertNull($this->pspNotifyPayment_bancomat->getAllNoticesNumbers()); + $this->assertNull($this->pspNotifyPayment_additionalPayment->getAllNoticesNumbers()); + } + + #[TestDox('getImporto()')] + public function testGetImporto() + { + $this->assertEquals('35.00', $this->pspNotifyPayment_credit_cart->getImporto(0)); + $this->assertEquals('35.00', $this->pspNotifyPayment_paypal->getImporto(0)); + $this->assertEquals('35.00', $this->pspNotifyPayment_bancomat->getImporto(0)); + $this->assertEquals('35.00', $this->pspNotifyPayment_additionalPayment->getImporto(0)); + } + + #[TestDox('getImportoTotale()')] + public function testGetImportoTotale() + { + $this->assertEquals('35.00', $this->pspNotifyPayment_credit_cart->getImportoTotale(0)); + $this->assertEquals('35.00', $this->pspNotifyPayment_paypal->getImportoTotale(0)); + $this->assertEquals('35.00', $this->pspNotifyPayment_bancomat->getImportoTotale(0)); + $this->assertEquals('35.00', $this->pspNotifyPayment_additionalPayment->getImportoTotale(0)); + } + + #[TestDox('getBrokerPsp()')] + public function testGetBrokerPsp() + { + $this->assertEquals('88888888888', $this->pspNotifyPayment_credit_cart->getBrokerPsp(0)); + $this->assertEquals('88888888888', $this->pspNotifyPayment_paypal->getBrokerPsp(0)); + $this->assertEquals('88888888888', $this->pspNotifyPayment_bancomat->getBrokerPsp(0)); + $this->assertEquals('88888888888', $this->pspNotifyPayment_additionalPayment->getBrokerPsp(0)); + } + + #[TestDox('getIuv()')] + public function testGetIuv() + { + $this->assertEquals('01000000000000010', $this->pspNotifyPayment_credit_cart->getIuv(0)); + $this->assertEquals('01000000000000010', $this->pspNotifyPayment_paypal->getIuv(0)); + $this->assertEquals('01000000000000010', $this->pspNotifyPayment_bancomat->getIuv(0)); + $this->assertEquals('01000000000000010', $this->pspNotifyPayment_additionalPayment->getIuv(0)); + } + + #[TestDox('getTransactionId()')] + public function testGetTransactionId() + { + $this->assertNull($this->pspNotifyPayment_credit_cart->getTransactionId(0)); + $this->assertEquals('111111111', $this->pspNotifyPayment_paypal->getTransactionId(0)); + $this->assertEquals('111111111', $this->pspNotifyPayment_bancomat->getTransactionId(0)); + $this->assertNull($this->pspNotifyPayment_additionalPayment->getTransactionId(0)); + } + + #[TestDox('getBrokerPa()')] + public function testGetBrokerPa() + { + $this->assertNull($this->pspNotifyPayment_credit_cart->getBrokerPa()); + $this->assertNull($this->pspNotifyPayment_paypal->getBrokerPa()); + $this->assertNull($this->pspNotifyPayment_bancomat->getBrokerPa()); + $this->assertNull($this->pspNotifyPayment_additionalPayment->getBrokerPa()); + } + + #[TestDox('getIuvs()')] + public function testGetIuvs() + { + $this->assertEquals(['01000000000000010'], $this->pspNotifyPayment_credit_cart->getIuvs(0)); + $this->assertEquals(['01000000000000010'], $this->pspNotifyPayment_paypal->getIuvs(0)); + $this->assertEquals(['01000000000000010'], $this->pspNotifyPayment_bancomat->getIuvs(0)); + $this->assertEquals(['01000000000000010'], $this->pspNotifyPayment_additionalPayment->getIuvs(0)); + } + + #[TestDox('getTransferIban()')] + public function testGetTransferIban() + { + $this->assertEquals('IT0000000000000000000000001', $this->pspNotifyPayment_credit_cart->getTransferIban(0)); + $this->assertEquals('IT0000000000000000000000002', $this->pspNotifyPayment_credit_cart->getTransferIban(1)); + $this->assertNull($this->pspNotifyPayment_credit_cart->getTransferIban(2)); + + $this->assertEquals('IT0000000000000000000000001', $this->pspNotifyPayment_paypal->getTransferIban(0)); + $this->assertNull($this->pspNotifyPayment_paypal->getTransferIban(1)); + + $this->assertEquals('IT0000000000000000000000001', $this->pspNotifyPayment_bancomat->getTransferIban(0)); + $this->assertNull($this->pspNotifyPayment_bancomat->getTransferIban(1)); + + $this->assertEquals('IT0000000000000000000000001', $this->pspNotifyPayment_additionalPayment->getTransferIban(0)); + $this->assertNull($this->pspNotifyPayment_additionalPayment->getTransferIban(1)); + } + + #[TestDox('getPaymentMetaDataValue()')] + public function testGetPaymentMetaDataValue() + { + $this->assertNull($this->pspNotifyPayment_credit_cart->getPaymentMetaDataValue(0, 0)); + $this->assertNull($this->pspNotifyPayment_paypal->getPaymentMetaDataValue(0, 0)); + $this->assertNull($this->pspNotifyPayment_bancomat->getPaymentMetaDataValue(0, 0)); + + $this->assertEquals('CP', $this->pspNotifyPayment_additionalPayment->getPaymentMetaDataValue(0, 0)); + $this->assertEquals('OK', $this->pspNotifyPayment_additionalPayment->getPaymentMetaDataValue(0, 1)); + $this->assertEquals('2024-04-13T20:52:13', $this->pspNotifyPayment_additionalPayment->getPaymentMetaDataValue(0, 2)); + $this->assertEquals('36.30', $this->pspNotifyPayment_additionalPayment->getPaymentMetaDataValue(0, 3)); + $this->assertEquals('1.30', $this->pspNotifyPayment_additionalPayment->getPaymentMetaDataValue(0, 4)); + $this->assertEquals('111111', $this->pspNotifyPayment_additionalPayment->getPaymentMetaDataValue(0, 5)); + $this->assertEquals('1111111111111', $this->pspNotifyPayment_additionalPayment->getPaymentMetaDataValue(0, 6)); + } + + #[TestDox('getPaEmittenti()')] + public function testGetPaEmittenti() + { + $this->assertEquals(['77777777777'], $this->pspNotifyPayment_credit_cart->getPaEmittenti(0)); + $this->assertEquals(['77777777777'], $this->pspNotifyPayment_paypal->getPaEmittenti(0)); + $this->assertEquals(['77777777777'], $this->pspNotifyPayment_bancomat->getPaEmittenti(0)); + $this->assertEquals(['77777777777'], $this->pspNotifyPayment_additionalPayment->getPaEmittenti(0)); + } + + #[TestDox('getPaymentMetaDataCount()')] + public function testGetPaymentMetaDataCount() + { + $this->assertEquals(0, $this->pspNotifyPayment_credit_cart->getPaymentMetaDataCount(0)); + $this->assertEquals(0, $this->pspNotifyPayment_paypal->getPaymentMetaDataCount(0)); + $this->assertEquals(0, $this->pspNotifyPayment_bancomat->getPaymentMetaDataCount(0)); + $this->assertEquals(7, $this->pspNotifyPayment_additionalPayment->getPaymentMetaDataCount(0)); + + } + + #[TestDox('getAuthCode()')] + public function testGetAuthCode() + { + $this->assertEquals('111111', $this->pspNotifyPayment_credit_cart->getAuthCode(0)); + $this->assertNull($this->pspNotifyPayment_paypal->getAuthCode(0)); + $this->assertEquals('11111111111111111111111', $this->pspNotifyPayment_bancomat->getAuthCode(0)); + $this->assertNull($this->pspNotifyPayment_additionalPayment->getAuthCode(0)); + } + + #[TestDox('getPaymentsCount()')] + public function testGetPaymentsCount() + { + $this->assertEquals(1, $this->pspNotifyPayment_credit_cart->getPaymentsCount(0)); + $this->assertEquals(1, $this->pspNotifyPayment_paypal->getPaymentsCount(0)); + $this->assertEquals(1, $this->pspNotifyPayment_bancomat->getPaymentsCount(0)); + $this->assertEquals(1, $this->pspNotifyPayment_additionalPayment->getPaymentsCount(0)); + } + + #[TestDox('isBollo()')] + public function testIsBollo() + { + $this->assertFalse($this->pspNotifyPayment_credit_cart->isBollo(0)); + $this->assertFalse($this->pspNotifyPayment_paypal->isBollo(0)); + $this->assertFalse($this->pspNotifyPayment_bancomat->isBollo(0)); + $this->assertFalse($this->pspNotifyPayment_additionalPayment->isBollo(0)); + } + + #[TestDox('getAllTokens()')] + public function testGetAllTokens() + { + $this->assertEquals(['c0000000000000000000000000000010'], $this->pspNotifyPayment_credit_cart->getAllTokens(0)); + $this->assertEquals(['c0000000000000000000000000000010'], $this->pspNotifyPayment_paypal->getAllTokens(0)); + $this->assertEquals(['c0000000000000000000000000000010'], $this->pspNotifyPayment_bancomat->getAllTokens(0)); + $this->assertEquals(['c0000000000000000000000000000010'], $this->pspNotifyPayment_additionalPayment->getAllTokens(0)); + } + + #[TestDox('getToken()')] + public function testGetToken() + { + $this->assertEquals('c0000000000000000000000000000010', $this->pspNotifyPayment_credit_cart->getToken(0)); + $this->assertEquals('c0000000000000000000000000000010', $this->pspNotifyPayment_paypal->getToken(0)); + $this->assertEquals('c0000000000000000000000000000010', $this->pspNotifyPayment_bancomat->getToken(0)); + $this->assertEquals('c0000000000000000000000000000010', $this->pspNotifyPayment_additionalPayment->getToken(0)); + } + + #[TestDox('getTransferMetaDataCount()')] + public function testGetTransferMetaDataCount() + { + $this->assertEquals(2, $this->pspNotifyPayment_credit_cart->getTransferMetaDataCount(0, 0)); + $this->assertEquals(2, $this->pspNotifyPayment_credit_cart->getTransferMetaDataCount(0, 0)); + + $this->assertEquals(0, $this->pspNotifyPayment_paypal->getTransferMetaDataCount(0, 0)); + $this->assertEquals(0, $this->pspNotifyPayment_bancomat->getTransferMetaDataCount(0, 0)); + $this->assertEquals(0, $this->pspNotifyPayment_additionalPayment->getTransferMetaDataCount(0, 0)); + } + + #[TestDox('outcome()')] + public function testOutcome() + { + $this->assertNull($this->pspNotifyPayment_credit_cart->outcome()); + $this->assertNull($this->pspNotifyPayment_paypal->outcome()); + $this->assertNull($this->pspNotifyPayment_bancomat->outcome()); + $this->assertNull($this->pspNotifyPayment_additionalPayment->outcome()); + } + + #[TestDox('getStazione()')] + public function testGetStazione() + { + $this->assertNull($this->pspNotifyPayment_credit_cart->getStazione()); + $this->assertNull($this->pspNotifyPayment_paypal->getStazione()); + $this->assertNull($this->pspNotifyPayment_bancomat->getStazione()); + $this->assertNull($this->pspNotifyPayment_additionalPayment->getStazione()); + } + + #[TestDox('getTransferMetaDataKey()')] + public function testGetTransferMetaDataKey() + { + $this->assertNull($this->pspNotifyPayment_additionalPayment->getTransferMetaDataKey(0, 0, 0)); + $this->assertNull($this->pspNotifyPayment_additionalPayment->getTransferMetaDataKey(0, 0, 1)); + + $this->assertNull($this->pspNotifyPayment_paypal->getTransferMetaDataKey(0, 0, 0)); + $this->assertNull($this->pspNotifyPayment_paypal->getTransferMetaDataKey(0, 0, 1)); + + $this->assertNull($this->pspNotifyPayment_bancomat->getTransferMetaDataKey(0, 0, 0)); + $this->assertNull($this->pspNotifyPayment_bancomat->getTransferMetaDataKey(0, 0, 1)); + + $this->assertEquals('chiave_1_1', $this->pspNotifyPayment_credit_cart->getTransferMetaDataKey(0, 0, 0)); + $this->assertEquals('chiave_1_2', $this->pspNotifyPayment_credit_cart->getTransferMetaDataKey(0, 0, 1)); + $this->assertNull($this->pspNotifyPayment_credit_cart->getTransferMetaDataKey(0, 0, 2)); + + $this->assertEquals('chiave_2_1', $this->pspNotifyPayment_credit_cart->getTransferMetaDataKey(1, 0, 0)); + $this->assertEquals('chiave_2_2', $this->pspNotifyPayment_credit_cart->getTransferMetaDataKey(1, 0, 1)); + $this->assertNull($this->pspNotifyPayment_credit_cart->getTransferMetaDataKey(1, 0, 2)); + } + + #[TestDox('getCcps()')] + public function testGetCcps() + { + $this->assertEquals(['c0000000000000000000000000000010'], $this->pspNotifyPayment_credit_cart->getCcps(0)); + $this->assertEquals(['c0000000000000000000000000000010'], $this->pspNotifyPayment_paypal->getCcps(0)); + $this->assertEquals(['c0000000000000000000000000000010'], $this->pspNotifyPayment_bancomat->getCcps(0)); + $this->assertEquals(['c0000000000000000000000000000010'], $this->pspNotifyPayment_additionalPayment->getCcps(0)); + } + + #[TestDox('getCcp()')] + public function testGetCcp() + { + $this->assertEquals('c0000000000000000000000000000010', $this->pspNotifyPayment_credit_cart->getCcp(0)); + $this->assertEquals('c0000000000000000000000000000010', $this->pspNotifyPayment_paypal->getCcp(0)); + $this->assertEquals('c0000000000000000000000000000010', $this->pspNotifyPayment_bancomat->getCcp(0)); + $this->assertEquals('c0000000000000000000000000000010', $this->pspNotifyPayment_additionalPayment->getCcp(0)); + } +} diff --git a/src/tests/pagopa/methods/resp/pspNotifyPaymentTest.php b/src/tests/pagopa/methods/resp/pspNotifyPaymentTest.php new file mode 100644 index 00000000..7bda1b9a --- /dev/null +++ b/src/tests/pagopa/methods/resp/pspNotifyPaymentTest.php @@ -0,0 +1,268 @@ +ok_instance = new pspNotifyPayment(base64_decode('PFNPQVAtRU5WOkVudmVsb3BlIHhtbG5zOlNPQVAtRU5WPSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy9zb2FwL2VudmVsb3BlLyI+PFNPQVAtRU5WOkhlYWRlci8+PFNPQVAtRU5WOkJvZHk+PG5zMzpwc3BOb3RpZnlQYXltZW50UmVzIHhtbG5zOm5zMz0iaHR0cDovL3BhZ29wYS1hcGkucGFnb3BhLmdvdi5pdC9wc3AvcHNwRm9yTm9kZS54c2QiPjxvdXRjb21lPk9LPC9vdXRjb21lPjwvbnMzOnBzcE5vdGlmeVBheW1lbnRSZXM+PC9TT0FQLUVOVjpCb2R5PjwvU09BUC1FTlY6RW52ZWxvcGU+')); + $this->ko_instance = new pspNotifyPayment(base64_decode('PHNvYXA6RW52ZWxvcGUgeG1sbnM6c29hcD0iaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvc29hcC9lbnZlbG9wZS8iPgoJPFNPQVAtRU5WOkhlYWRlciB4bWxuczpTT0FQLUVOVj0iaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvc29hcC9lbnZlbG9wZS8iLz4KCTxzb2FwOkJvZHk+CgkJPG5zMjpwc3BOb3RpZnlQYXltZW50UmVzIHhtbG5zOm5zMj0iaHR0cDovL3BhZ29wYS1hcGkucGFnb3BhLmdvdi5pdC9wc3AvcHNwRm9yTm9kZS54c2QiPgoJCQk8b3V0Y29tZT5LTzwvb3V0Y29tZT4KCQkJPGZhdWx0PgoJCQkJPGZhdWx0Q29kZT5DQU5BTEVfQ0FSUkVMTE9fUklGSVVUQVRPPC9mYXVsdENvZGU+CgkJCQk8ZmF1bHRTdHJpbmc+Q2FycmVsbG8gcmlmaXV0YXRvPC9mYXVsdFN0cmluZz4KCQkJCTxpZD4wPC9pZD4KCQkJCTxkZXNjcmlwdGlvbj5FcnJvcmUgQWNjcmVkaXRvOkFQUDo8L2Rlc2NyaXB0aW9uPgoJCQk8L2ZhdWx0PgoJCTwvbnMyOnBzcE5vdGlmeVBheW1lbnRSZXM+Cgk8L3NvYXA6Qm9keT4KPC9zb2FwOkVudmVsb3BlPg==')); + } + + #[TestDox('getIuvs()')] + public function testGetIuvs() + { + $this->assertNull($this->ok_instance->getIuvs()); + $this->assertNull($this->ko_instance->getIuvs()); + } + + #[TestDox('getPaEmittenti()')] + public function testGetPaEmittenti() + { + $this->assertNull($this->ok_instance->getPaEmittenti()); + $this->assertNull($this->ko_instance->getPaEmittenti()); + } + + #[TestDox('getTransferAmount()')] + public function testGetTransferAmount() + { + $this->assertNull($this->ok_instance->getTransferAmount()); + $this->assertNull($this->ko_instance->getTransferAmount()); + } + + #[TestDox('getCcps()')] + public function testGetCcps() + { + $this->assertNull($this->ok_instance->getCcps()); + $this->assertNull($this->ko_instance->getCcps()); + } + + #[TestDox('getAllTokens()')] + public function testGetAllTokens() + { + $this->assertNull($this->ok_instance->getAllTokens()); + $this->assertNull($this->ko_instance->getAllTokens()); + } + + #[TestDox('outcome()')] + public function testOutcome() + { + $this->assertEquals('OK', $this->ok_instance->outcome()); + $this->assertEquals('KO', $this->ko_instance->outcome()); + } + + #[TestDox('getFaultString()')] + public function testGetFaultString() + { + $this->assertNull($this->ok_instance->getFaultString()); + $this->assertEquals('Carrello rifiutato', $this->ko_instance->getFaultString()); + } + + #[TestDox('getPaymentMetaDataCount()')] + public function testGetPaymentMetaDataCount() + { + $this->assertNull($this->ok_instance->getPaymentMetaDataCount()); + $this->assertNull($this->ko_instance->getPaymentMetaDataCount()); + } + + #[TestDox('isBollo()')] + public function testIsBollo() + { + $this->assertFalse($this->ok_instance->isBollo()); + $this->assertFalse($this->ko_instance->isBollo()); + } + + #[TestDox('getPsp()')] + public function testGetPsp() + { + $this->assertNull($this->ok_instance->getPsp()); + $this->assertNull($this->ko_instance->getPsp()); + } + + #[TestDox('getTransferId()')] + public function testGetTransferId() + { + $this->assertNull($this->ok_instance->getTransferId()); + $this->assertNull($this->ko_instance->getTransferId()); + } + + #[TestDox('getStazione()')] + public function testGetStazione() + { + $this->assertNull($this->ok_instance->getStazione()); + $this->assertNull($this->ko_instance->getStazione()); + } + + #[TestDox('getImporto()')] + public function testGetImporto() + { + $this->assertNull($this->ok_instance->getImporto()); + $this->assertNull($this->ko_instance->getImporto()); + } + + #[TestDox('getFaultCode()')] + public function testGetFaultCode() + { + $this->assertNull($this->ok_instance->getFaultCode()); + $this->assertEquals('CANALE_CARRELLO_RIFIUTATO', $this->ko_instance->getFaultCode()); + } + + #[TestDox('getPaymentsCount()')] + public function testGetPaymentsCount() + { + $this->assertNull($this->ok_instance->getPaymentsCount()); + $this->assertNull($this->ko_instance->getPaymentsCount()); + } + + #[TestDox('getFaultDescription()')] + public function testGetFaultDescription() + { + $this->assertNull($this->ok_instance->getFaultDescription()); + $this->assertEquals('Errore Accredito:APP:', $this->ko_instance->getFaultDescription()); + + } + + #[TestDox('getCanale()')] + public function testGetCanale() + { + $this->assertNull($this->ok_instance->getCanale()); + $this->assertNull($this->ko_instance->getCanale()); + } + + #[TestDox('getBrokerPa()')] + public function testGetBrokerPa() + { + $this->assertNull($this->ok_instance->getBrokerPa()); + $this->assertNull($this->ko_instance->getBrokerPa()); + } + + #[TestDox('getTransferCount()')] + public function testGetTransferCount() + { + $this->assertNull($this->ok_instance->getTransferCount()); + $this->assertNull($this->ko_instance->getTransferCount()); + } + + #[TestDox('getTransferMetaDataCount()')] + public function testGetTransferMetaDataCount() + { + $this->assertNull($this->ok_instance->getTransferMetaDataCount()); + $this->assertNull($this->ko_instance->getTransferMetaDataCount()); + } + + #[TestDox('getBrokerPsp()')] + public function testGetBrokerPsp() + { + $this->assertNull($this->ok_instance->getBrokerPsp()); + $this->assertNull($this->ko_instance->getBrokerPsp()); + } + + #[TestDox('getNoticeNumber()')] + public function testGetNoticeNumber() + { + $this->assertNull($this->ok_instance->getNoticeNumber()); + $this->assertNull($this->ko_instance->getNoticeNumber()); + } + + #[TestDox('getTransferMetaDataKey()')] + public function testGetTransferMetaDataKey() + { + $this->assertNull($this->ok_instance->getTransferMetaDataKey()); + $this->assertNull($this->ko_instance->getTransferMetaDataKey()); + } + + #[TestDox('getCcp()')] + public function testGetCcp() + { + $this->assertNull($this->ok_instance->getCcp()); + $this->assertNull($this->ko_instance->getCcp()); + } + + #[TestDox('getTransferMetaDataValue()')] + public function testGetTransferMetaDataValue() + { + $this->assertNull($this->ok_instance->getTransferMetaDataValue()); + $this->assertNull($this->ko_instance->getTransferMetaDataValue()); + } + + #[TestDox('getIuv()')] + public function testGetIuv() + { + $this->assertNull($this->ok_instance->getIuv()); + $this->assertNull($this->ko_instance->getIuv()); + } + + #[TestDox('getPaEmittente()')] + public function testGetPaEmittente() + { + $this->assertNull($this->ok_instance->getPaEmittente()); + $this->assertNull($this->ko_instance->getPaEmittente()); + } + + #[TestDox('getImportoTotale()')] + public function testGetImportoTotale() + { + $this->assertNull($this->ok_instance->getImportoTotale()); + $this->assertNull($this->ko_instance->getImportoTotale()); + } + + #[TestDox('getPaymentMetaDataKey()')] + public function testGetPaymentMetaDataKey() + { + $this->assertNull($this->ok_instance->getPaymentMetaDataKey()); + $this->assertNull($this->ko_instance->getPaymentMetaDataKey()); + } + + #[TestDox('getTransferPa()')] + public function testGetTransferPa() + { + $this->assertNull($this->ok_instance->getTransferPa()); + $this->assertNull($this->ko_instance->getTransferPa()); + } + + #[TestDox('isFaultEvent()')] + public function testIsFaultEvent() + { + $this->assertFalse($this->ok_instance->isFaultEvent()); + $this->assertTrue($this->ko_instance->isFaultEvent()); + } + + #[TestDox('getPaymentMetaDataValue()')] + public function testGetPaymentMetaDataValue() + { + $this->assertNull($this->ok_instance->getPaymentMetaDataValue()); + $this->assertNull($this->ko_instance->getPaymentMetaDataValue()); + } + + #[TestDox('getTransferIban()')] + public function testGetTransferIban() + { + $this->assertNull($this->ok_instance->getTransferIban()); + $this->assertNull($this->ko_instance->getTransferIban()); + } + + #[TestDox('getToken()')] + public function testGetToken() + { + $this->assertNull($this->ok_instance->getToken()); + $this->assertNull($this->ko_instance->getToken()); + } + + #[TestDox('getAllNoticesNumbers()')] + public function testGetAllNoticesNumbers() + { + $this->assertNull($this->ok_instance->getAllNoticesNumbers()); + $this->assertNull($this->ko_instance->getAllNoticesNumbers()); + } +} diff --git a/src/tests/phpunit.xml b/src/tests/phpunit.xml index 5dd92fa7..ca6d63bd 100644 --- a/src/tests/phpunit.xml +++ b/src/tests/phpunit.xml @@ -26,7 +26,7 @@ - process/crawler/nodoAttivaRPT/T00046_nodoAttivaRPT_PreviousAttivaRPT_FaultCode.php + process/crawler/pspNotifyPayment/T00049_WorkFlow_WithPspNotifyPayment_Paypal.php process/crawler/activatePaymentNotice/SingleEvent/T00001_CreateAttemptAllInfoInEvent.php @@ -66,6 +66,9 @@ process/crawler/nodoInviaRPT/T00044_nodoInviaRPT_NoPreviousAttivaRPT.php process/crawler/nodoAttivaRPT/T00045_nodoAttivaRPT_PreviousAttivaRPT.php process/crawler/nodoAttivaRPT/T00046_nodoAttivaRPT_PreviousAttivaRPT_FaultCode.php + process/crawler/pspNotifyPayment/T00047_WorkFlow_WithPspNotifyPayment_CreditCard.php + process/crawler/pspNotifyPayment/T00048_WorkFlow_WithPspNotifyPayment_BancomatPay.php + process/crawler/pspNotifyPayment/T00049_WorkFlow_WithPspNotifyPayment_Paypal.php @@ -77,6 +80,7 @@ pagopa/methods/req/pspInviaCarrelloRPTCarteTest.php pagopa/methods/req/nodoInviaRPTTest.php pagopa/methods/req/nodoAttivaRPTTest.php + pagopa/methods/req/pspNotifyPaymentTest.php pagopa/methods/resp/activatePaymentNoticeTest.php @@ -86,6 +90,7 @@ pagopa/methods/resp/pspInviaCarrelloRPTCarteTest.php pagopa/methods/resp/nodoInviaRPTTest.php pagopa/methods/resp/nodoAttivaRPTTest.php + pagopa/methods/resp/pspNotifyPaymentTest.php pagopa/events/req/activatePaymentNoticeTest.php @@ -95,6 +100,7 @@ pagopa/events/req/pspInviaCarrelloRPTCarteTest.php pagopa/events/req/nodoInviaRPTTest.php pagopa/events/req/nodoAttivaRPTTest.php + pagopa/events/req/pspNotifyPaymentTest.php pagopa/events/resp/activatePaymentNoticeTest.php @@ -104,6 +110,7 @@ pagopa/events/resp/pspInviaCarrelloRPTCarteTest.php pagopa/events/resp/nodoInviaRPTTest.php pagopa/events/resp/nodoAttivaRPTTest.php + pagopa/events/resp/pspNotifyPaymentTest.php process/normal/T0001.php diff --git a/src/tests/process/crawler/pspNotifyPayment/T00047_WorkFlow_WithPspNotifyPayment_CreditCard.php b/src/tests/process/crawler/pspNotifyPayment/T00047_WorkFlow_WithPspNotifyPayment_CreditCard.php new file mode 100644 index 00000000..d6914543 --- /dev/null +++ b/src/tests/process/crawler/pspNotifyPayment/T00047_WorkFlow_WithPspNotifyPayment_CreditCard.php @@ -0,0 +1,193 @@ +getTransaction(new \DateTime('2024-03-10'), '01000000000000100'); + $this->assertEquals('2024-03-10 15:43:00.197', $transaction->getColumnValue('inserted_timestamp')); + $this->assertEquals('01000000000000100', $transaction->getColumnValue('iuv')); + $this->assertEquals('77777777777', $transaction->getColumnValue('pa_emittente')); + $this->assertEquals('c0000000000000000000000000000100', $transaction->getColumnValue('token_ccp')); + $this->assertEquals('301000000000000100', $transaction->getColumnValue('notice_id')); + $this->assertEquals('77777777777_01', $transaction->getColumnValue('stazione')); + $this->assertEquals('AGID_01', $transaction->getColumnValue('id_psp')); + $this->assertEquals('88888888888_01', $transaction->getColumnValue('canale')); + $this->assertEquals('CHECKOUT', $transaction->getColumnValue('touchpoint')); + $this->assertEquals('150.00', $transaction->getColumnValue('importo')); + $this->assertEquals('OK', $transaction->getColumnValue('esito')); + $this->assertNull($transaction->getColumnValue('id_carrello')); + $this->assertNull($transaction->getColumnValue('payment_type')); + } + + + #[TestDox('[DETAILS] Verifica assenza dettagli')] + public function testTransactionDetails() + { + $transaction = self::$db->getTransaction(new \DateTime('2024-03-10'), '01000000000000100' ); + + $details = self::$db->getTransactionDetails($transaction, 0); + $this->assertEquals('40.00', $details->getColumnValue('amount_transfer')); + $this->assertEquals('IT18U0000000000000000000002', $details->getColumnValue('iban_transfer')); + $this->assertEquals('77777777778', $details->getColumnValue('pa_transfer')); + $this->assertFalse($details->getColumnValue('is_bollo')); + + $details = self::$db->getTransactionDetails($transaction, 1); + $this->assertEquals('110.00', $details->getColumnValue('amount_transfer')); + $this->assertEquals('IT18U0000000000000000000001', $details->getColumnValue('iban_transfer')); + $this->assertEquals('77777777777', $details->getColumnValue('pa_transfer')); + $this->assertFalse($details->getColumnValue('is_bollo')); + + } + + #[TestDox('[WORKFLOW] Verifica presenza eventi Workflow')] + public function testWorkFlow() + { + $transaction = self::$db->getTransaction(new \DateTime('2024-03-10'), '01000000000000100'); + + $workflow = self::$db->getWorkFlow($transaction, 0); + $this->assertEquals('1', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:43:00.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000100', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + + $workflow = self::$db->getWorkFlow($transaction, 1); + $this->assertEquals('2', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:43:01.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000101', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + $this->assertEquals('OK', $workflow->getColumnValue('outcome')); + + $workflow = self::$db->getWorkFlow($transaction, 2); + $this->assertEquals('15', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:44:00.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000102', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + $this->assertNull($workflow->getColumnValue('outcome')); + + $workflow = self::$db->getWorkFlow($transaction, 3); + $this->assertEquals('16', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:44:01.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000103', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + $this->assertEquals('OK', $workflow->getColumnValue('outcome')); + + + $workflow = self::$db->getWorkFlow($transaction, 4); + $this->assertEquals('15', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:45:00.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000104', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + $this->assertNull($workflow->getColumnValue('outcome')); + + $workflow = self::$db->getWorkFlow($transaction, 5); + $this->assertEquals('16', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:45:01.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000105', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + $this->assertEquals('OK', $workflow->getColumnValue('outcome')); + + + $workflow = self::$db->getWorkFlow($transaction, 6); + $this->assertEquals('5', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:46:00.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000106', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + $this->assertEquals('OK', $workflow->getColumnValue('outcome')); + + $workflow = self::$db->getWorkFlow($transaction, 7); + $this->assertEquals('6', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:46:01.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000107', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + $this->assertEquals('OK', $workflow->getColumnValue('outcome')); + + $workflow = self::$db->getWorkFlow($transaction, 8); + $this->assertNull($workflow); + } + + + #[TestDox('[METADATA] Verifica MetaData')] + public function testMetaData() + { + $transaction = self::$db->getTransaction(new \DateTime('2024-03-10'), '01000000000000100'); + + $details = self::$db->getTransactionDetails($transaction, 1); + $metadata = self::$db->getMetadataTransfer($details, 0); + $this->assertEquals('chiave_1_1', $metadata->getColumnValue('meta_key')); + $this->assertEquals('valore_1_1', $metadata->getColumnValue('meta_value')); + $metadata = self::$db->getMetadataTransfer($details, 1); + $this->assertEquals('chiave_1_2', $metadata->getColumnValue('meta_key')); + $this->assertEquals('valore_1_2', $metadata->getColumnValue('meta_value')); + + $details = self::$db->getTransactionDetails($transaction, 0); + $metadata = self::$db->getMetadataTransfer($details, 0); + $this->assertEquals('chiave_2_1', $metadata->getColumnValue('meta_key')); + $this->assertEquals('valore_2_1', $metadata->getColumnValue('meta_value')); + $metadata = self::$db->getMetadataTransfer($details, 1); + $this->assertEquals('chiave_2_2', $metadata->getColumnValue('meta_key')); + $this->assertEquals('valore_2_2', $metadata->getColumnValue('meta_value')); + + } + + #[TestDox('[EXTRA INFO] Verifica delle informazioni extra')] + public function testExtraInfo() + { + $transaction = self::$db->getTransaction(new \DateTime('2024-03-10'), '01000000000000100'); + + $extra_info_rrn = self::$db->getExtraInfo($transaction, 'rrn'); + $this->assertEquals('111111111111', $extra_info_rrn->getColumnValue('info_value')); + + $extra_info_rrn = self::$db->getExtraInfo($transaction, 'authcode'); + $this->assertEquals('111111', $extra_info_rrn->getColumnValue('info_value')); + + } + + #[TestDox('[ReEvent] Verifica stato evento')] + public function testEvent() + { + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 100); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 101); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 102); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 103); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 104); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 105); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 106); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 107); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + } + +} diff --git a/src/tests/process/crawler/pspNotifyPayment/T00048_WorkFlow_WithPspNotifyPayment_BancomatPay.php b/src/tests/process/crawler/pspNotifyPayment/T00048_WorkFlow_WithPspNotifyPayment_BancomatPay.php new file mode 100644 index 00000000..b90ad4f5 --- /dev/null +++ b/src/tests/process/crawler/pspNotifyPayment/T00048_WorkFlow_WithPspNotifyPayment_BancomatPay.php @@ -0,0 +1,193 @@ +getTransaction(new \DateTime('2024-03-10'), '01000000000000101'); + $this->assertEquals('2024-03-10 15:43:00.197', $transaction->getColumnValue('inserted_timestamp')); + $this->assertEquals('01000000000000101', $transaction->getColumnValue('iuv')); + $this->assertEquals('77777777777', $transaction->getColumnValue('pa_emittente')); + $this->assertEquals('c0000000000000000000000000000101', $transaction->getColumnValue('token_ccp')); + $this->assertEquals('301000000000000101', $transaction->getColumnValue('notice_id')); + $this->assertEquals('77777777777_01', $transaction->getColumnValue('stazione')); + $this->assertEquals('AGID_01', $transaction->getColumnValue('id_psp')); + $this->assertEquals('88888888888_01', $transaction->getColumnValue('canale')); + $this->assertEquals('CHECKOUT', $transaction->getColumnValue('touchpoint')); + $this->assertEquals('150.00', $transaction->getColumnValue('importo')); + $this->assertEquals('OK', $transaction->getColumnValue('esito')); + $this->assertNull($transaction->getColumnValue('id_carrello')); + $this->assertNull($transaction->getColumnValue('payment_type')); + } + + + #[TestDox('[DETAILS] Verifica assenza dettagli')] + public function testTransactionDetails() + { + $transaction = self::$db->getTransaction(new \DateTime('2024-03-10'), '01000000000000101' ); + + $details = self::$db->getTransactionDetails($transaction, 0); + $this->assertEquals('40.00', $details->getColumnValue('amount_transfer')); + $this->assertEquals('IT18U0000000000000000000002', $details->getColumnValue('iban_transfer')); + $this->assertEquals('77777777778', $details->getColumnValue('pa_transfer')); + $this->assertFalse($details->getColumnValue('is_bollo')); + + $details = self::$db->getTransactionDetails($transaction, 1); + $this->assertEquals('110.00', $details->getColumnValue('amount_transfer')); + $this->assertEquals('IT18U0000000000000000000001', $details->getColumnValue('iban_transfer')); + $this->assertEquals('77777777777', $details->getColumnValue('pa_transfer')); + $this->assertFalse($details->getColumnValue('is_bollo')); + + } + + #[TestDox('[WORKFLOW] Verifica presenza eventi Workflow')] + public function testWorkFlow() + { + $transaction = self::$db->getTransaction(new \DateTime('2024-03-10'), '01000000000000101'); + + $workflow = self::$db->getWorkFlow($transaction, 0); + $this->assertEquals('1', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:43:00.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000108', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + + $workflow = self::$db->getWorkFlow($transaction, 1); + $this->assertEquals('2', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:43:01.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000109', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + $this->assertEquals('OK', $workflow->getColumnValue('outcome')); + + $workflow = self::$db->getWorkFlow($transaction, 2); + $this->assertEquals('15', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:44:00.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000110', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + $this->assertNull($workflow->getColumnValue('outcome')); + + $workflow = self::$db->getWorkFlow($transaction, 3); + $this->assertEquals('16', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:44:01.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000111', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + $this->assertEquals('OK', $workflow->getColumnValue('outcome')); + + + $workflow = self::$db->getWorkFlow($transaction, 4); + $this->assertEquals('15', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:45:00.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000112', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + $this->assertNull($workflow->getColumnValue('outcome')); + + $workflow = self::$db->getWorkFlow($transaction, 5); + $this->assertEquals('16', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:45:01.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000113', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + $this->assertEquals('OK', $workflow->getColumnValue('outcome')); + + + $workflow = self::$db->getWorkFlow($transaction, 6); + $this->assertEquals('5', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:46:00.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000114', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + $this->assertEquals('OK', $workflow->getColumnValue('outcome')); + + $workflow = self::$db->getWorkFlow($transaction, 7); + $this->assertEquals('6', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:46:01.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000115', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + $this->assertEquals('OK', $workflow->getColumnValue('outcome')); + + $workflow = self::$db->getWorkFlow($transaction, 8); + $this->assertNull($workflow); + } + + + #[TestDox('[METADATA] Verifica MetaData')] + public function testMetaData() + { + $transaction = self::$db->getTransaction(new \DateTime('2024-03-10'), '01000000000000101'); + + $details = self::$db->getTransactionDetails($transaction, 1); + $metadata = self::$db->getMetadataTransfer($details, 0); + $this->assertEquals('chiave_1_1', $metadata->getColumnValue('meta_key')); + $this->assertEquals('valore_1_1', $metadata->getColumnValue('meta_value')); + $metadata = self::$db->getMetadataTransfer($details, 1); + $this->assertEquals('chiave_1_2', $metadata->getColumnValue('meta_key')); + $this->assertEquals('valore_1_2', $metadata->getColumnValue('meta_value')); + + $details = self::$db->getTransactionDetails($transaction, 0); + $metadata = self::$db->getMetadataTransfer($details, 0); + $this->assertEquals('chiave_2_1', $metadata->getColumnValue('meta_key')); + $this->assertEquals('valore_2_1', $metadata->getColumnValue('meta_value')); + $metadata = self::$db->getMetadataTransfer($details, 1); + $this->assertEquals('chiave_2_2', $metadata->getColumnValue('meta_key')); + $this->assertEquals('valore_2_2', $metadata->getColumnValue('meta_value')); + + } + + #[TestDox('[EXTRA INFO] Verifica delle informazioni extra')] + public function testExtraInfo() + { + $transaction = self::$db->getTransaction(new \DateTime('2024-03-10'), '01000000000000101'); + + $extra_info_rrn = self::$db->getExtraInfo($transaction, 'transactionId'); + $this->assertEquals('111111112', $extra_info_rrn->getColumnValue('info_value')); + + $extra_info_rrn = self::$db->getExtraInfo($transaction, 'authcode'); + $this->assertEquals('11111111111111111111110', $extra_info_rrn->getColumnValue('info_value')); + + } + + #[TestDox('[ReEvent] Verifica stato evento')] + public function testEvent() + { + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 108); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 109); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 110); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 111); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 112); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 113); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 114); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 115); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + } + +} diff --git a/src/tests/process/crawler/pspNotifyPayment/T00049_WorkFlow_WithPspNotifyPayment_Paypal.php b/src/tests/process/crawler/pspNotifyPayment/T00049_WorkFlow_WithPspNotifyPayment_Paypal.php new file mode 100644 index 00000000..830f1334 --- /dev/null +++ b/src/tests/process/crawler/pspNotifyPayment/T00049_WorkFlow_WithPspNotifyPayment_Paypal.php @@ -0,0 +1,193 @@ +getTransaction(new \DateTime('2024-03-10'), '01000000000000102'); + $this->assertEquals('2024-03-10 15:43:00.197', $transaction->getColumnValue('inserted_timestamp')); + $this->assertEquals('01000000000000102', $transaction->getColumnValue('iuv')); + $this->assertEquals('77777777777', $transaction->getColumnValue('pa_emittente')); + $this->assertEquals('c0000000000000000000000000000102', $transaction->getColumnValue('token_ccp')); + $this->assertEquals('301000000000000102', $transaction->getColumnValue('notice_id')); + $this->assertEquals('77777777777_01', $transaction->getColumnValue('stazione')); + $this->assertEquals('AGID_01', $transaction->getColumnValue('id_psp')); + $this->assertEquals('88888888888_01', $transaction->getColumnValue('canale')); + $this->assertEquals('CHECKOUT', $transaction->getColumnValue('touchpoint')); + $this->assertEquals('150.00', $transaction->getColumnValue('importo')); + $this->assertEquals('OK', $transaction->getColumnValue('esito')); + $this->assertNull($transaction->getColumnValue('id_carrello')); + $this->assertNull($transaction->getColumnValue('payment_type')); + } + + + #[TestDox('[DETAILS] Verifica assenza dettagli')] + public function testTransactionDetails() + { + $transaction = self::$db->getTransaction(new \DateTime('2024-03-10'), '01000000000000102' ); + + $details = self::$db->getTransactionDetails($transaction, 0); + $this->assertEquals('40.00', $details->getColumnValue('amount_transfer')); + $this->assertEquals('IT18U0000000000000000000002', $details->getColumnValue('iban_transfer')); + $this->assertEquals('77777777778', $details->getColumnValue('pa_transfer')); + $this->assertFalse($details->getColumnValue('is_bollo')); + + $details = self::$db->getTransactionDetails($transaction, 1); + $this->assertEquals('110.00', $details->getColumnValue('amount_transfer')); + $this->assertEquals('IT18U0000000000000000000001', $details->getColumnValue('iban_transfer')); + $this->assertEquals('77777777777', $details->getColumnValue('pa_transfer')); + $this->assertFalse($details->getColumnValue('is_bollo')); + + } + + #[TestDox('[WORKFLOW] Verifica presenza eventi Workflow')] + public function testWorkFlow() + { + $transaction = self::$db->getTransaction(new \DateTime('2024-03-10'), '01000000000000102'); + + $workflow = self::$db->getWorkFlow($transaction, 0); + $this->assertEquals('1', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:43:00.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000116', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + + $workflow = self::$db->getWorkFlow($transaction, 1); + $this->assertEquals('2', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:43:01.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000117', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + $this->assertEquals('OK', $workflow->getColumnValue('outcome')); + + $workflow = self::$db->getWorkFlow($transaction, 2); + $this->assertEquals('15', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:44:00.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000118', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + $this->assertNull($workflow->getColumnValue('outcome')); + + $workflow = self::$db->getWorkFlow($transaction, 3); + $this->assertEquals('16', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:44:01.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000119', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + $this->assertEquals('OK', $workflow->getColumnValue('outcome')); + + + $workflow = self::$db->getWorkFlow($transaction, 4); + $this->assertEquals('15', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:45:00.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000120', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + $this->assertNull($workflow->getColumnValue('outcome')); + + $workflow = self::$db->getWorkFlow($transaction, 5); + $this->assertEquals('16', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:45:01.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000121', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + $this->assertEquals('OK', $workflow->getColumnValue('outcome')); + + + $workflow = self::$db->getWorkFlow($transaction, 6); + $this->assertEquals('5', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:46:00.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000122', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + $this->assertEquals('OK', $workflow->getColumnValue('outcome')); + + $workflow = self::$db->getWorkFlow($transaction, 7); + $this->assertEquals('6', $workflow->getColumnValue('fk_tipoevento')); + $this->assertEquals('2024-03-10 15:46:01.197', $workflow->getColumnValue('event_timestamp')); + $this->assertEquals('T000123', $workflow->getColumnValue('event_id')); + $this->assertEquals('77777777777_01', $workflow->getColumnValue('stazione')); + $this->assertEquals('OK', $workflow->getColumnValue('outcome')); + + $workflow = self::$db->getWorkFlow($transaction, 8); + $this->assertNull($workflow); + } + + + #[TestDox('[METADATA] Verifica MetaData')] + public function testMetaData() + { + $transaction = self::$db->getTransaction(new \DateTime('2024-03-10'), '01000000000000102'); + + $details = self::$db->getTransactionDetails($transaction, 1); + $metadata = self::$db->getMetadataTransfer($details, 0); + $this->assertEquals('chiave_1_1', $metadata->getColumnValue('meta_key')); + $this->assertEquals('valore_1_1', $metadata->getColumnValue('meta_value')); + $metadata = self::$db->getMetadataTransfer($details, 1); + $this->assertEquals('chiave_1_2', $metadata->getColumnValue('meta_key')); + $this->assertEquals('valore_1_2', $metadata->getColumnValue('meta_value')); + + $details = self::$db->getTransactionDetails($transaction, 0); + $metadata = self::$db->getMetadataTransfer($details, 0); + $this->assertEquals('chiave_2_1', $metadata->getColumnValue('meta_key')); + $this->assertEquals('valore_2_1', $metadata->getColumnValue('meta_value')); + $metadata = self::$db->getMetadataTransfer($details, 1); + $this->assertEquals('chiave_2_2', $metadata->getColumnValue('meta_key')); + $this->assertEquals('valore_2_2', $metadata->getColumnValue('meta_value')); + + } + + #[TestDox('[EXTRA INFO] Verifica delle informazioni extra')] + public function testExtraInfo() + { + $transaction = self::$db->getTransaction(new \DateTime('2024-03-10'), '01000000000000102'); + + $extra_info_rrn = self::$db->getExtraInfo($transaction, 'transactionId'); + $this->assertEquals('111111113', $extra_info_rrn->getColumnValue('info_value')); + + $extra_info_rrn = self::$db->getExtraInfo($transaction, 'pspTransactionId'); + $this->assertEquals('11111111111113', $extra_info_rrn->getColumnValue('info_value')); + + } + + #[TestDox('[ReEvent] Verifica stato evento')] + public function testEvent() + { + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 116); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 117); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 118); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 119); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 120); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 121); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 122); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + $event = self::$db->getReEvent(new \DateTime('2024-03-10'), 123); + $this->assertEquals('LOADED', $event->getColumnValue('state')); + + } + +}