Настройка woocommerce-subscriptions
-
Почему не удается оплатить через ЮКассу через WooCommerce Subscriptions?
Скриншот:
Ошибка:
“Sorry, it seems there are no available payment methods which support subscriptions. Please see Enabling Payment Gateways for Subscriptions if you require assistance.”
На странице
/wp-admin/admin.php?page=wc-settings&tab=checkout
плагин от wc не видит поддержку автоматических платежей.
Скриншот (должна быть галочка): https://imgur.com/6TgE7yH.pngЯ так понимаю, для этого нужно включить галочку “Manual Renewal Payments” в настройках WC Subs здесь
/wp-admin/admin.php?page=wc-settings&tab=subscriptions
Так?Тогда получается ошибка “Ошибка в процессе оформления заказа. Пожалуйста, попробуйте ещё раз.”
Для этого вроде надо ЮКассу настроить на автоматические платежи. Я прав?Есть какая-нибудь инструкция по настройке wocommerce-subsrciptions?
yookassa 2.4.3
WooCommerce Subscriptions 4.7.0
WooCommerce 7.1.1
WordPress 6.1.1
-
И можете сделать, чтобы wc-subs видел поддержку автоматических платежей вот тут
и отображал галочку?Добрый день!
Так как повторная оплата доступна не для всех способов оплаты через ЮKassa, а только для банковских карт и кошелька ЮMoney, то галка поддержки рекуррентов и сама возможность при оформлении заказа показывается только если включены отдельные способы банковские карты и кошелек ЮMoney.
У Вас на скриншоте включен выбор способа оплаты на стороне ЮKassa – в таком случае нет возможности разграничить возможность делать повторные платежи.
Если Вам необходимы повторные платежи, то нужно в настройках плагина ЮKassa включить выбор способа оплаты на стороне магазина.Включил оплату на стороне магазина. Потом включил эти способы оплаты:
Вот так выглядит теперь оплата:
Потом при попытке оформить заказ выходит ошибка: “Ошибка в процессе оформления заказа. Пожалуйста, попробуйте ещё раз.”
Что дальше делать?
Нужно подать заявку на платную подписку в ЮКассу? Или еще что-то я не сделал?Я так понимаю, там должна быть форма ввода банковской карты для оплаты подписки. Но сейчас там ничего.
Необходимо посмотреть лог плагина ЮKassa чтобы проверить, доходит ли процесс оформления заказа до запроса в ЮKassa, если доходит – чем завершается запрос. Скачать лог можно со страницы настроек плагина на вкладке “Доп. функции”.
Если запрос на оплату нет, то проблема возникает еще на стороне страницы оформления заказа.Вот такой примерно лог:
[2022-12-13 14:30:29] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:30:29] [info] Message: Response with code 404 received. [2022-12-13 14:30:33] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:30:33] [info] Message: Response with code 404 received. [2022-12-13 14:31:13] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:31:13] [info] Message: Response with code 404 received. [2022-12-13 14:31:15] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:31:15] [info] Message: Response with code 404 received. [2022-12-13 14:31:16] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:31:17] [info] Message: Response with code 404 received.`
О чем это говорит?
Запроса на оплату нет – значит, ошибка с текстом “Ошибка в процессе оформления заказа. Пожалуйста, попробуйте ещё раз.” выдается от WooCommerce. попробуйте проверить условия заказа.
Сообщения в Вашем логе – это результат работы проверки на корректные авторизационные данные для проведения платежей. Она делается при каждом сохранении настроек внутри плагина.
Перевыпустил секретный ключ для магазина.
Разрешил доступ к WooCommerce.При попытке оформления заказа такая же ошибка.
Вот новые логи:
[2022-12-13 14:46:04] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:46:04] [info] Message: Response with code 404 received. [2022-12-13 14:46:06] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:46:07] [info] Message: Response with code 404 received. [2022-12-13 14:46:19] [info] Message: Sending request for OAuth link. Request parameters: {"state":"100e0713817e","cms":"woocommerce","host":"airat.biz"} [2022-12-13 14:46:41] [info] Message: Sending request for OAuth token. Request parameters: {"state":"100e0713817e"} [2022-12-13 14:46:41] [info] Message: Send request: GET /webhooks [2022-12-13 14:46:41] [info] Message: Response with code 200 received. [2022-12-13 14:46:41] [info] Message: Send request: POST /webhooks [2022-12-13 14:46:41] [info] Message: Response with code 200 received. [2022-12-13 14:46:41] [info] Message: Send request: POST /webhooks [2022-12-13 14:46:41] [info] Message: Response with code 200 received. [2022-12-13 14:46:41] [info] Message: Send request: POST /webhooks [2022-12-13 14:46:41] [info] Message: Response with code 200 received. [2022-12-13 14:46:41] [info] Message: Send request: POST /webhooks [2022-12-13 14:46:41] [info] Message: Response with code 200 received. [2022-12-13 14:46:41] [info] Message: Send request: GET /me [2022-12-13 14:46:42] [info] Message: Response with code 200 received. [2022-12-13 14:46:42] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:46:43] [info] Message: Response with code 404 received. [2022-12-13 14:46:49] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:46:50] [info] Message: Response with code 404 received. [2022-12-13 14:46:52] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:46:52] [info] Message: Response with code 404 received. [2022-12-13 14:47:02] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:47:02] [info] Message: Response with code 404 received. [2022-12-13 14:47:07] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:47:07] [info] Message: Response with code 404 received. [2022-12-13 14:47:40] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:47:40] [info] Message: Response with code 404 received. [2022-12-13 14:47:51] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:47:52] [info] Message: Response with code 404 received. [2022-12-13 14:48:07] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:48:07] [info] Message: Response with code 404 received. [2022-12-13 14:48:11] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:48:11] [info] Message: Response with code 404 received. [2022-12-13 14:48:19] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:48:19] [info] Message: Response with code 404 received. [2022-12-13 14:48:21] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:48:21] [info] Message: Response with code 404 received. [2022-12-13 14:49:39] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:49:39] [info] Message: Response with code 404 received. [2022-12-13 14:49:42] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:49:42] [info] Message: Response with code 404 received. [2022-12-13 14:49:44] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:49:44] [info] Message: Response with code 404 received. [2022-12-13 14:49:46] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:49:46] [info] Message: Response with code 404 received.
Теперь у меня написано “Боевой магазин”
Я после замены ключа нажал “Сменить магазин” и разрешил доступ к магазину для WooCommerce. И теперь вот так
Новые логи. Уже что-то конкретное.
[2022-12-13 14:56:30] [info] Message: Return url: https://airat.biz/checkout/order-pay/10219/?key=wc_order_XCiULeSbDqMeZ [2022-12-13 14:56:30] [info] Message: Create payment request: {"amount":{"value":"9900.00","currency":"RUB"},"description":"\u041e\u043f\u043b\u0430\u0442\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u211610219","payment_method_data":{"type":"bank_card"},"confirmation":{"type":"redirect","return_url":"https:\/\/airat.biz\/yookassa\/returnUrl?yookassa-order-id=wc_order_XCiULeSbDqMeZ"},"metadata":{"cms_name":"yoo_woocommerce","module_version":"2.4.3","wp_user_id":1089},"capture":true,"save_payment_method":false} [2022-12-13 14:56:30] [info] Message: Send request: POST /payments [2022-12-13 14:56:30] [info] Message: Response with code 200 received. [2022-12-13 14:56:30] [info] Message: Create payment response: {"id":"2b2aa65e-000f-5000-a000-1d964e480153","status":"pending","recipient":{"account_id":"72145","gateway_id":"362613"},"amount":{"value":"9900.00","currency":"RUB"},"description":"\u041e\u043f\u043b\u0430\u0442\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u211610219","payment_method":{"type":"bank_card","id":"2b2aa65e-000f-5000-a000-1d964e480153","saved":false},"created_at":"2022-12-13T14:56:30.321+00:00","confirmation":{"enforce":false,"return_url":"https:\/\/airat.biz\/yookassa\/returnUrl?yookassa-order-id=wc_order_XCiULeSbDqMeZ","confirmation_url":"https:\/\/yoomoney.ru\/checkout\/payments\/v2\/contract?orderId=2b2aa65e-000f-5000-a000-1d964e480153","type":"redirect"},"paid":false,"refundable":false,"metadata":{"module_version":"2.4.3","cms_name":"yoo_woocommerce","wp_user_id":"1089"},"transfers":[]} [2022-12-13 14:56:56] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:56:56] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:56:56] [info] Message: Response with code 404 received. [2022-12-13 14:56:56] [info] Message: Response with code 404 received. [2022-12-13 14:56:59] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:56:59] [info] Message: Response with code 404 received. [2022-12-13 14:57:03] [info] Message: Send request: GET /payments/00000000-0000-0000-0000-000000000001 [2022-12-13 14:57:04] [info] Message: Response with code 404 received. [2022-12-13 14:57:53] [info] Message: Return url: https://airat.biz/checkout/order-pay/10219/?key=wc_order_XCiULeSbDqMeZ [2022-12-13 14:57:53] [info] Message: Create payment request: {"amount":{"value":"9900.00","currency":"RUB"},"description":"\u041e\u043f\u043b\u0430\u0442\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u211610219","payment_method_data":{"type":"bank_card"},"confirmation":{"type":"redirect","return_url":"https:\/\/airat.biz\/yookassa\/returnUrl?yookassa-order-id=wc_order_XCiULeSbDqMeZ"},"metadata":{"cms_name":"yoo_woocommerce","module_version":"2.4.3","wp_user_id":1089},"capture":true,"save_payment_method":false} [2022-12-13 14:57:53] [info] Message: Send request: POST /payments [2022-12-13 14:57:53] [info] Message: Response with code 200 received. [2022-12-13 14:57:53] [info] Message: Create payment response: {"id":"2b2aa6b1-000f-5000-a000-189f681f266a","status":"pending","recipient":{"account_id":"72145","gateway_id":"362613"},"amount":{"value":"9900.00","currency":"RUB"},"description":"\u041e\u043f\u043b\u0430\u0442\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u211610219","payment_method":{"type":"bank_card","id":"2b2aa6b1-000f-5000-a000-189f681f266a","saved":false},"created_at":"2022-12-13T14:57:53.763+00:00","confirmation":{"enforce":false,"return_url":"https:\/\/airat.biz\/yookassa\/returnUrl?yookassa-order-id=wc_order_XCiULeSbDqMeZ","confirmation_url":"https:\/\/yoomoney.ru\/checkout\/payments\/v2\/contract?orderId=2b2aa6b1-000f-5000-a000-189f681f266a","type":"redirect"},"paid":false,"refundable":false,"metadata":{"module_version":"2.4.3","cms_name":"yoo_woocommerce","wp_user_id":"1089"},"transfers":[]}
Проблем с авторизацией магазина сейчас нет и по логу не было раньше. Запрос на проверку возможности отправлять запросы проходит успешно.
При каких условиях заказа (товар, способ оплаты, введенные в форму данные) у Вас возникает ошибка? Я не могу воспроизвести ее на указанном в логе сайте, переход к оплате происходит.
В новом логе отобразились мои попытки проверить оплату на Вашем сайте. По всем попыткам переход к оплате происходил без вывода ошибки.
Вот еще другие логи с сайта:
[Tue Dec 13 18:04:18.299044 2022] [proxy_fcgi:error] [pid 488560:tid 140650615912000] [client 37.146.247.27:0] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a member function get_customer_id() on bool in /home/admin/web/airat.biz/public_html/wp-content/plugins/learndash-woocommerce/learndash_woocommerce.php:631\nStack trace:\n#0 /home/admin/web/airat.biz/public_html/wp-includes/class-wp-hook.php(310): Learndash_WooCommerce::update_subscription_meta()\n#1 /home/admin/web/airat.biz/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()\n#2 /home/admin/web/airat.biz/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()\n#3 /home/admin/web/airat.biz/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-order.php(196): do_action()\n#4 /home/admin/web/airat.biz/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php(244): WC_Abstract_Order->save()\n#5 /home/admin/web/airat.biz/public_html/wp-content/plugins/woocommerce-subscriptions/vendor/woocommerce/subscriptions-core/wcs-functions.php(189): WC_Order->save()\n#6 /home/admin/web/airat.biz/public_html/wp-cont...', referer: https://airat.biz/checkout/ [Tue Dec 13 18:04:22.007409 2022] [proxy_fcgi:error] [pid 488560:tid 140650523592256] [client 37.146.247.27:0] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a member function get_customer_id() on bool in /home/admin/web/airat.biz/public_html/wp-content/plugins/learndash-woocommerce/learndash_woocommerce.php:631\nStack trace:\n#0 /home/admin/web/airat.biz/public_html/wp-includes/class-wp-hook.php(310): Learndash_WooCommerce::update_subscription_meta()\n#1 /home/admin/web/airat.biz/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()\n#2 /home/admin/web/airat.biz/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()\n#3 /home/admin/web/airat.biz/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-order.php(196): do_action()\n#4 /home/admin/web/airat.biz/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php(244): WC_Abstract_Order->save()\n#5 /home/admin/web/airat.biz/public_html/wp-content/plugins/woocommerce-subscriptions/vendor/woocommerce/subscriptions-core/wcs-functions.php(189): WC_Order->save()\n#6 /home/admin/web/airat.biz/public_html/wp-cont...', referer: https://airat.biz/checkout/
Попробую отключить плагин learndash-woocommerce
Отключил плагин learndash-woocommerce и повторил заказ.
Наконец-то новая ошибка: “Платеж не прошел. Попробуйте еще или выберите другой способ оплаты”
Логи:
[2022-12-13 15:10:46] [info] Message: Пользователь вернулся с формы оплаты. Id заказа - 10219. Идентификатор платежа - 2b2aa6c8-000f-5000-a000-1f7e6d5302fe. [2022-12-13 15:10:46] [info] Message: Send request: GET /payments/2b2aa6c8-000f-5000-a000-1f7e6d5302fe [2022-12-13 15:10:46] [info] Message: Response with code 200 received. [2022-12-13 15:13:57] [info] Message: Return url: https://airat.biz/checkout/order-pay/10225/?key=wc_order_aswwBMYZs1B10 [2022-12-13 15:13:57] [info] Message: Create payment request: {"amount":{"value":"990.00","currency":"RUB"},"description":"\u041e\u043f\u043b\u0430\u0442\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u211610225","payment_method_data":{"type":"bank_card"},"confirmation":{"type":"redirect","return_url":"https:\/\/airat.biz\/yookassa\/returnUrl?yookassa-order-id=wc_order_aswwBMYZs1B10"},"metadata":{"cms_name":"yoo_woocommerce","module_version":"2.4.3","wp_user_id":8,"subscribe_payment_save_card":false},"capture":true,"save_payment_method":true} [2022-12-13 15:13:57] [info] Message: Send request: POST /payments [2022-12-13 15:13:57] [info] Message: Response with code 403 received. [2022-12-13 15:13:57] [error] Message: Api error: This store can't make recurring payments. Contact your manager to learn more. Error code: forbidden.
то есть теперь я могу обращаться к менеджеру для подключения рекуррентных платежей, так?
Message: Api error: This store can't make recurring payments. Contact your manager to learn more. Error code: forbidden.
- This reply was modified 1 year, 11 months ago by AiratVibe.
Вот на этих данных тестирую:
Пробовал разные способы оплаты
- This reply was modified 1 year, 11 months ago by AiratVibe.
Проведение рекуррентных платежей не разрешено по умолчанию и подключается после проверки сайта.
Передал просьбу менеджеру со стороны ЮKassa подключить для Вашего магазина рекуррентные платежи. С Вами должны связаться по почте для контактов магазина.
- The topic ‘Настройка woocommerce-subscriptions’ is closed to new replies.