<?php

namespace Oney\ThreeByFour\Gateway\Validator;

use Magento\Payment\Gateway\Validator\AbstractValidator;
use Magento\Payment\Gateway\Validator\ResultInterfaceFactory;
use Oney\ThreeByFour\Logger\Logger;

/**
 * Response Validator
 * 
 * Validates responses from Oney payment gateway.
 * Handles response validation and result creation.
 * 
 * @package Oney\ThreeByFour\Gateway\Validator
 * @version 1.0.0
 * @author Oney
 * @since 1.0.0
 */
class ResponseValidator extends AbstractValidator
{
    /**
     * Logger instance
     * 
     * @var Logger
     * @version 1.0.0
     */
    protected $_logger;

    /**
     * Constructor
     * 
     * @param ResultInterfaceFactory $resultFactory Result factory
     * @param Logger $logger Logger instance
     * @version 1.0.0
     */
    public function __construct(
        ResultInterfaceFactory $resultFactory,
        Logger $logger
    ) {
        $this->_logger = $logger;
        parent::__construct($resultFactory);
    }

    /**
     * Validate response data
     * 
     * @param array $validationSubject Validation subject data
     * @return \Magento\Payment\Gateway\Validator\ResultInterface
     * @version 1.0.0
     */
    public function validate(array $validationSubject)
    {
        $this->_logger->info('[SUCCESS] [JSON] Payment API 1.2 body - Validate order: ', [
            'body' => $validationSubject
        ]);
        return $this->createResult(true, [], []);
    }
}
