| | |
| | | |
| | | use JVBase\base\Site; |
| | | use JVBase\integrations\Integrations; |
| | | use JVBase\integrations\ServiceMap; |
| | | use JVBase\managers\MagicLinks; |
| | | use JVBase\meta\Form; |
| | | use JVBase\meta\Meta; |
| | | |
| | |
| | | */ |
| | | class Checkout |
| | | { |
| | | use ServiceMap; |
| | | public static function getProvider():Integrations|false |
| | | { |
| | | foreach (Site::getIntegrations() as $integration => $active) { |
| | | if (in_array($integration, ['square', 'helcim']) && $active) { |
| | | return JVB()->connect($integration); |
| | | } |
| | | } |
| | | $int = ['square','helcim']; |
| | | foreach ($int as $i) { |
| | | if (Site::hasIntegration($i)) { |
| | | $self = new self(); |
| | | return $self->getService($i); |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | /** |
| | |
| | | $tabs->addTab('thelogin') |
| | | ->title('Login') |
| | | ->description('Login to see past orders and access your saved cards') |
| | | ->content(JVB()->magicLink()->renderForm()); |
| | | ->content(MagicLinks::getInstance()->renderForm()); |
| | | } else { |
| | | $tabs->addTab('account') |
| | | ->title('Account') |