<commit_before><?php
namespace Payum\LaravelPackage\Controller;

use Payum\Core\Request\Refund;
use Symfony\Component\HttpFoundation\Request;

class RefundController extends PayumController
{
    public function doAction($payum_token)
    {
        /** @var Request $request */
        $request = \App::make('request');
        $request->attributes->set('payum_token', $payum_token);

        $token = $this->getHttpRequestVerifier()->verify($request);

        $payment = $this->getPayum()->getPayment($token->getPaymentName());

        $payment->execute(new Refund($token));

        $this->getHttpRequestVerifier()->invalidate($token);

        return \Redirect::to($token->getAfterUrl());
    }
}<commit_msg>Returning 204 if no afterURL on Refund Controller<commit_after><?php
namespace Payum\LaravelPackage\Controller;

use Payum\Core\Request\Refund;
use Symfony\Component\HttpFoundation\Request;

class RefundController extends PayumController
{
    public function doAction($payum_token)
    {
        /** @var Request $request */
        $request = \App::make('request');
        $request->attributes->set('payum_token', $payum_token);

        $token = $this->getHttpRequestVerifier()->verify($request);

        $payment = $this->getPayum()->getPayment($token->getPaymentName());

        $payment->execute(new Refund($token));

        $this->getHttpRequestVerifier()->invalidate($token);

        if($token->getAfterUrl()){
            return \Redirect::to($token->getAfterUrl());
        }

        return \Response::make(null, 204);

    }
}
{'fraction_non_alphanumeric': 0.15552699228791775, 'fraction_numerical': 0.0038560411311053984, 'mean_word_length': 3.675675675675676, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 26, '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': '528094', 'n_tokens_mistral': 457, 'n_tokens_neox': 437, 'n_words': 71}