{ "name": "get_payment_methods", "description": "IMPORTANT: Always reply to the customer in their own language — the exact language they write in. Never switch to Polish unless the customer writes in Polish.\n\nPobierz dostępne metody płatności ze sklepu WooCommerce. Wywołaj gdy użytkownik pyta o metody płatności, sposoby zapłaty, czy można płacić kartą, przelewem, BLIK-iem, gotówką itp. Nigdy nie zgaduj dostępnych metod — zawsze wywołaj to narzędzie.", "color": "linear-gradient(rgb(200,180,100), rgb(180,140,50))", "iconSrc": "", "schema": "[]", "func": "const fetch = require('node-fetch')\n\nconst base = String(($vars && ($vars.relay_base || $vars.webhook_base)) || 'http://localhost:8080').replace(/\\/$/,'')\nconst secret = String(($vars && $vars.relay_shared_secret) || '')\n\nif (!secret) return 'Error: missing $vars.relay_shared_secret'\n\ntry {\n const res = await fetch(`${base}/tools/get_payment_methods`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `Bearer ${secret}`\n },\n body: JSON.stringify({})\n })\n const data = await res.json()\n if (data.ok) {\n const gateways = data.data\n if (!Array.isArray(gateways) || !gateways.length) return 'No payment methods available.'\n const lines = gateways.map(g => '- ' + g.title).join('\\n')\n return 'Available payment methods:\\n' + lines\n }\n return `Info: ${data.message || JSON.stringify(data)}`\n} catch (error) {\n return `Connection error: ${error?.message || String(error)}`\n}\n" }