We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d403e69 commit 30c6db3Copy full SHA for 30c6db3
src/Common/Helper.php
@@ -127,10 +127,13 @@ public static function getGatewayShortName($className)
127
*/
128
public static function getGatewayClassName($shortName)
129
{
130
- if (0 === strpos($shortName, '\\')) {
+ // If the class starts with \ or Omnipay\, assume it's a FQCN
131
+ if (0 === strpos($shortName, '\\') || 0 === strpos($shortName, 'Omnipay\\')) {
132
return $shortName;
133
}
- if (0 === strpos($shortName, 'Omnipay\\')) {
134
+
135
+ // Check if the class exists and implements the Gateway Interface, if so -> FCQN
136
+ if (is_subclass_of($shortName, GatewayInterface::class, true)) {
137
138
139
0 commit comments