I have a problem with BankLinkService::checkPendingTransactions() where transactions are not being removed from local transaction repository even if response from the gateway indicates that they are successful.
Steps to reproduce:
Initiate a payment with $spp->getBankLinkGateway()->initPayment() with (example) merchant reference ABC.
Complete the payment process, get back to the merchant's store, at which point the callback is executed.
Wait 30 minutes, cron will run $spp->getBankLinkGateway()->checkPendingTransactions(); which will query the gateway for status of transaction with merchant reference ABC. That will trigger the callback in the same manner it did in step 2.
Repeat step 3.
\SwedbankPaymentPortal\BankLink\BankLinkService::handlePendingUnfinishedResponse() has the following code:
On successful transaction result transaction with merchant reference is being removed from transaction repository (->remove($merchantReference)), but then again the container which is obtained with the merchant reference is persisted with ->persist($container) which stores the transaction as pending again.
I have a problem with
BankLinkService::checkPendingTransactions()
where transactions are not being removed from local transaction repository even if response from the gateway indicates that they are successful.Steps to reproduce:
$spp->getBankLinkGateway()->initPayment()
with (example) merchant referenceABC
.$spp->getBankLinkGateway()->checkPendingTransactions();
which will query the gateway for status of transaction with merchant referenceABC
. That will trigger the callback in the same manner it did in step 2.\SwedbankPaymentPortal\BankLink\BankLinkService::handlePendingUnfinishedResponse()
has the following code:On successful transaction result transaction with merchant reference is being removed from transaction repository (
->remove($merchantReference)
), but then again the container which is obtained with the merchant reference is persisted with->persist($container)
which stores the transaction as pending again.