PayKeeper. Ошибка при оплате онлайн?

Ссылка скопирована
1 ответ

Подключили 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

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

  • Beautyteka, включите отладку в WP, чтобы увидеть больше подробностей и напишите сюда результат.
  • Михаил Р.,
    [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

  • Beautyteka, складывается ощущение, что проблема в основном состоит в Ваше теме Shopic и тем, как с ней взаимодействует Elementor. Попробуйте изменить тему на стандартную и проверить работу платежной системы.
  • Спасибо. Попробую. До этого стояла тема WoodMart, так из-за нее вообще не показывался ни один из способов оплаты. Два дня назад поменял на Shopik, и способы оплаты появились но с ошибкой. Сейчас поменяю, отпишусь помогло ли
  • Михаил Р., Выдает ошибку что нет footer. Может ли быть в этом проблема?

    [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

  • Beautyteka,

    Выдает ошибку что нет footer. Может ли быть в этом проблема?

    Все может быть, т.к. в подвал часто подключают различные скрипты. Попробуйте какой то стандартный шаблон с подвалом и посмотрите, как поведет себя плагин с оплатой.

  • Ваш тот же вопрос - WooCommerce платежный шлюз PayKeeper от Альфа банка не работает. Почему?
    Зачем дублировать?
  • Владимир,
    Это не дубль! В предыдущем вопросе вообще не показывались способы оплаты. Выяснили что тема конфликтует. Поменяли тему, теперь другая ошибка.
  • Beautyteka, вы используете устаревшую версию плагина - Версия WordPress 4.2/Woocommerce 2.x
    Скачайте на оф сайте актуальную версию - wp4,5,6_wc4,5,6,7
    Установите у себя и настройте
    Ссылка на оф сайт плагина - https://docs.paykeeper.ru/cms/
    Инструкция по настройке - https://docs.paykeeper.ru/cms/modul-oplaty-dlya-wo...
  • Владимир, Спасибо вам большое. А слона то я и не заметил. Установил более новую версию плагина, перенастроил. И теперь уже хотя бы после нажатия оплатить выдает вот это. Я так понимаю тут дело в том что у нас подключена тэстовая система в альфе для отладки процесса оплаты. Напишу в PayKeeper чтобы подключили боевую среду

    PayKeeper. Ошибка при оплате онлайн?

  • Нужно решить такую задачу?

    Опишите проблему, и специалист поможет с настройкой, исправлением ошибки или доработкой сайта. Подберём понятный план работ без лишней переписки.

    Заказать помощь
    Лучший ответ
    1
    Андрей PHP Ответ

    Ошибка 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, а Вы указали полный домен сайта, плагин мог собрать неправильный адрес.

    Что проверить по шагам:

    • сверьте URL сервера PayKeeper с письмом/кабинетом PayKeeper;
    • проверьте, открывается ли этот URL с самого сервера;
    • попросите хостинг проверить DNS lookup и исходящие HTTPS-запросы;
    • проверьте, не блокируется ли file_get_contents() для URL;
    • по возможности переведите запросы на cURL, если плагин это поддерживает.

    С сервера можно проверить так:

    nslookup beautyteka.ru.server.paykeeper.ru
    curl -I https://beautyteka.ru.server.paykeeper.ru/create/

    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.

    Другие ответы (0)

    Пока нет других ответов. Будьте первым, кто поможет автору.

    Ответить на вопрос

    комментарий

    Ваш адрес email не будет опубликован. Обязательные поля помечены *

    Вам также может быть интересно