PayKeeper. Ошибка при оплате онлайн?
Подключили PayKeeper для онлайн оплаты. Настройки делали по инструкции. Но при оплате выдает ошибку:
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/woocommerce-paykeeper/paykeeper-gateway-class.php on line 210 Warning: file_get_contents(https://beautyteka.ru.server.paykeeper.ru/create/): Failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/woocommerce-payke... on line 210 |
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/woocommerce-paykeeper/paykeeper-gateway-class.php on line 210 Warning: file_get_contents(https://beautyteka.ru.server.paykeeper.ru/create/): Failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/woocommerce-payke... on line 210
Дополнительно:
Напишите код ошибки текстом, а не скрином!
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/woocommerce-paykeeper/paykeeper-gateway-class.php on line 210
Warning: file_get_contents(https://beautyteka.ru.server.paykeeper.ru/create/): Failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/woocommerce-payke... on line 210
[27-Nov-2023 07:24:46 UTC] PHP Warning: Array to string conversion in /var/www/u2148063/data/www/beautyteka.ru/wp-includes/taxonomy.php on line 1083
[27-Nov-2023 07:24:46 UTC] PHP Fatal error: Uncaught TypeError: ltrim(): Argument #1 ($string) must be of type string, WP_Error given in /var/www/u2148063/data/www/beautyteka.ru/wp-includes/formatting.php:4494
Stack trace:
#0 /var/www/u2148063/data/www/beautyteka.ru/wp-includes/formatting.php(4494): ltrim(Object(WP_Error))
#1 /var/www/u2148063/data/www/beautyteka.ru/wp-content/themes/shopic/inc/elementor/widgets/product-categories.php(805): esc_url(Object(WP_Error))
#2 /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/elementor/includes/base/controls-stack.php(2265): Shopic_Elementor_Products_Categories->render()
#3 /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/elementor/includes/base/widget-base.php(609): ElementorControls_Stack->render_by_mode()
#4 /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/elementor/includes/base/widget-base.php(750): ElementorWidget_Base->render_content()
#5 /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/elementor/includes/base/element-base.php(464): ElementorWidget_Base->print_content()
#6 /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/elementor/includes/base/element-base.php(1375): ElementorElement_Base->print_element()
#7 /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/elementor/includes/base/element-base.php(464): ElementorElement_Base->print_content()
#8 /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/elementor/includes/base/element-base.php(1375): ElementorElement_Base->print_element()
#9 /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/elementor/includes/base/element-base.php(464): ElementorElement_Base->print_content()
#10 /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/elementor/includes/base/element-base.php(1375): ElementorElement_Base->print_element()
#11 /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/elementor/includes/base/element-base.php(464): ElementorElement_Base->print_content()
#12 /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/elementor/includes/base/element-base.php(1375): ElementorElement_Base->print_element()
#13 /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/elementor/includes/base/element-base.php(464): ElementorElement_Base->print_content()
#14 /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/elementor/core/base/document.php(1739): ElementorElement_Base->print_element()
#15 /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/elementor/core/base/document.php(1134): ElementorCoreBaseDocument->print_elements(Array)
#16 /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/elementor/includes/frontend.php(1179): ElementorCoreBaseDocument->print_elements_with_wrapper(Array)
#17 /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/elementor/includes/frontend.php(1074): ElementorFrontend->get_builder_content(912)
#18 /var/www/u2148063/data/www/beautyteka.ru/wp-includes/class-wp-hook.php(324): ElementorFrontend->apply_builder_in_content('')
#19 /var/www/u2148063/data/www/beautyteka.ru/wp-includes/plugin.php(205): WP_Hook->apply_filters('', Array)
#20 /var/www/u2148063/data/www/beautyteka.ru/wp-includes/post-template.php(256): apply_filters('the_content', '')
#21 /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/elementor/modules/page-templates/module.php(190): the_content()
#22 [internal function]: ElementorModulesPageTemplatesModule->print_callback()
#23 /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/elementor/modules/page-templates/module.php(207): call_user_func(Array)
#24 /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/elementor/modules/page-templates/templates/header-footer.php(19): ElementorModulesPageTemplatesModule->print_content()
#25 /var/www/u2148063/data/www/beautyteka.ru/wp-includes/template-loader.php(106): include('/var/www/u21480...')
#26 /var/www/u2148063/data/www/beautyteka.ru/wp-blog-header.php(19): require_once('/var/www/u21480...')
#27 /var/www/u2148063/data/www/beautyteka.ru/index.php(17): require('/var/www/u21480...')
#28 {main}
thrown in /var/www/u2148063/data/www/beautyteka.ru/wp-includes/formatting.php on line 4494
Deprecated: Функция WC_Shortcode_Checkout->output вызвана с аргументом, который считается устаревшим с версии 2.1! "order" is no longer used to pass an order ID. Use the order-pay or order-received endpoint instead. in /var/www/u2148063/data/www/beautyteka.ru/wp-includes/functions.php on line 6031
Notice: Функция id вызвана неправильно. Order properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/plugins/elementor/modules/page-templates/templates/header-footer.php'), ElementorModulesPageTemplatesModule->print_content, call_user_func, ElementorModulesPageTemplatesModule->print_callback, the_content, apply_filters('the_content'), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, WC_Shortcodes::checkout, WC_Shortcodes::shortcode_wrapper, WC_Shortcode_Checkout::output, WC_Shortcode_Checkout::order_pay, wc_get_template, include('/plugins/woocommerce/templates/checkout/order-receipt.php'), do_action('woocommerce_receipt_paykeeper'), WP_Hook->do_action, WP_Hook->apply_filters, WC_PK_Gateway->receipt_page, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong Дополнительную информацию можно найти на странице «Отладка в WordPress». (Это сообщение было добавлено в версии 3.0.) in /var/www/u2148063/data/www/beautyteka.ru/wp-includes/functions.php on line 6031
Notice: Функция billing_email вызвана неправильно. Order properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/plugins/elementor/modules/page-templates/templates/header-footer.php'), ElementorModulesPageTemplatesModule->print_content, call_user_func, ElementorModulesPageTemplatesModule->print_callback, the_content, apply_filters('the_content'), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, WC_Shortcodes::checkout, WC_Shortcodes::shortcode_wrapper, WC_Shortcode_Checkout::output, WC_Shortcode_Checkout::order_pay, wc_get_template, include('/plugins/woocommerce/templates/checkout/order-receipt.php'), do_action('woocommerce_receipt_paykeeper'), WP_Hook->do_action, WP_Hook->apply_filters, WC_PK_Gateway->receipt_page, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong Дополнительную информацию можно найти на странице «Отладка в WordPress». (Это сообщение было добавлено в версии 3.0.) in /var/www/u2148063/data/www/beautyteka.ru/wp-includes/functions.php on line 6031
Notice: Функция billing_email вызвана неправильно. Order properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/plugins/elementor/modules/page-templates/templates/header-footer.php'), ElementorModulesPageTemplatesModule->print_content, call_user_func, ElementorModulesPageTemplatesModule->print_callback, the_content, apply_filters('the_content'), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, WC_Shortcodes::checkout, WC_Shortcodes::shortcode_wrapper, WC_Shortcode_Checkout::output, WC_Shortcode_Checkout::order_pay, wc_get_template, include('/plugins/woocommerce/templates/checkout/order-receipt.php'), do_action('woocommerce_receipt_paykeeper'), WP_Hook->do_action, WP_Hook->apply_filters, WC_PK_Gateway->receipt_page, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong Дополнительную информацию можно найти на странице «Отладка в WordPress». (Это сообщение было добавлено в версии 3.0.) in /var/www/u2148063/data/www/beautyteka.ru/wp-includes/functions.php on line 6031
Notice: Функция billing_phone вызвана неправильно. Order properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/plugins/elementor/modules/page-templates/templates/header-footer.php'), ElementorModulesPageTemplatesModule->print_content, call_user_func, ElementorModulesPageTemplatesModule->print_callback, the_content, apply_filters('the_content'), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, WC_Shortcodes::checkout, WC_Shortcodes::shortcode_wrapper, WC_Shortcode_Checkout::output, WC_Shortcode_Checkout::order_pay, wc_get_template, include('/plugins/woocommerce/templates/checkout/order-receipt.php'), do_action('woocommerce_receipt_paykeeper'), WP_Hook->do_action, WP_Hook->apply_filters, WC_PK_Gateway->receipt_page, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong Дополнительную информацию можно найти на странице «Отладка в WordPress». (Это сообщение было добавлено в версии 3.0.) in /var/www/u2148063/data/www/beautyteka.ru/wp-includes/functions.php on line 6031
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/woocommerce-paykeeper/paykeeper-gateway-class.php on line 210
Warning: file_get_contents(https://beautyteka.ru.server.paykeeper.ru/create/): Failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/u2148063/data/www/beautyteka.ru/wp-content/plugins/woocommerce-payke... on line 210
[27-Nov-2023 07:43:26 UTC] PHP Deprecated: Файл Тема без footer.php с версии 3.0.0 считается устаревшим. Альтернативы не предусмотрено. Пожалуйста, включите шаблон footer.php в вашу тему. in /var/www/u2148063/data/www/beautyteka.ru/wp-includes/functions.php on line 6031
[27-Nov-2023 07:43:55 UTC] PHP Deprecated: Файл Тема без header.php с версии 3.0.0 считается устаревшим. Альтернативы не предусмотрено. Пожалуйста, включите шаблон header.php в вашу тему. in /var/www/u2148063/data/www/beautyteka.ru/wp-includes/functions.php on line 6031
[27-Nov-2023 07:43:55 UTC] PHP Deprecated: Файл Тема без footer.php с версии 3.0.0 считается устаревшим. Альтернативы не предусмотрено. Пожалуйста, включите шаблон footer.php в вашу тему. in /var/www/u2148063/data/www/beautyteka.ru/wp-includes/functions.php on line 6031
Выдает ошибку что нет footer. Может ли быть в этом проблема?
Все может быть, т.к. в подвал часто подключают различные скрипты. Попробуйте какой то стандартный шаблон с подвалом и посмотрите, как поведет себя плагин с оплатой.
Зачем дублировать?
Это не дубль! В предыдущем вопросе вообще не показывались способы оплаты. Выяснили что тема конфликтует. Поменяли тему, теперь другая ошибка.
Скачайте на оф сайте актуальную версию - wp4,5,6_wc4,5,6,7
Установите у себя и настройте
Ссылка на оф сайт плагина - https://docs.paykeeper.ru/cms/
Инструкция по настройке - https://docs.paykeeper.ru/cms/modul-oplaty-dlya-wo...
Опишите проблему, и специалист поможет с настройкой, исправлением ошибки или доработкой сайта. Подберём понятный план работ без лишней переписки.
Пока нет других ответов. Будьте первым, кто поможет автору.
Ответить на вопрос


Ошибка
php_network_getaddresses: getaddrinfo failedозначает, что сервер не может разрешить доменное имя, к которому плагин пытается обратиться. В Вашем случае WooCommerce PayKeeper идёт на адрес видаhttps://beautyteka.ru.server.paykeeper.ru/create/. Чаще всего это не проблема WooCommerce, а неправильный адрес сервера PayKeeper в настройках или DNS/сеть на хостинге.Проверьте в настройках плагина PayKeeper поле с доменом шлюза. Обычно у PayKeeper адрес мерчанта выглядит не как Ваш домен плюс
.server.paykeeper.ru, а как конкретный выданный PayKeeper URL. Если в настройке нужно указать только поддомен/ID, а Вы указали полный домен сайта, плагин мог собрать неправильный адрес.Что проверить по шагам:
file_get_contents()для URL;С сервера можно проверить так:
nslookup beautyteka.ru.server.paykeeper.ru curl -I https://beautyteka.ru.server.paykeeper.ru/create/
Если DNS не резолвится, проблема в адресе или DNS. Если DNS есть, но curl не подключается, смотрите firewall/исходящие соединения/SSL. Если curl работает, а PHP нет, значит на хостинге ограничены настройки PHP или плагин использует неудачный способ запроса.
Не советую просто отключать warnings на проде и “прятать” ошибку. Оплата не создаётся именно потому, что запрос к PayKeeper не уходит. Исправлять нужно адрес шлюза и сетевое подключение. После правки обязательно сделайте тестовую оплату на минимальную сумму и проверьте callback/status URL.