Skip to content

Commit

Permalink
fix cache key pspInviaCarrelloRPTCarte
Browse files Browse the repository at this point in the history
  • Loading branch information
esposimo committed Apr 11, 2024
1 parent 986b586 commit 977f202
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
19 changes: 17 additions & 2 deletions src/src/crawler/paymentlist/req/pspInviaCarrelloRPTCarte.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,15 @@ public function isAttempt(int $index = 0): bool
*/
public function isAttemptInCache(int $index = 0): bool
{
$key = $this->getEvent()->getCacheKeyAttempt();
// se sono valorizzate le colonne
$key = $this->getEvent()->getCacheKeyAttempt();
$iuv = $this->getEvent()->getColumn('iuv');
$pa_emittente = $this->getEvent()->getColumn('iddominio');
$token = $this->getEvent()->getColumn('ccp');
if (($iuv) && ($pa_emittente) && ($token))
{
$key = base64_encode(sprintf('attempt_%s_%s_%s', $iuv, $pa_emittente, $token));
}
return $this->hasInCache($key);
}

Expand All @@ -51,7 +59,14 @@ public function isAttemptInCache(int $index = 0): bool
*/
public function isPaymentInCache(int $index = 0): bool
{
$key = $this->getEvent()->getCacheKeyAttempt();
$key = $this->getEvent()->getCacheKeyAttempt();
$iuv = $this->getEvent()->getColumn('iuv');
$pa_emittente = $this->getEvent()->getColumn('iddominio');
$token = $this->getEvent()->getColumn('ccp');
if (($iuv) && ($pa_emittente) && ($token))
{
$key = base64_encode(sprintf('attempt_%s_%s_%s', $iuv, $pa_emittente, $token));
}
return $this->hasInCache($key);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ public function testWorkFlow()
$this->assertEquals('T000085', $workflow->getColumnValue('event_id'));
$this->assertNull($workflow->getColumnValue('stazione'));
$this->assertEquals('OK', $workflow->getColumnValue('outcome'));

}

#[TestDox('[EXTRAINFO] Verifica presenza Extra Info')]
Expand Down

0 comments on commit 977f202

Please sign in to comment.