{"id":226127,"date":"2025-05-16T20:07:26","date_gmt":"2025-05-16T20:07:26","guid":{"rendered":"https:\/\/ru.wordpress.org\/plugins\/pay-for-woocommerce\/"},"modified":"2026-03-05T21:21:06","modified_gmt":"2026-03-05T21:21:06","slug":"kosteams-payments-for-yandex","status":"publish","type":"plugin","link":"https:\/\/ca.wordpress.org\/plugins\/kosteams-payments-for-yandex\/","author":15680325,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.0.6","stable_tag":"2.0.6","tested":"6.9.4","requires":"6.0","requires_php":"8.0.0","requires_plugins":null,"header_name":"KosTeams Payments for Yandex Pay and Yandex Split for WooCommerce","header_author":"KoSteams","header_description":"\u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0439\u0442\u0435 \u043e\u043f\u043b\u0430\u0442\u0443 \u0447\u0435\u0440\u0435\u0437 Yandex Pay, \u042f\u043d\u0434\u0435\u043a\u0441.\u0421\u043f\u043b\u0438\u0442 \u0438\u043b\u0438 \u0438\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044e. \u0423\u0432\u0435\u043b\u0438\u0447\u044c\u0442\u0435 \u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u044e \u0437\u0430 \u0441\u0447\u0435\u0442 \u0433\u0438\u0431\u043a\u0438\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043e\u043f\u043b\u0430\u0442\u044b \u0441 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u043c \u043e\u0442 KosTeams.","assets_banners_color":"d3d4d6","last_updated":"2026-03-05 21:21:06","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/t.me\/koSteams","rating":5,"author_block_rating":0,"active_installs":60,"downloads":65765,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.10":{"tag":"1.0.10","author":"pro100kostia","date":"2025-07-20 18:36:27"},"1.0.12":{"tag":"1.0.12","author":"pro100kostia","date":"2025-08-03 01:11:05"},"1.0.13":{"tag":"1.0.13","author":"pro100kostia","date":"2025-08-22 21:22:58"},"1.0.4":{"tag":"1.0.4","author":"pro100kostia","date":"2025-05-16 21:12:28"},"1.0.5":{"tag":"1.0.5","author":"pro100kostia","date":"2025-05-20 10:42:51"},"1.0.6":{"tag":"1.0.6","author":"pro100kostia","date":"2025-05-23 15:15:52"},"1.0.7":{"tag":"1.0.7","author":"pro100kostia","date":"2025-05-31 03:42:22"},"1.0.8":{"tag":"1.0.8","author":"pro100kostia","date":"2025-06-06 04:56:52"},"1.0.9":{"tag":"1.0.9","author":"pro100kostia","date":"2025-06-17 09:50:42"},"2.0.0":{"tag":"2.0.0","author":"pro100kostia","date":"2025-09-29 01:08:50"},"2.0.1":{"tag":"2.0.1","author":"pro100kostia","date":"2025-09-30 08:08:47"},"2.0.2":{"tag":"2.0.2","author":"pro100kostia","date":"2025-10-09 05:09:57"},"2.0.3":{"tag":"2.0.3","author":"pro100kostia","date":"2025-10-29 10:55:29"},"2.0.4":{"tag":"2.0.4","author":"pro100kostia","date":"2025-11-12 06:13:46"},"2.0.5":{"tag":"2.0.5","author":"pro100kostia","date":"2026-01-23 19:42:23"},"2.0.6":{"tag":"2.0.6","author":"pro100kostia","date":"2026-03-05 21:21:06"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":2},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3446946,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3446946,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3445822,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3445822,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.10","1.0.12","1.0.13","1.0.4","1.0.5","1.0.6","1.0.7","1.0.8","1.0.9","2.0.0","2.0.1","2.0.2","2.0.3","2.0.4","2.0.5","2.0.6"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3299505,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3299505,"resolution":"2","location":"assets","locale":""},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3299505,"resolution":"3","location":"assets","locale":""},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3299505,"resolution":"4","location":"assets","locale":""},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3295012,"resolution":"5","location":"assets","locale":""},"screenshot-6.png":{"filename":"screenshot-6.png","revision":3310809,"resolution":"6","location":"assets","locale":""},"screenshot-7.png":{"filename":"screenshot-7.png","revision":3297297,"resolution":"7","location":"assets","locale":""},"screenshot-8.png":{"filename":"screenshot-8.png","revision":3299487,"resolution":"8","location":"assets","locale":""}},"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[51755,6556,1887,11278,2160],"plugin_category":[45],"plugin_contributors":[242424],"plugin_business_model":[],"class_list":["post-226127","plugin","type-plugin","status-publish","hentry","plugin_tags-installments","plugin_tags-pay","plugin_tags-payments","plugin_tags-split","plugin_tags-yandex","plugin_category-ecommerce","plugin_contributors-pro100kostia","plugin_committers-pro100kostia","plugin_support_reps-pro100kostia"],"banners":{"banner":"https:\/\/ps.w.org\/kosteams-payments-for-yandex\/assets\/banner-772x250.png?rev=3445822","banner_2x":"https:\/\/ps.w.org\/kosteams-payments-for-yandex\/assets\/banner-1544x500.png?rev=3445822","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/kosteams-payments-for-yandex\/assets\/icon-128x128.png?rev=3446946","icon_2x":"https:\/\/ps.w.org\/kosteams-payments-for-yandex\/assets\/icon-256x256.png?rev=3446946","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/kosteams-payments-for-yandex\/assets\/screenshot-1.png?rev=3299505","caption":""},{"src":"https:\/\/ps.w.org\/kosteams-payments-for-yandex\/assets\/screenshot-2.png?rev=3299505","caption":""},{"src":"https:\/\/ps.w.org\/kosteams-payments-for-yandex\/assets\/screenshot-3.png?rev=3299505","caption":""},{"src":"https:\/\/ps.w.org\/kosteams-payments-for-yandex\/assets\/screenshot-4.png?rev=3299505","caption":""},{"src":"https:\/\/ps.w.org\/kosteams-payments-for-yandex\/assets\/screenshot-5.png?rev=3295012","caption":""},{"src":"https:\/\/ps.w.org\/kosteams-payments-for-yandex\/assets\/screenshot-6.png?rev=3310809","caption":""},{"src":"https:\/\/ps.w.org\/kosteams-payments-for-yandex\/assets\/screenshot-7.png?rev=3297297","caption":""},{"src":"https:\/\/ps.w.org\/kosteams-payments-for-yandex\/assets\/screenshot-8.png?rev=3299487","caption":""}],"raw_content":"<!--section=description-->\n<p>This plugin adds popular Yandex payment methods to your WooCommerce store:\n- <strong>Yandex Pay<\/strong>: Instant card payment without entering card details.\n- <strong>Yandex Split<\/strong>: Interest-free installments for up to 6 months.\n- <strong>Combined payment<\/strong>: Pay part by card and the rest in installments.<\/p>\n\n<h4>Modern Technology Compatibility<\/h4>\n\n<ul>\n<li><strong>Full WooCommerce Block Editor support<\/strong> \u2014 the plugin works with both classic and block checkout<\/li>\n<li><strong>Gutenberg compatible<\/strong> \u2014 integration with modern WordPress themes<\/li>\n<li><strong>React components<\/strong> \u2014 modern architecture for fast performance<\/li>\n<\/ul>\n\n<p>For advanced features (installment badges, widgets in cart and catalog), the <a href=\"https:\/\/kosteams.com\/plugins\/bejdzhi-i-vidzhety-yandex-split-i-yandex-pay-dlya-wordpress\/\">Pro version<\/a> is available.<\/p>\n\n<h3>Important Fiscalization Information<\/h3>\n\n<p><strong>Please note:<\/strong> When using Yandex Pay and Yandex Split, you must comply with Russian legislation requirements for payment fiscalization.<\/p>\n\n<h4>54-FZ Requirements<\/h4>\n\n<p>According to the Federal Law \"On the Application of Cash Register Equipment\" (54-FZ):\n- Fiscal receipts must be issued for all forms of non-cash payments\n- Yandex Pay and Yandex Split do not send fiscal receipts automatically\n- The seller is responsible for complying with fiscalization requirements<\/p>\n\n<h4>Possible Solutions<\/h4>\n\n<p>To ensure 54-FZ compliance, consider the following options:\n- Integration with online cash registers (ATOL, Evotor, OFD, etc.)\n- Using specialized plugins for automatic receipt generation\n- Setting up API integration with your fiscal service provider\n- Consulting with certified cash register integrators<\/p>\n\n<h4>Penalties for Non-Compliance<\/h4>\n\n<ul>\n<li>For individual entrepreneurs: from 10,000 rubles per violation<\/li>\n<li>For legal entities: from 30,000 rubles per violation<\/li>\n<li>Business operations may be suspended for up to 90 days<\/li>\n<\/ul>\n\n<p><strong>Recommendation:<\/strong> Be sure to set up fiscalization before accepting payments via Yandex Pay. For detailed advice, consult your accountant or online cash register service provider.<\/p>\n\n<h3>Version Features<\/h3>\n\n<p><strong>Free version includes:<\/strong>\n- Yandex Pay and Yandex Split support\n- Combined payment (card + installments)\n- Configuration through the WooCommerce interface\n- Compatibility with both classic and Gutenberg block editor<\/p>\n\n<p><strong>Pro version adds:<\/strong>\n- Installment\/cashback badges on product pages\n- Installment\/cashback badges in the product catalog\n- Payment widgets in cart and catalog\n- Yandex payment button on the checkout page\n- 20+ element positioning options<\/p>\n\n<h3>Recommended Add-ons<\/h3>\n\n<p>To ensure full compliance with Russian legislation and extend functionality, the following solutions are recommended:<\/p>\n\n<h4>Payment Fiscalization (required for 54-FZ compliance)<\/h4>\n\n<p><strong><a href=\"https:\/\/kosteams.com\/plugins\/atol-receipts-yandex-v4\/\">KosTeams ATOL Receipts<\/a><\/strong> \u2014 A specialized plugin for automatic fiscalization of payments via Yandex Pay and Yandex Split.<\/p>\n\n<p>Key features:\n- Automatic fiscal receipt generation via ATOL Online for every payment\n- Full support for ATOL API v4 and v5\n- Automatic detection of Yandex Pay and Split payments\n- HPOS (High-Performance Order Storage) support\n- Automatic refund receipts when orders are cancelled\n- Real-time fiscalization status monitoring\n- Detailed logging for diagnostics<\/p>\n\n<p><strong>Why this plugin:<\/strong>\n- Designed specifically for integration with Yandex payment systems\n- Automatically detects payments that require fiscalization\n- Fully compliant with 54-FZ requirements\n- Tested together with this plugin<\/p>\n\n<h4>Alternative Fiscalization Solutions<\/h4>\n\n<ul>\n<li>Other ATOL Online integration plugins<\/li>\n<li>Evotor integration solutions<\/li>\n<li>Modules for connecting to other OFD providers<\/li>\n<li>API integration with your cash register service provider<\/li>\n<\/ul>\n\n<h4>Conversion Improvement<\/h4>\n\n<p><strong><a href=\"https:\/\/kosteams.com\/plugins\/bejdzhi-i-vidzhety-yandex-split-i-yandex-pay-dlya-wordpress\/\">KosTeams Payments for Yandex Pay and Yandex Split for WooCommerce Pro<\/a><\/strong> \u2014 Extended version of this plugin with additional features:\n- Installment\/cashback badges on product pages and in the catalog\n- Payment widgets in cart and on product pages\n- 20+ element positioning options\n- Advanced design and behavior settings<\/p>\n\n<p><strong>Important:<\/strong> Regardless of the fiscalization solution you choose, setting it up is mandatory before accepting payments via Yandex Pay to comply with 54-FZ requirements.<\/p>\n\n<h3>Links<\/h3>\n\n<ul>\n<li><a href=\"https:\/\/kosteams.com\/plugins\/bejdzhi-i-vidzhety-yandex-split-i-yandex-pay-dlya-wordpress\/\">Setup Documentation<\/a><\/li>\n<li><a href=\"https:\/\/kosteams.com\/plugins\/bejdzhi-i-vidzhety-yandex-split-i-yandex-pay-dlya-wordpress\/\">Buy Pro Version<\/a><\/li>\n<li><a href=\"https:\/\/www.consultant.ru\/document\/cons_doc_LAW_42359\/12a6477d0e22968564d9416e594a80202a7024db\/\">Information about 54-FZ and Fiscalization<\/a><\/li>\n<\/ul>\n\n<h3>License<\/h3>\n\n<p>This plugin is distributed under the GPLv2 license. Advanced features are available in the Pro version.<\/p>\n\n<h3>Support and Security<\/h3>\n\n<h4>Payment Security<\/h4>\n\n<ul>\n<li>All transactions are processed through Yandex secure servers<\/li>\n<li>Card data is not stored on your site<\/li>\n<li>PCI DSS compliant<\/li>\n<\/ul>\n\n<h4>Legal Compliance<\/h4>\n\n<ul>\n<li>The plugin provides technical integration with payment systems<\/li>\n<li>Fiscalization compliance (54-FZ) requires additional solutions<\/li>\n<li>Consulting with lawyers and accountants is recommended<\/li>\n<\/ul>\n\n<h4>Getting Support<\/h4>\n\n<ul>\n<li>Technical support through official channels<\/li>\n<li>Documentation and FAQ on the developer's website<\/li>\n<li>User community for experience sharing<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Install the plugin through the WordPress admin panel.<\/li>\n<li>Activate it in the \"Plugins\" section.<\/li>\n<li>Go to WooCommerce \u2192 Settings \u2192 Payments \u2192 Yandex Pay and Yandex Split.<\/li>\n<li>Enter your Merchant ID and API key (obtained through a partner agreement with Yandex).<\/li>\n<li>Enable the desired payment methods and save changes.<\/li>\n<li><strong>Important:<\/strong> Set up payment fiscalization in accordance with 54-FZ.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"why%20is%20the%20payment%20not%20going%20through%3F\"><h3>Why is the payment not going through?<\/h3><\/dt>\n<dd><p>Check whether your store has passed moderation in the Yandex Pay dashboard (it should show a green status). If the status is gray, payments will only work in test mode.<\/p><\/dd>\n<dt id=\"is%20a%20contract%20with%20yandex%20required%3F\"><h3>Is a contract with Yandex required?<\/h3><\/dt>\n<dd><p>Yes, the plugin requires a connection to Yandex Pay through a partner agreement.<\/p><\/dd>\n<dt id=\"why%20is%20the%20payment%20method%20not%20displayed%20on%20the%20checkout%20page%3F\"><h3>Why is the payment method not displayed on the checkout page?<\/h3><\/dt>\n<dd><p>The payment method will only be displayed if it is enabled in WooCommerce settings and meets the conditions (e.g., currency, country, or shipping method).\nCheck:\n1. Whether the method is enabled in WooCommerce \u2192 Settings \u2192 Payments.\n2. Whether the availability conditions are correctly configured.\n3. Whether there are conflicts with other plugins or the theme.<\/p><\/dd>\n<dt id=\"how%20does%20split%20work%20for%20the%20buyer%3F\"><h3>How does Split work for the buyer?<\/h3><\/dt>\n<dd><p>The buyer places an order, makes the first payment, and receives the product immediately. The remaining payments are charged on schedule. The store receives the full amount immediately, just like a regular purchase.<\/p><\/dd>\n<dt id=\"how%20do%20i%20add%20installment%20badges%20to%20product%20pages%3F\"><h3>How do I add installment badges to product pages?<\/h3><\/dt>\n<dd><p>This feature is available in the Pro version, which allows you to customize the design, positioning, and display conditions of elements.<\/p><\/dd>\n<dt id=\"why%20are%20widgets%20not%20displayed%20in%20the%20cart%3F\"><h3>Why are widgets not displayed in the cart?<\/h3><\/dt>\n<dd><p>Cart and checkout integration is supported in the Pro version. The free version focuses on basic payment implementation.<\/p><\/dd>\n<dt id=\"how%20do%20i%20test%20in%20sandbox%20mode%3F\"><h3>How do I test in sandbox mode?<\/h3><\/dt>\n<dd><p>Use the test data provided by Yandex. Real money will not be charged.<\/p><\/dd>\n<dt id=\"how%20do%20i%20ensure%20payment%20fiscalization%3F\"><h3>How do I ensure payment fiscalization?<\/h3><\/dt>\n<dd><p>Yandex Pay does not send fiscal receipts automatically. Recommended solutions:<\/p>\n\n<p><strong>Ready-made solution (recommended):<\/strong>\n- <a href=\"https:\/\/kosteams.com\/plugins\/atol-receipts-yandex-v4\/\">KosTeams ATOL Receipts<\/a> \u2014 a specialized plugin that automatically sends receipts for all Yandex Pay and Split payments<\/p>\n\n<p><strong>Alternative options:<\/strong>\n- Connect an online cash register (ATOL, Evotor, etc.) and set up API integration\n- Use other fiscalization plugins\n- Develop your own OFD integration\n- Consult your cash register service provider<\/p><\/dd>\n<dt id=\"what%20are%20the%20penalties%20for%20not%20having%20fiscalization%3F\"><h3>What are the penalties for not having fiscalization?<\/h3><\/dt>\n<dd><p>According to 54-FZ, fines for non-use of cash register equipment start from 10,000 rubles for individual entrepreneurs and from 30,000 rubles for legal entities per violation.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.0.6 (2026-03-05)<\/h4>\n\n<p><strong>Fiscalization<\/strong>\n* Cloud cash register support for Yandex Pay: <code>receipt<\/code> data transmission (VAT, payment method type, payment subject type, unit of measurement)\n* Auto-detection of VAT rate from WooCommerce or forced \"No VAT\" mode\n* Filter <code>kosteams_payments_for_yandex_item_receipt<\/code> for customization<\/p>\n\n<p><strong>Wallet plugin compatibility<\/strong>\n* Negative fees (wallet, certificates) are skipped, item <code>total<\/code> values are proportionally recalculated\n* Removed <code>externalAmount<\/code> \u2014 works without special API permissions\n* Full compatibility with TeraWallet, WooCommerce Wallet, and others<\/p>\n\n<p><strong>Bug fixes<\/strong>\n* JWT webhook: uses the full JWKS key set (<code>JWK::parseKeySet<\/code>) instead of just the last key\n* Refund: targetCart includes VAT, correct orderId for CARD_SPLIT\n* Fixed PHP Notice for <code>$existing_payment_url<\/code> on 409 error\n* Webhook registered once (static flag)\n* API logging info only when debug_mode is enabled, errors are always logged<\/p>\n\n<p><strong>Improvements<\/strong>\n* API key is hidden (type=password)\n* Removed Yandex Pay SDK loading from the base plugin (handled by Pro)\n* Removed unused: class-validator.php, duplicate <code>get_order_info()<\/code>, duplicate validation in <code>create_payment()<\/code>\n* CSS version tied to plugin version\n* i18n for refund order notes<\/p>\n\n<h4>2.0.5 (2026-01-23)<\/h4>\n\n<p><strong>Maintenance:<\/strong>\n* Synchronized YPS_KOSTEAMS_VERSION constant with plugin header\n* Code audit for compliance with WooCommerce Payment Gateway API documentation\n* Code audit for compliance with Yandex Pay Web SDK documentation\n* Updated plugin page links\n* Updated firebase\/php-jwt library to v6.11.1<\/p>\n\n<h4>2.0.4 (2025-11-11)<\/h4>\n\n<p><strong>CRITICAL FIX: VAT calculation in payment creation<\/strong><\/p>\n\n<p><strong>ISSUE:<\/strong>\n* With VAT enabled in WooCommerce, amount mismatch occurred:\n  - Order total in WooCommerce (with VAT): e.g., 1200 RUB\n  - Amount sent to Yandex Pay API (without VAT): e.g., 1000 RUB\n  - Result: ERROR \u2014 payment was not created due to amount mismatch<\/p>\n\n<p><strong>CAUSE:<\/strong>\n* <code>$item-&gt;get_total()<\/code> returns the amount WITHOUT taxes\n* <code>$order-&gt;get_total()<\/code> returns the amount WITH taxes\n* When calculating <code>calculated_total<\/code>, taxes were not included, causing a mismatch with <code>woocommerce_total<\/code><\/p>\n\n<p><strong>FIXED in <code>includes\/class-gateway.php<\/code>:<\/strong><\/p>\n\n<ol>\n<li><p><strong>Products (line 794):<\/strong><\/p>\n\n<ul>\n<li>WAS: <code>$line_total = round((float)$item-&gt;get_total(), 2);<\/code><\/li>\n<li>NOW: <code>$line_total = round((float)$item-&gt;get_total() + (float)$item-&gt;get_total_tax(), 2);<\/code><\/li>\n<\/ul><\/li>\n<li><p><strong>Shipping (line 820):<\/strong><\/p>\n\n<ul>\n<li>WAS: <code>$shipping_cost = round((float)$shipping_item-&gt;get_total(), 2);<\/code><\/li>\n<li>NOW: <code>$shipping_cost = round((float)$shipping_item-&gt;get_total() + (float)$shipping_item-&gt;get_total_tax(), 2);<\/code><\/li>\n<\/ul><\/li>\n<li><p><strong>Fees (line 836):<\/strong><\/p>\n\n<ul>\n<li>WAS: <code>$fee_amount = round((float)$fee_item-&gt;get_total(), 2);<\/code><\/li>\n<li>NOW: <code>$fee_amount = round((float)$fee_item-&gt;get_total() + (float)$fee_item-&gt;get_total_tax(), 2);<\/code><\/li>\n<\/ul><\/li>\n<\/ol>\n\n<p><strong>RESULT:<\/strong>\n* Full amount WITH VAT is now sent to Yandex Pay API\n* WooCommerce order total = Yandex Pay total (100% match)\n* No discrepancies between the dashboard and the payment system\n* Customer pays the correct amount shown in the cart<\/p>\n\n<p><strong>IMPORTANT:<\/strong> This is a critical fix for all stores using taxes\/VAT in WooCommerce. Immediate update is recommended.<\/p>\n\n<h4>2.0.3 (2025-10-27)<\/h4>\n\n<p><strong>CRITICAL FIX: Amount calculation accuracy<\/strong>\n* Completely rewritten data calculation logic for Yandex API\n* Fixed amount mismatch between WooCommerce and data sent to Yandex\n* Now uses native WooCommerce methods to get item totals<\/p>\n\n<p><strong>Fixed:<\/strong>\n- <strong>ISSUE<\/strong>: Plugin manually calculated and distributed discounts across all items proportionally, leading to incorrect distribution (coupons applied to all items even when configured for specific items only)\n- <strong>FIXED<\/strong>: Now uses <code>$item-&gt;get_total()<\/code> \u2014 WooCommerce correctly calculates the final amount including all discounts<\/p>\n\n<ul>\n<li><strong>ISSUE<\/strong>: Items with quantity &gt; 1 were split into separate line items with quantity = 1, causing rounding issues<\/li>\n<li><p><strong>FIXED<\/strong>: Items are now sent with their actual quantity<\/p><\/li>\n<li><p><strong>ISSUE<\/strong>: When totals didn't match, the last item was adjusted, masking logic errors<\/p><\/li>\n<li><p><strong>FIXED<\/strong>: No more adjustments, amounts match exactly<\/p><\/li>\n<li><p><strong>ISSUE<\/strong>: Unnecessary fields (<code>unitPrice<\/code>, <code>discountedUnitPrice<\/code>, <code>subtotal<\/code>) were sent, which are not needed for Yandex Split<\/p><\/li>\n<li><strong>FIXED<\/strong>: Only <code>total<\/code> with the exact final amount is sent<\/li>\n<\/ul>\n\n<p><strong>Result:<\/strong>\n* Yandex data = WooCommerce data (100% match)\n* Code reduced from ~270 lines to ~70 lines (4x simplification)\n* No manual calculations or adjustments\n* All discounts (coupons, promo codes, loyalty programs) applied correctly<\/p>\n\n<p><strong>Technical:<\/strong>\n* Simplified <code>cart.items[]<\/code> data structure:\n  - Required fields: <code>productId<\/code>, <code>title<\/code>, <code>quantity.count<\/code>, <code>total<\/code>\n  - Optional fields: <code>description<\/code>\n  - Removed: <code>unitPrice<\/code>, <code>discountedUnitPrice<\/code>, <code>subtotal<\/code> (not required by API)\n* Removed bonus discount calculation block (lines 782-817)\n* Removed discount distribution logic (lines 826-877)\n* Removed item splitting logic (lines 898-937)\n* Removed last item adjustment (lines 1023-1051)<\/p>\n\n<h4>2.0.2 (2025-10-09)<\/h4>\n\n<p><strong>Security fixes:<\/strong>\n- Product descriptions are now stripped of HTML tags before being sent to external systems<\/p>\n\n<h4>2.0.1 (2025-09-30)<\/h4>\n\n<p><strong>BUG FIXES<\/strong>\n* Fixed critical block initialization error in WP Cron context\n* Fixed \"Call to a member function get_cart_contents() on null\" error during cron tasks\n* Fixed \"Call to a member function get_available_payment_gateways() on null\" error\n* Added lazy loading for payment gateways in block editor\n* Improved compatibility with plugins that filter available payment methods<\/p>\n\n<p><strong>TECHNICAL<\/strong>\n* Implemented protection against premature WooCommerce object initialization\n* Changed gateway retrieval method: uses <code>payment_gateways()<\/code> instead of <code>get_available_payment_gateways()<\/code>\n* Added existence checks for <code>WC()<\/code> and <code>WC()-&gt;payment_gateways<\/code> objects before access\n* <code>initialize()<\/code> method no longer triggers WooCommerce filters during initial load<\/p>\n\n<h4>2.0.0 (2025-09-28)<\/h4>\n\n<p>MAJOR UPDATE\n* <strong>Full WooCommerce Block Editor support<\/strong>\n* Compatibility with modern WordPress themes (Gutenberg blocks)\n* Automatic registration of Yandex Pay and Yandex Split in block cart and checkout\n* Payment method icons and descriptions in the block interface\n* Modern architecture with React component support\n* Build process for JavaScript files (webpack, babel)\n* Plugin fully restructured: now works equally stable with both classic and block checkout\n* <strong>Added refund support via Yandex API<\/strong><\/p>\n\n\n\n<p><strong>MAXIMUM DB OPTIMIZATION<\/strong>\n* Eliminated last meta_key query warning\n* Replaced all meta_key queries with global delete_metadata() function\n* Maximum efficiency for metadata deletion during uninstall<\/p>\n\n<p><strong>PERFORMANCE OPTIMIZATION<\/strong>\n* Eliminated slow meta_query warning\n* Using fields =&gt; 'ids' to retrieve only order IDs\n* Direct metadata deletion via delete_post_meta()<\/p>\n\n<p><strong>RESULT<\/strong>\n* Significantly improved performance during plugin uninstall\n* Plugin fully ready for WordPress.org, all Plugin Check tests passed<\/p>\n\n\n\n<p><strong>NAMING FIXES<\/strong>\n* Unified payment service names throughout the plugin\n* All variations standardized to consistent naming<\/p>\n\n<p><strong>RESULT<\/strong>\n* Uniform naming conventions\n* Improved user experience\n* Optimized plugin size<\/p>\n\n\n\n<p><strong>REFUNDS<\/strong>\n* Fixed refund amount availability check logic\n* Support for resending existing refunds to Yandex API\n* Eliminated WooCommerce refund duplication on API errors\n* Added detailed logging for refund amounts and statuses<\/p>\n\n\n\n<p><strong>USER EXPERIENCE<\/strong>\n* Replaced HTML tags with plain text in error messages\n* Clear instructions when settings are missing (Merchant ID, API key)\n* Merchant ID format validation (UUID) with informative messages<\/p>\n\n<h4>1.0.13<\/h4>\n\n<ul>\n<li>Date: 2025-08-23<\/li>\n<li>Minor improvements<\/li>\n<\/ul>\n\n<h4>1.0.12<\/h4>\n\n<ul>\n<li>Date: 2025-08-03<\/li>\n<li><strong>CRITICAL FIX<\/strong>: Fixed ORDER_AMOUNT_MISMATCH error when creating payments<\/li>\n<li>Fixed: Amount calculation accuracy with discounts and rounding<\/li>\n<li>Fixed: Discount distribution inaccuracies across items<\/li>\n<li>Improved: Correction algorithm for totals to meet Yandex API requirements<\/li>\n<li>Improved: Mathematical precision for monetary calculations<\/li>\n<li>Added: Automatic rounding error correction in the last cart item<\/li>\n<li>Added: Additional logging for debugging amount calculations<\/li>\n<li><strong>Technical<\/strong>: WordPress Coding Standards compliance for internationalization<\/li>\n<li><strong>Technical<\/strong>: Added translator comments for all localizable strings<\/li>\n<li><strong>Technical<\/strong>: Ordered placeholders in translatable strings (%1$s, %2$s)<\/li>\n<\/ul>\n\n<h4>ORDER_AMOUNT_MISMATCH Fix Details<\/h4>\n\n<p>The error occurred due to formula mismatch: <code>cart_total = items_sum - discounts_sum<\/code>\n* Added precise rounding at all calculation stages (round with 2 decimal places)\n* Implemented calculated_total vs woocommerce_total verification\n* Automatic correction of last item when discrepancy &gt;= 0.01\n* Improved distribution of remaining discounts across items\n* Added final validation of all amounts before sending to API<\/p>\n\n<h4>Technical Description<\/h4>\n\n<ul>\n<li>All monetary operations now use <code>round($value, 2)<\/code><\/li>\n<li>Added check <code>abs($calculated_total - $woocommerce_total) &gt;= 0.01<\/code><\/li>\n<li>Implemented correction via last cart item adjustment<\/li>\n<li>Improved logging with output of all intermediate sums for debugging<\/li>\n<li>Brought up to WordPress standards for proper localization<\/li>\n<\/ul>\n\n<h4>1.0.11<\/h4>\n\n<ul>\n<li>Date: 2025-07-20<\/li>\n<li>Added: Protection against status changes for orders paid via other payment systems<\/li>\n<li>Added: Intelligent webhook processing considering the payment method<\/li>\n<li>Improved: Order status processing logic to prevent conflicts between payment systems<\/li>\n<li>Improved: Handling of legitimate cancel\/refund operations for Yandex orders<\/li>\n<li>Fixed: Issue with cancellation of paid orders when receiving Yandex webhook after payment via another method<\/li>\n<\/ul>\n\n<h4>Order Protection<\/h4>\n\n<ul>\n<li>If an order was paid via another payment system, Yandex webhooks will no longer change its status<\/li>\n<li>Orders paid via Yandex correctly handle cancel and refund operations from the Yandex dashboard<\/li>\n<li>Informative notes added to orders when status change attempts occur<\/li>\n<\/ul>\n\n<h4>Technical Description<\/h4>\n\n<ul>\n<li><code>process_order_status_from_webhook<\/code> method now checks the order payment method before applying changes<\/li>\n<li>Added <code>$is_yandex_payment<\/code> check to determine the payment source<\/li>\n<li>Improved logging to track all status change attempts<\/li>\n<\/ul>\n\n<h4>1.0.10<\/h4>\n\n<ul>\n<li>Date: 2025-06-17<\/li>\n<li>Added: Extended Yandex Pay webhook processing<\/li>\n<li>Added: Flexible payment status mapping system<\/li>\n<li>Added: Custom filters for developers<\/li>\n<li>Improved: Webhook processing refactoring for increased reliability<\/li>\n<li>Improved: Payment operation logging<\/li>\n<li>Improved: Security of incoming request processing<\/li>\n<\/ul>\n\n<h4>Developer Filters<\/h4>\n\n<ol>\n<li><code>kosteams_payments_for_yandex_webhook_status_map<\/code>\nModifies the Yandex \u2192 WooCommerce status mapping\nParameters:<\/li>\n<\/ol>\n\n<p>- $status_map (array) - Current status mapping\n- $order (WC_Order) - Order object\n- $payment_status (string) - Status from Yandex<\/p>\n\n<p>Example:\nadd_filter('kosteams_payments_for_yandex_webhook_status_map', function($status_map, $order, $payment_status) {\n    $status_map['CAPTURED'] = 'completed';\n    return $status_map;\n}, 10, 3);<\/p>\n\n<ol>\n<li><code>kosteams_payments_for_yandex_before_process_status<\/code>\nModifies the status before applying it to the order\nParameters:<\/li>\n<\/ol>\n\n<p>- $new_status (string) - Planned status\n- $payment_status (string) - Status from Yandex\n- $order (WC_Order) - Order object<\/p>\n\n<ol>\n<li><code>kosteams_payments_for_yandex_handle_webhook_status<\/code>\nFull custom status handling (returning true cancels default processing)\nParameters:<\/li>\n<\/ol>\n\n<p>- $handled (bool) - Processing flag\n- $payment_status (string) - Status from Yandex\n- $order (WC_Order) - Order object<\/p>\n\n<ol>\n<li><code>kosteams_payments_for_yandex_status_change_note<\/code>\nModifies the note when order status changes\nParameters:<\/li>\n<\/ol>\n\n<p>- $note (string) - Note text\n- $order (WC_Order) - Order object\n- $old_status (string) - Old status\n- $new_status (string) - New status<\/p>\n\n<ol>\n<li><code>kosteams_payments_for_yandex_partial_refund_note<\/code>\nModifies the note for partial refunds\nParameters:<\/li>\n<\/ol>\n\n<p>- $note (string) - Note text\n- $order (WC_Order) - Order object<\/p>\n\n<h4>Security Improvements<\/h4>\n\n<ul>\n<li>Strengthened incoming data validation<\/li>\n<li>Improved error decoding handling<\/li>\n<\/ul>\n\n<h4>Fixed<\/h4>\n\n<ul>\n<li>Issues with PARTIALLY_REFUNDED status processing<\/li>\n<\/ul>\n\n<h4>1.0.9<\/h4>\n\n<ul>\n<li>Dynamic icon switching in the Yandex Split payment gateway depending on the selected payment method<\/li>\n<li>When selecting \"Split\", the standard Split icon is displayed<\/li>\n<li>When selecting \"Card + Split\", the combined icon is displayed<\/li>\n<\/ul>\n\n<h4>1.0.8<\/h4>\n\n<h4>Improved Discount Distribution<\/h4>\n\n<ul>\n<li>All discount types (coupons, bonuses, negative fees) are combined into a total discount amount<\/li>\n<li>Discounts are distributed proportionally across items<\/li>\n<li>Remaining discount is added to the last item for precise distribution<\/li>\n<\/ul>\n\n<h4>Improved Cart Building<\/h4>\n\n<ul>\n<li>Items with quantity &gt; 1 are created as separate line items<\/li>\n<li>Discounts are evenly distributed between units of an item<\/li>\n<li>Discounts are applied only to products (not to shipping and fees)<\/li>\n<\/ul>\n\n<h4>1.0.7<\/h4>\n\n<ul>\n<li>Style separation implemented<\/li>\n<li>Minor fixes<\/li>\n<li>Improved documentation<\/li>\n<\/ul>\n\n<h4>1.0.6<\/h4>\n\n<p><strong>Main changes:<\/strong>\n- Added separate payment gateways:\n  * <code>Yandex Split<\/code> \u2014 installment payments\n  * <code>Yandex Pay<\/code> \u2014 classic card payment\n- Shared logic extracted to base class (<code>WC_Yandex_Base_Gateway<\/code>)\n- Improved payment URL storage:\n  * Payment URLs are saved to order metadata\n  * Duplicate payment creation prevented for existing orders<\/p>\n\n<h4>1.0.5<\/h4>\n\n<ul>\n<li>Fixed compatibility with WooCommerce 8.7<\/li>\n<li>Updated test scenarios for PHP 8.3<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>Added multilingual site support<\/li>\n<li>Optimized script loading<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<li>Basic Yandex Pay\/Split integration<\/li>\n<li>Classic editor support<\/li>\n<\/ul>","raw_excerpt":"Accept payments via Yandex Pay, Yandex Split, or a combination of both. Increase conversion with flexible payment options using the KosTeams plugin.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ca.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/226127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ca.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ca.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ca.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=226127"}],"author":[{"embeddable":true,"href":"https:\/\/ca.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/pro100kostia"}],"wp:attachment":[{"href":"https:\/\/ca.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=226127"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ca.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=226127"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ca.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=226127"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ca.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=226127"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ca.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=226127"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ca.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=226127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}