Gateway configuration should use the name instead of the classname
dpgover opened this issue · 7 comments
dpgover commented
GatewayManager, line 50:
if(!isset($this->gateways[$class])){
$gateway = $this->factory->create($class, null, $this->app['request']);
$gateway->initialize($this->getConfig($class));
$this->gateways[$class] = $gateway;
}The config gets checked for the classname instead of the gateways name. I think it should be:
if(!isset($this->gateways[$class])){
$gateway = $this->factory->create($class, null, $this->app['request']);
$gateway->initialize($this->getConfig($gateway->getName()));
$this->gateways[$class] = $gateway;
}That way, I can pass a custom gateway without having to use the fully qualified name of the class on the config file...
Am I correct?
Thanks
siarheipashkevich commented
barryvdh commented
Think so indeed
siarheipashkevich commented
@barryvdh may I create a PR with this changes?
barryvdh commented
Sure
siarheipashkevich commented
ammonkc commented
@barryvdh @siarheipashkevich this PR seems to break the default gateway configs. see my comment here.
barryvdh commented
Reverted