diff --git a/src/Factory/PosFactory.php b/src/Factory/PosFactory.php index 028d2bc8..87a17f6f 100644 --- a/src/Factory/PosFactory.php +++ b/src/Factory/PosFactory.php @@ -61,6 +61,12 @@ public static function createPosGateway( throw new BankClassNullException(); } + if (!\in_array(PosInterface::class, \class_implements($class), true)) { + throw new \InvalidArgumentException( + \sprintf('gateway class must be implementation of %s', PosInterface::class) + ); + } + $currencies = []; if (isset($config['currencies'])) { $currencies = $config['currencies'];