<commit_before><?php

namespace Swarming\SubscribePro\Gateway\Command;

use Exception;
use Magento\Payment\Gateway\CommandInterface;
use Magento\Vault\Model\Ui\VaultConfigProvider;
use Swarming\SubscribePro\Gateway\Request\PaymentDataBuilder;
use Swarming\SubscribePro\Gateway\Request\VaultDataBuilder;

class VerifyCommand extends AbstractProfileCreatorCommand implements CommandInterface
{
    /**
     * @param array $requestData
     * @return \SubscribePro\Service\Transaction\TransactionInterface
     * @throws \InvalidArgumentException
     * @throws \Magento\Framework\Exception\LocalizedException
     * @throws \SubscribePro\Exception\EntityInvalidDataException
     * @throws \SubscribePro\Exception\HttpException
     */
    protected function processTransaction(array $requestData)
    {
        if (empty($requestData[PaymentDataBuilder::PAYMENT_METHOD_TOKEN])) {
            throw new \InvalidArgumentException('Payment token is not passed');
        }

        $transaction = $this->platformTransactionService->createTransaction($requestData);
        $profile = $this->createProfile($requestData);
        $this->platformTransactionService->verifyProfile($profile->getId(), $transaction);

        return $transaction;
    }
}<commit_msg>SPRO-31: Void $1 authorization when adding CC on Wallet<commit_after><?php

declare(strict_types=1);

namespace Swarming\SubscribePro\Gateway\Command;

use Swarming\SubscribePro\Gateway\Request\PaymentDataBuilder;

class VerifyCommand extends AbstractProfileCreatorCommand
{
    /**
     * @param array $requestData
     * @return \SubscribePro\Service\Transaction\TransactionInterface
     * @throws \InvalidArgumentException
     * @throws \Magento\Framework\Exception\LocalizedException
     * @throws \SubscribePro\Exception\EntityInvalidDataException
     * @throws \SubscribePro\Exception\HttpException
     */
    protected function processTransaction(array $requestData)
    {
        if (empty($requestData[PaymentDataBuilder::PAYMENT_METHOD_TOKEN])) {
            throw new \InvalidArgumentException('Payment token is not passed');
        }

        $transaction = $this->platformTransactionService->createTransaction($requestData);
        $profile = $this->createProfile($requestData);
        $this->platformTransactionService->verifyProfile($profile->getId(), $transaction);

        return $transaction;
    }
}
{'fraction_non_alphanumeric': 0.09987410826689047, 'fraction_numerical': 0.001678556441460344, 'mean_word_length': 4.381489841986456, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '2469695', 'n_tokens_mistral': 606, 'n_tokens_neox': 592, 'n_words': 105}