Yoskaldyr
Well-known member
- Affected version
- 2.x
In the Payment\AbstractProvider class in the validateTransaction method this code is used:
But this code doesn't have any checks for providerId. As result in some situations when different providers have the same transaction id some transactions are confirmed incorrectly. Transaction id is unique for the same provider, but doesn't unique between providers
The same problem exists in child provider classes (PayPal, etc...)
PHP:
public function validateTransaction(CallbackState $state)
{
/** @var \XF\Repository\Payment $paymentRepo */
$paymentRepo = \XF::repository('XF:Payment');
if ($paymentRepo->findLogsByTransactionId($state->transactionId)->total())
{
$state->logType = 'info';
$state->logMessage = 'Transaction already processed. Skipping.';
return false;
}
return true;
}
The same problem exists in child provider classes (PayPal, etc...)