HEX
Server: LiteSpeed
System: Linux premium127.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User: luxbsolr (925)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/luxbsolr/cardsord.store/wp-content/plugins/shopay-for-woocommerce/syntax-check.php
<?php
/**
 * Quick Plugin Syntax Check
 * Run this to test for PHP syntax errors
 */

if (!defined('ABSPATH')) {
    define('ABSPATH', dirname(__FILE__) . '/');
}

echo "šŸ” Checking plugin files for syntax errors...\n\n";

$files_to_check = [
    'woocommerce-gateway-dummy.php',
    'includes/class-wc-gateway-dummy.php', 
    'includes/class-wc-shopay-payments-admin.php',
    'includes/class-wc-shopay-webhooks.php',
    'includes/blocks/class-wc-dummy-payments-blocks.php'
];

$errors_found = false;

foreach ($files_to_check as $file) {
    if (file_exists($file)) {
        echo "āœ“ Checking {$file}... ";
        
        // Check for syntax errors
        $output = shell_exec("php -l \"{$file}\" 2>&1");
        
        if (strpos($output, 'No syntax errors') !== false) {
            echo "āœ… OK\n";
        } else {
            echo "āŒ SYNTAX ERROR\n";
            echo "   {$output}\n";
            $errors_found = true;
        }
    } else {
        echo "āš ļø  File not found: {$file}\n";
    }
}

echo "\n";

if (!$errors_found) {
    echo "šŸŽ‰ All files passed syntax check!\n";
    echo "   The plugin should activate without fatal errors.\n\n";
    
    echo "šŸ“‹ Next steps:\n";
    echo "   1. Upload plugin to WordPress\n";
    echo "   2. Activate in admin\n"; 
    echo "   3. Configure Shopify settings\n";
    echo "   4. Test the direct redirect flow\n";
} else {
    echo "🚨 Syntax errors found! Fix these before activating.\n";
}

echo "\nšŸ”— Key Integration Points:\n";
echo "   • Gateway: Direct redirect to Shopify (no popups)\n";
echo "   • Return: /?shopay_return=1&order_id=X&order_key=Y\n";
echo "   • Webhook: /wp-json/shopay/v1/webhook/orders-paid\n";
echo "   • Status: /wp-json/shopay/v1/order-status\n";
?>