public function validateParametersBasedOnTransactionType($transactionType, $buyOrder, $commerceCode, $input)
    {
        if ($transactionType == self::TIENDA_MALL) {
            if (!$commerceCode) {
                $commerceCode = SecurityHelper::getCommonName(
                    $this->service->getCertificationBag()->getClientCertificate()
                );
            }
            if (!$buyOrder) {
                throw new \InvalidArgumentException(
                    'Mall transactions needs a buyOrder defined for the transaction itself 
                    and a buyOrder per transactionDetail. Please add a buyOrder on ->initTransaction()'
                );
            }

            $input->buyOrder = $buyOrder;
            $input->commerceId = $commerceCode;
        }

        if ($transactionType == self::PATPASS) {
            if (!$this->inscriptionInformation) {
                throw new \InvalidArgumentException(
                    'Patpass transactions needs inscriptionInformation to perform the contract with the user. 
                    You need to call ->addInscriptionInfo(..) before ->initInscription().'
                );
            }

            $input->wPMDetail = $this->inscriptionInformation;
        }
    }
public function validateParametersBasedOnTransactionType($transactionType, $buyOrder, $commerceCode, $input)
    {
        if ($transactionType == self::TIENDA_MALL) {
            if (!$commerceCode) {
                $commerceCode = SecurityHelper::getCommonName(
                    $this->service->getCertificationBag()->getClientCertificate()
                );
            }
            if (!$buyOrder) {
                throw new \InvalidArgumentException(
                    'Mall transactions needs a buyOrder defined for the transaction itself 
                    and a buyOrder per transactionDetail. Please add a buyOrder on ->initTransaction()'
                );
            }

            $input->buyOrder = $buyOrder;
            $input->commerceId = $commerceCode;
        }

        if ($transactionType == self::PATPASS) {
            if (!$this->inscriptionInformation) {
                throw new \InvalidArgumentException(
                    'Patpass transactions needs inscriptionInformation to perform the contract with the user. 
                    You need to call ->addInscriptionInfo(..) before ->initInscription().'
                );
            }

            $input->wPMDetail = $this->inscriptionInformation;
        }
    }
public function validateParametersBasedOnTransactionType ( $ transactionType , $ buyOrder , $ commerceCode , $ input ) { if ( $ transactionType == self :: TIENDA_MALL ) { if ( ! $ commerceCode ) { $ commerceCode = SecurityHelper :: getCommonName ( $ this -> service -> getCertificationBag ( ) -> getClientCertificate ( ) ) ; } if ( ! $ buyOrder ) { throw new \ InvalidArgumentException ( 'Mall transactions needs a buyOrder defined for the transaction itself 
                    and a buyOrder per transactionDetail. Please add a buyOrder on ->initTransaction()' ) ; } $ input -> buyOrder = $ buyOrder ; $ input -> commerceId = $ commerceCode ; } if ( $ transactionType == self :: PATPASS ) { if ( ! $ this -> inscriptionInformation ) { throw new \ InvalidArgumentException ( 'Patpass transactions needs inscriptionInformation to perform the contract with the user. 
                    You need to call ->addInscriptionInfo(..) before ->initInscription().' ) ; } $ input -> wPMDetail = $ this -> inscriptionInformation ; } }
Validates parameters based on transaction type

@param string $transactionType Transaction type
@param string $buyOrder Order identifier
@param string $commerceCode Commerce's code
@param InitTransactionInput $input Details of the transaction initialization
Validates parameters based on transaction type