<commit_before><?php
namespace Payum\Bundle\PayumBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

use Payum\Request\NotifyTokenizedDetailsRequest;
use Payum\Registry\RegistryInterface;
use Payum\Bundle\PayumBundle\Service\TokenManager;

class NotifyController extends Controller 
{
    public function doAction(Request $request)
    {
        $token = $this->getTokenManager()->getTokenFromRequest($request);

        $payment = $this->getPayum()->getPayment($token->getPaymentName()); 
        $payment->execute(new NotifyTokenizedDetailsRequest(
            array_replace($request->query->all(), $request->request->all()),
            $token
        ));

        $this->getTokenManager()->deleteToken($token);

        return new Response('', 204);
    }

    /**
     * @return RegistryInterface
     */
    protected function getPayum()
    {
        return $this->get('payum');
    }

    /**
     * @return TokenManager
     */
    protected function getTokenManager()
    {
        return $this->get('payum.token_manager');
    }
}<commit_msg>do not delete token when notification is sent<commit_after><?php
namespace Payum\Bundle\PayumBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

use Payum\Request\NotifyTokenizedDetailsRequest;
use Payum\Registry\RegistryInterface;
use Payum\Bundle\PayumBundle\Service\TokenManager;

class NotifyController extends Controller 
{
    public function doAction(Request $request)
    {
        $token = $this->getTokenManager()->getTokenFromRequest($request);

        $payment = $this->getPayum()->getPayment($token->getPaymentName()); 
        $payment->execute(new NotifyTokenizedDetailsRequest(
            array_replace($request->query->all(), $request->request->all()),
            $token
        ));

        return new Response('', 204);
    }

    /**
     * @return RegistryInterface
     */
    protected function getPayum()
    {
        return $this->get('payum');
    }

    /**
     * @return TokenManager
     */
    protected function getTokenManager()
    {
        return $this->get('payum.token_manager');
    }
}
{'fraction_non_alphanumeric': 0.12704565030146425, 'fraction_numerical': 0.002583979328165375, 'mean_word_length': 3.350187265917603, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5371845', 'n_tokens_mistral': 643, 'n_tokens_neox': 622, 'n_words': 108}