I have downloaded an example for a payment connection. No i am trying to use it, but the constructor want's to get the interface when i declare ClassName But i have no idea how to do that. I tried
$interface = CallbackInterface::class;
$interface = CallbackInterface();
$interface = CallbackInterface;
And many more , but i can't figure it out. Only thing i know is to implement an interface with a class. Maybe a noob question, but i've searched almost a day with no success.
$config = new Config('string1', 'string2');
$pay = new ClassName($config, $interface);
interface CallbackInterface
{
public function Key($sIdentifier, $sTransactionKey);
public function tSuccess($sTransactionKey);
}
class ClassName
{
public function __construct(Config $oConfig, CallbackInterface $oCallbacks)
{
$this->oConfig = $oConfig;
$this->oCallbacks = $oCallbacks;
}
}