src/main/php/com-realexpayments-hpp-sdk/validators/OtbAmountValidator.php
public function validate($hppRequest, Constraint $constraint)
    {

        //if validate card only flag is true (1), then ensure the amount is set to 0
        if (Flag::TRUE == $hppRequest->getValidateCardOnly()) {
            if ($hppRequest->getAmount() != "0") {
                $this->context->buildViolation($constraint->message)
                    ->atPath('amount')
                    ->addViolation();

            }
        }

    }
public function validate($hppRequest, Constraint $constraint)
    {

        //if validate card only flag is true (1), then ensure the amount is set to 0
        if (Flag::TRUE == $hppRequest->getValidateCardOnly()) {
            if ($hppRequest->getAmount() != "0") {
                $this->context->buildViolation($constraint->message)
                    ->atPath('amount')
                    ->addViolation();

            }
        }

    }
Validates OTB

@param HppRequest $hppRequest
@param Constraint $constraint

@api