Plugin Directory

Changeset 3497619


Ignore:
Timestamp:
04/02/2026 03:33:13 PM (27 hours ago)
Author:
daviddossou
Message:

Release 1.2.1: buyer processing fee option, blocks support, i18n updates

Location:
anka-commerce
Files:
25 edited
2 copied

Legend:

Unmodified
Added
Removed
  • anka-commerce/tags/1.2.1/README.md

    r3434624 r3497619  
    77**Tested up to**: 6.7
    88**Requires PHP**: 7.2
    9 **Stable tag**: 1.2.0
     9**Stable tag**: 1.2.1
    1010**License**: GPLv3 or later
    1111**License URI**: [http://www.gnu.org/licenses/gpl-3.0.html](http://www.gnu.org/licenses/gpl-3.0.html)
     
    127127## Changelog
    128128
     129### 1.2.1
     130
     131- Added an optional setting to charge buyers a fixed 4% ANKA Pay processing fee
     132- Applied processing fee support for ANKA Pay checkout flow, including direct checkout order creation
     133- Added fee metadata support for WooCommerce Blocks integration
     134- Updated translation catalogs and French locale strings for new processing fee labels
     135
    129136### 1.2.0
    130137
     
    166173## Upgrade Notice
    167174
     175### Version 1.2.1
     176This update introduces optional ANKA Pay processing fee support and translation updates. Please test checkout totals and gateway settings after upgrading.
     177
    168178### Version 1.2.0
    169179**REQUIRED UPDATE**: The ANKA Pay API has been updated. You must use version 1.2.0 or later - previous versions are no longer compatible. This version adds required category mapping and enhanced API integration.
  • anka-commerce/tags/1.2.1/anka-commerce.php

    r3434624 r3497619  
    33    * Plugin Name:       ANKA Commerce
    44    * Description:       Accept payments through ANKA Pay using Credit Cards, Mobile Money, Nigerian Bank Transfer, and PayPal on your WooCommerce store or Payment buttons.
    5     * Version:           1.2.0
     5    * Version:           1.2.1
    66    * Text Domain:       anka-commerce
    77    * Domain Path:       /languages
     
    1616    define( 'ANKA_COMMERCE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
    1717    define( 'ANKA_COMMERCE_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    18     define( 'ANKA_COMMERCE_VERSION', '1.2.0' );
     18    define( 'ANKA_COMMERCE_VERSION', '1.2.1' );
    1919    define( 'ANKA_COMMERCE_DB_VERSION', '1.1.0' );
    2020
     
    104104            add_action('template_redirect', array('Anka_Commerce_Woocommerce', 'anka_commerce_woocommerce_direct_checkout_redirection'));
    105105
     106            // Add ANKA Pay processing fee to buyer totals when enabled.
     107            add_action('woocommerce_cart_calculate_fees', array('Anka_Commerce_Woocommerce', 'anka_commerce_woocommerce_add_processing_fee'), 20, 1);
     108
    106109            // Register REST API route to get payment method icon url
    107110            add_action('rest_api_init', array('Anka_Commerce_Woocommerce', 'anka_commerce_woocommerce_register_rest_api_route'));
  • anka-commerce/tags/1.2.1/build/anka-commerce-woocommerce-block.asset.php

    r3201011 r3497619  
    1 <?php return array('dependencies' => array('react', 'wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => '746ee53e2d62b689ac27');
     1<?php return array('dependencies' => array('react', 'wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => 'eaa63f08875620c4919d');
  • anka-commerce/tags/1.2.1/build/anka-commerce-woocommerce-block.js

    r3201011 r3497619  
    1 (()=>{"use strict";var e={20:(e,t,r)=>{var o=r(609),n=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),s=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var o,c={},p=null,l=null;for(o in void 0!==r&&(p=""+r),void 0!==t.key&&(p=""+t.key),void 0!==t.ref&&(l=t.ref),t)a.call(t,o)&&!i.hasOwnProperty(o)&&(c[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===c[o]&&(c[o]=t[o]);return{$$typeof:n,type:e,key:p,ref:l,props:c,_owner:s.current}}t.jsx=c,t.jsxs=c},848:(e,t,r)=>{e.exports=r(20)},609:e=>{e.exports=window.React}},t={};const r=window.wp.i18n,o=window.wc.wcBlocksRegistry,n=window.wp.htmlEntities,a=window.wc.wcSettings,s=window.wp.element;var i=function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,r),a.exports}(848);const c=(0,a.getSetting)("ankapay_data",{}),p=(0,r.__)("ANKA Pay","anka-commerce"),l=(0,n.decodeEntities)(c.title)||p,w=()=>(0,n.decodeEntities)(c.description||""),d=()=>{const[e,t]=(0,s.useState)(c.default_icon);return(0,s.useEffect)((()=>{wp.apiFetch({path:"/anka-commerce/v1/woocommerce/get-icon-url"}).then((e=>{t(e)})).catch((e=>{console.error("Error fetching ANKA Pay icon:",e)}))}),[]),(0,i.jsx)("img",{src:e,alt:"ANKA Pay",style:{float:"right"}})},f=()=>(0,i.jsxs)("span",{style:{width:"100%"},children:[l,(0,i.jsx)(d,{})]}),u={name:"ankapay",label:(0,i.jsx)(f,{}),content:(0,i.jsx)(w,{}),edit:(0,i.jsx)(w,{}),icon:(0,i.jsx)(d,{}),canMakePayment:()=>!0,ariaLabel:l,supports:{features:c.supports}};(0,o.registerPaymentMethod)(u)})();
     1(()=>{"use strict";var e={20:(e,t,r)=>{var o=r(609),n=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),s=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var o,c={},p=null,l=null;for(o in void 0!==r&&(p=""+r),void 0!==t.key&&(p=""+t.key),void 0!==t.ref&&(l=t.ref),t)a.call(t,o)&&!i.hasOwnProperty(o)&&(c[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===c[o]&&(c[o]=t[o]);return{$$typeof:n,type:e,key:p,ref:l,props:c,_owner:s.current}}t.jsx=c,t.jsxs=c},848:(e,t,r)=>{e.exports=r(20)},609:e=>{e.exports=window.React}},t={};const r=window.wp.i18n,o=window.wc.wcBlocksRegistry,n=window.wp.htmlEntities,a=window.wc.wcSettings,s=window.wp.element;var i=function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,r),a.exports}(848);const c=(0,a.getSetting)("ankapay_data",{}),p=(0,r.__)("ANKA Pay","anka-commerce"),l=(0,n.decodeEntities)(c.title)||p,w=()=>(0,n.decodeEntities)(c.description||""),d=()=>{const[e,t]=(0,s.useState)(c.defaultIcon);return(0,s.useEffect)((()=>{wp.apiFetch({path:"/anka-commerce/v1/woocommerce/get-icon-url"}).then((e=>{t(e)})).catch((e=>{console.error("Error fetching ANKA Pay icon:",e)}))}),[]),(0,i.jsx)("img",{src:e,alt:"ANKA Pay",style:{float:"right"}})},f=()=>(0,i.jsxs)("span",{style:{width:"100%"},children:[l,(0,i.jsx)(d,{})]}),u={name:"ankapay",label:(0,i.jsx)(f,{}),content:(0,i.jsx)(w,{}),edit:(0,i.jsx)(w,{}),icon:(0,i.jsx)(d,{}),canMakePayment:()=>!0,ariaLabel:l,supports:{features:c.supports}};(0,o.registerPaymentMethod)(u)})();
  • anka-commerce/tags/1.2.1/includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay-blocks-support.php

    r3201011 r3497619  
    8787                'title'       => sanitize_text_field( $this->get_setting( 'title' ) ),
    8888                'description' => sanitize_text_field( $this->get_setting( 'description' ) ),
     89                'chargeProcessingFee' => 'yes' === sanitize_text_field( $this->get_setting( 'charge_processing_fee' ) ),
     90                'processingFeeLabel' => __( 'ANKA Pay processing fee (4%)', 'anka-commerce' ),
    8991                'defaultIcon'   => esc_url( ANKA_COMMERCE_PLUGIN_URL . 'assets/img/anka-pay-global.png' ),
    9092                'supports'      => array_filter( $this->gateway->supports, [ $this->gateway, 'supports' ] )
  • anka-commerce/tags/1.2.1/includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php

    r3434624 r3497619  
    8181          'title'       => __( 'Enable Direct Checkout', 'anka-commerce' ),
    8282          'description' => __( 'Skip WordPress checkout and go directly to ANKA Pay checkout.', 'anka-commerce' ),
     83          'type'        => 'checkbox',
     84          'default'     => 'no',
     85        ),
     86        'charge_processing_fee' => array(
     87          'title'       => __( 'Charge Processing Fee To Buyer', 'anka-commerce' ),
     88          'description' => __( 'Add a 4% ANKA Pay processing fee to the buyer total when ANKA Pay is selected.', 'anka-commerce' ),
    8389          'type'        => 'checkbox',
    8490          'default'     => 'no',
  • anka-commerce/tags/1.2.1/includes/woocommerce/class-anka-commerce-woocommerce.php

    r3434624 r3497619  
    1414
    1515    class Anka_Commerce_Woocommerce {
     16
     17            /**
     18             * Fixed ANKA Pay processing fee rate.
     19             */
     20            const ANKA_COMMERCE_WOOCOMMERCE_PROCESSING_FEE_RATE = 0.04;
    1621
    1722        /**
     
    265270
    266271        /**
     272         * Add ANKA Pay processing fee to cart totals when enabled.
     273         *
     274         * @param WC_Cart $cart
     275         */
     276        public static function anka_commerce_woocommerce_add_processing_fee( $cart ) {
     277            if ( ! $cart || ! is_a( $cart, 'WC_Cart' ) ) {
     278                return;
     279            }
     280
     281            if ( is_admin() && ! defined( 'DOING_AJAX' ) ) {
     282                return;
     283            }
     284
     285            if ( ! self::anka_commerce_woocommerce_is_processing_fee_enabled() ) {
     286                return;
     287            }
     288
     289            $selected_payment_method = self::anka_commerce_woocommerce_get_selected_payment_method();
     290            if ( 'ankapay' !== $selected_payment_method ) {
     291                return;
     292            }
     293
     294            $cart_total_for_fee = self::anka_commerce_woocommerce_get_cart_total_for_processing_fee( $cart );
     295            $fee_amount = self::anka_commerce_woocommerce_get_processing_fee_amount( $cart_total_for_fee );
     296
     297            if ( $fee_amount <= 0 ) {
     298                return;
     299            }
     300
     301            $cart->add_fee( self::anka_commerce_woocommerce_get_processing_fee_label(), $fee_amount, false );
     302        }
     303
     304        /**
    267305         * Create WooCommerce order.
    268306         *
     
    275313                $quantity = $cart_item['quantity'];
    276314                $order->add_product(wc_get_product($product_id), $quantity);
     315            }
     316
     317            if ( self::anka_commerce_woocommerce_is_processing_fee_enabled() ) {
     318                $cart_total_for_fee = self::anka_commerce_woocommerce_get_cart_total_for_processing_fee( WC()->cart );
     319                $fee_amount = self::anka_commerce_woocommerce_get_processing_fee_amount( $cart_total_for_fee );
     320
     321                if ( $fee_amount > 0 ) {
     322                    $fee_item = new WC_Order_Item_Fee();
     323                    $fee_item->set_name( self::anka_commerce_woocommerce_get_processing_fee_label() );
     324                    $fee_item->set_amount( $fee_amount );
     325                    $fee_item->set_total( $fee_amount );
     326                    $fee_item->set_tax_status( 'none' );
     327
     328                    $order->add_item( $fee_item );
     329                }
    277330            }
    278331
     
    521574            return null;
    522575        }
     576
     577        /**
     578         * Check if processing fee is enabled in ANKA Pay settings.
     579         *
     580         * @return bool
     581         */
     582        private static function anka_commerce_woocommerce_is_processing_fee_enabled() {
     583            $settings = get_option( 'woocommerce_ankapay_settings', array() );
     584            return isset( $settings['charge_processing_fee'] ) && 'yes' === $settings['charge_processing_fee'];
     585        }
     586
     587        /**
     588         * Get fee amount based on configured fixed percentage.
     589         *
     590         * @param float $base_amount
     591         * @return float
     592         */
     593        private static function anka_commerce_woocommerce_get_processing_fee_amount( $base_amount ) {
     594            if ( $base_amount <= 0 ) {
     595                return 0;
     596            }
     597
     598            $fee_amount = (float) $base_amount * self::ANKA_COMMERCE_WOOCOMMERCE_PROCESSING_FEE_RATE;
     599            return (float) wc_format_decimal( $fee_amount, wc_get_price_decimals() );
     600        }
     601
     602        /**
     603         * Get the cart total basis for processing fee.
     604         *
     605         * @param WC_Cart $cart
     606         * @return float
     607         */
     608        private static function anka_commerce_woocommerce_get_cart_total_for_processing_fee( $cart ) {
     609            if ( ! $cart || ! is_a( $cart, 'WC_Cart' ) ) {
     610                return 0;
     611            }
     612
     613            return (float) $cart->get_cart_contents_total()
     614                + (float) $cart->get_shipping_total()
     615                + (float) $cart->get_cart_contents_tax()
     616                + (float) $cart->get_shipping_tax();
     617        }
     618
     619        /**
     620         * Resolve selected payment method from request/session.
     621         *
     622         * @return string
     623         */
     624        private static function anka_commerce_woocommerce_get_selected_payment_method() {
     625            if ( isset( $_POST['payment_method'] ) ) {
     626                $posted_method = sanitize_text_field( wp_unslash( $_POST['payment_method'] ) );
     627
     628                if ( WC()->session ) {
     629                    WC()->session->set( 'chosen_payment_method', $posted_method );
     630                }
     631
     632                return $posted_method;
     633            }
     634
     635            if ( WC()->session ) {
     636                return (string) WC()->session->get( 'chosen_payment_method', '' );
     637            }
     638
     639            return '';
     640        }
     641
     642        /**
     643         * Get buyer-visible processing fee label.
     644         *
     645         * @return string
     646         */
     647        private static function anka_commerce_woocommerce_get_processing_fee_label() {
     648            return __( 'ANKA Pay processing fee (4%)', 'anka-commerce' );
     649        }
    523650    }
    524651?>
  • anka-commerce/tags/1.2.1/languages/anka-commerce-fr_FR.po

    r3434624 r3497619  
    1 # Copyright (C) 2026 
     1# Copyright (C) 2026
    22# This file is distributed under the GPL-3.0+.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: ANKA Commerce 1.2.0\n"
    6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wordpress-"
    7 "plugin\n"
    8 "POT-Creation-Date: 2026-01-07T09:24:29+00:00\n"
     5"Project-Id-Version: ANKA Commerce 1.2.1\n"
     6"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wordpress-plugin\n"
     7"POT-Creation-Date: 2026-04-02T14:03:22+00:00\n"
    98"PO-Revision-Date: 2026-01-07 10:27+0100\n"
    109"Last-Translator: \n"
     
    2928msgstr ""
    3029"Acceptez les paiements via ANKA Pay sur votre boutique WooCommerce en "
    31 "utilisant des cartes de crédit, Mobile Money, Virement bancaire nigérian, "
    32 "et PayPal."
    33 
    34 #. translators: %1$s is the error status, %2$s is the error detail, %3$s is the error source pointer
    35 #: includes/api/class-anka-pay-api.php:215
    36 msgid "Error %1$s: %2$s (%3$s)"
    37 msgstr "Erreur %1$s: %2$s (%3$s)"
     30"utilisant des cartes de crédit, Mobile Money, Virement bancaire nigérian, et "
     31"PayPal."
    3832
    3933#: includes/class-anka-commerce-categories.php:305
     
    10599"Please set your API token in the settings before creating a payment button."
    106100msgstr ""
    107 "Veuillez entrer votre Token API dans les paramètres avant de créer un "
    108 "bouton de paiement."
     101"Veuillez entrer votre Token API dans les paramètres avant de créer un bouton "
     102"de paiement."
    109103
    110104#: includes/payment-button/class-anka-commerce-payment-button-admin-setting.php:167
     
    159153#: includes/payment-button/class-anka-commerce-payment-button-admin-setting.php:228
    160154msgid "Select the category that best describes your product or service"
    161 msgstr ""
    162 "Sélectionnez la catégorie qui décrit le mieux votre produit ou service"
     155msgstr "Sélectionnez la catégorie qui décrit le mieux votre produit ou service"
    163156
    164157#: includes/payment-button/class-anka-commerce-payment-button-admin-setting.php:230
     
    248241
    249242#: includes/webhook/class-anka-pay-webhook-handler.php:143
    250 #: includes/woocommerce/class-anka-commerce-woocommerce.php:204
     243#: includes/woocommerce/class-anka-commerce-woocommerce.php:209
    251244msgid "Awaiting ANKA Pay payment"
    252245msgstr "En attente du paiement ANKA Pay"
     
    259252msgid "ANKA Pay payment failed"
    260253msgstr "Échec du paiement ANKA Pay"
     254
     255#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay-blocks-support.php:90
     256#: includes/woocommerce/class-anka-commerce-woocommerce.php:648
     257msgid "ANKA Pay processing fee (4%)"
     258msgstr "Frais de traitement ANKA Pay (4 %)"
    261259
    262260#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:34
     
    273271msgstr ""
    274272"Acceptez les paiements via ANKA Pay sur votre boutique WooCommerce en "
    275 "utilisant des cartes de crédit, Mobile Money, Virement bancaire nigérian, "
    276 "et PayPal."
     273"utilisant des cartes de crédit, Mobile Money, Virement bancaire nigérian, et "
     274"PayPal."
    277275
    278276#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:75
     
    299297
    300298#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:87
     299msgid "Charge Processing Fee To Buyer"
     300msgstr "Facturer les frais de traitement à l’acheteur"
     301
     302#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:88
     303msgid ""
     304"Add a 4% ANKA Pay processing fee to the buyer total when ANKA Pay is "
     305"selected."
     306msgstr ""
     307"Ajouter des frais de traitement ANKA Pay de 4 % au total payé par "
     308"l’acheteur lorsque ANKA Pay est sélectionné."
     309
     310#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:93
    301311msgid "Category Mapping"
    302312msgstr "Cartographie des catégories"
    303313
    304314#. translators: %s: Clear cache URL
    305 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:91
     315#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:97
    306316msgid ""
    307317"<strong>REQUIRED FOR FRAUD MONITORING:</strong> You must map each "
     
    320330"actualiser les catégories à partir de l'API"
    321331
    322 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:136
     332#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:142
    323333msgid "WooCommerce Category"
    324334msgstr "Catégories WooCommerce"
    325335
    326 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:139
     336#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:145
    327337msgid "ANKA Pay Category"
    328338msgstr "Catégories ANKA Pay"
    329339
    330 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:157
     340#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:163
    331341msgid "-- Select ANKA Category --"
    332342msgstr "-- Sélectionnez la catégorie ANKA --"
    333343
    334 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:176
     344#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:182
    335345msgid ""
    336346"No WooCommerce product categories found. Create product categories first."
     
    339349"catégories de produits."
    340350
    341 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:262
     351#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:268
    342352msgid "Payment error: Unable to create payment link with ANKA Pay."
    343353msgstr ""
     
    345355
    346356#. translators: %s: error message
    347 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:270
    348 #: includes/woocommerce/class-anka-commerce-woocommerce.php:120
     357#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:276
     358#: includes/woocommerce/class-anka-commerce-woocommerce.php:125
    349359msgid "ANKA Pay API Error: %s"
    350360msgstr "Erreur API ANKA Pay : %s"
    351361
    352 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:320
     362#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:326
    353363msgid "Categories cache cleared and refreshed from API!"
    354364msgstr "Cache des catégories effacé et actualisé à partir de l'API !"
    355365
    356366#. translators: 1: WooCommerce settings URL
    357 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:332
     367#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:338
    358368msgid ""
    359369"ANKA Pay is enabled, but the checkout page is not forced to use HTTPS. "
     
    365375"forçant l’utilisation de SSL sur les pages de paiement dans le %s."
    366376
    367 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:333
    368 #: includes/woocommerce/class-anka-commerce-woocommerce.php:261
     377#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:339
     378#: includes/woocommerce/class-anka-commerce-woocommerce.php:266
    369379msgid "WooCommerce settings"
    370380msgstr "Réglages WooCommerce"
    371381
    372 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:359
    373 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:377
     382#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:365
     383#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:383
    374384msgid "ANKA Pay: ACTION REQUIRED"
    375385msgstr "ANKA Pay : ACTION REQUISE"
    376386
    377387#. translators: 1: WooCommerce categories URL, 2: ANKA Pay settings URL
    378 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:361
     388#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:367
    379389msgid ""
    380390"Payment processing is blocked because no product categories exist. You must "
     
    386396"dans %2$s afin de respecter les normes de prévention de la fraude."
    387397
    388 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:362
     398#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:368
    389399msgid "create product categories"
    390400msgstr "créer des catégories de produits"
    391401
    392 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:363
    393 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:381
     402#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:369
     403#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:387
    394404msgid "ANKA Pay settings"
    395405msgstr "Réglages ANKA Pay"
    396406
    397407#. translators: 1: list of unmapped categories, 2: ANKA Pay settings URL
    398 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:379
     408#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:385
    399409msgid ""
    400410"Payment processing is blocked for products in these unmapped categories: "
     
    407417"de la fraude."
    408418
    409 #: includes/woocommerce/class-anka-commerce-woocommerce.php:95
     419#: includes/woocommerce/class-anka-commerce-woocommerce.php:100
    410420msgid "Your cart is empty."
    411421msgstr "Votre panier est vide."
    412422
    413 #: includes/woocommerce/class-anka-commerce-woocommerce.php:102
     423#: includes/woocommerce/class-anka-commerce-woocommerce.php:107
    414424msgid "Unable to create order."
    415425msgstr "Impossible de créer une commande."
    416426
    417 #: includes/woocommerce/class-anka-commerce-woocommerce.php:114
     427#: includes/woocommerce/class-anka-commerce-woocommerce.php:119
    418428msgid "ANKA Pay payment link creation failed"
    419429msgstr "Échec de la création du lien de paiement ANKA Pay"
    420430
    421 #: includes/woocommerce/class-anka-commerce-woocommerce.php:163
     431#: includes/woocommerce/class-anka-commerce-woocommerce.php:168
    422432msgid "Uncategorized"
    423433msgstr "Sans catégorie"
    424434
    425435#. translators: %s: product categories
    426 #: includes/woocommerce/class-anka-commerce-woocommerce.php:168
     436#: includes/woocommerce/class-anka-commerce-woocommerce.php:173
    427437msgid ""
    428438"Payment link creation blocked: No ANKA Pay category mapping configured for "
     
    436446
    437447#. translators: %s: link to contact
    438 #: includes/woocommerce/class-anka-commerce-woocommerce.php:178
     448#: includes/woocommerce/class-anka-commerce-woocommerce.php:183
    439449msgid ""
    440450"Unable to process payment: Products in your cart must have categories "
     
    444454"Impossible de traiter le paiement : les produits dans votre panier doivent "
    445455"être classés dans des catégories attribuées et mappées par l'administrateur "
    446 "du magasin afin de prévenir toute fraude. Veuillez contacter le magasin "
    447 "pour obtenir de l'aide. %s"
    448 
    449 #: includes/woocommerce/class-anka-commerce-woocommerce.php:179
     456"du magasin afin de prévenir toute fraude. Veuillez contacter le magasin pour "
     457"obtenir de l'aide. %s"
     458
     459#: includes/woocommerce/class-anka-commerce-woocommerce.php:184
    450460msgid "Configure now"
    451461msgstr "Configurer maintenant"
    452462
    453463#. translators: %s: category value
    454 #: includes/woocommerce/class-anka-commerce-woocommerce.php:189
     464#: includes/woocommerce/class-anka-commerce-woocommerce.php:194
    455465msgid ""
    456466"Payment link creation blocked: Invalid ANKA Pay category \"%s\". Please "
    457467"update category mapping in ANKA Pay settings with a valid category."
    458468msgstr ""
    459 "Création du lien de paiement bloquée : catégorie ANKA Pay « %s » non "
    460 "valide. Veuillez mettre à jour le mappage des catégories dans les "
    461 "paramètres ANKA Pay avec une catégorie valide."
    462 
    463 #: includes/woocommerce/class-anka-commerce-woocommerce.php:196
     469"Création du lien de paiement bloquée : catégorie ANKA Pay « %s » non valide. "
     470"Veuillez mettre à jour le mappage des catégories dans les paramètres ANKA "
     471"Pay avec une catégorie valide."
     472
     473#: includes/woocommerce/class-anka-commerce-woocommerce.php:201
    464474msgid ""
    465475"Invalid product category configuration. Please contact the store "
     
    489499msgid "Select Payment Button"
    490500msgstr "Sélectionner un bouton de paiement"
     501
     502#~ msgid "Error %1$s: %2$s (%3$s)"
     503#~ msgstr "Erreur %1$s: %2$s (%3$s)"
  • anka-commerce/tags/1.2.1/languages/anka-commerce.pot

    r3434624 r3497619  
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-01-07T09:24:29+00:00\n"
     12"POT-Creation-Date: 2026-04-02T14:03:22+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.10.0\n"
     
    2323#: anka-commerce.php
    2424msgid "Accept payments through ANKA Pay using Credit Cards, Mobile Money, Nigerian Bank Transfer, and PayPal on your WooCommerce store or Payment buttons."
    25 msgstr ""
    26 
    27 #. translators: %1$s is the error status, %2$s is the error detail, %3$s is the error source pointer
    28 #: includes/api/class-anka-pay-api.php:215
    29 msgid "Error %1$s: %2$s (%3$s)"
    3025msgstr ""
    3126
     
    228223
    229224#: includes/webhook/class-anka-pay-webhook-handler.php:143
    230 #: includes/woocommerce/class-anka-commerce-woocommerce.php:204
     225#: includes/woocommerce/class-anka-commerce-woocommerce.php:209
    231226msgid "Awaiting ANKA Pay payment"
    232227msgstr ""
     
    238233#: includes/webhook/class-anka-pay-webhook-handler.php:153
    239234msgid "ANKA Pay payment failed"
     235msgstr ""
     236
     237#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay-blocks-support.php:90
     238#: includes/woocommerce/class-anka-commerce-woocommerce.php:648
     239msgid "ANKA Pay processing fee (4%)"
    240240msgstr ""
    241241
     
    268268
    269269#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:87
     270msgid "Charge Processing Fee To Buyer"
     271msgstr ""
     272
     273#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:88
     274msgid "Add a 4% ANKA Pay processing fee to the buyer total when ANKA Pay is selected."
     275msgstr ""
     276
     277#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:93
    270278msgid "Category Mapping"
    271279msgstr ""
    272280
    273281#. translators: %s: Clear cache URL
    274 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:91
     282#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:97
    275283msgid "<strong>REQUIRED FOR FRAUD MONITORING:</strong> You must map each WooCommerce product category to a specific ANKA Pay category. Payment link creation will be blocked for products without a valid category mapping. Unmapped categories will cause checkout to fail.<br><br><a href=\"%s\" class=\"button button-secondary\">Clear Categories Cache</a> - Click to refresh categories from API"
    276284msgstr ""
    277285
    278 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:136
     286#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:142
    279287msgid "WooCommerce Category"
    280288msgstr ""
    281289
    282 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:139
     290#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:145
    283291msgid "ANKA Pay Category"
    284292msgstr ""
    285293
    286 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:157
     294#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:163
    287295msgid "-- Select ANKA Category --"
    288296msgstr ""
    289297
    290 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:176
     298#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:182
    291299msgid "No WooCommerce product categories found. Create product categories first."
    292300msgstr ""
    293301
    294 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:262
     302#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:268
    295303msgid "Payment error: Unable to create payment link with ANKA Pay."
    296304msgstr ""
    297305
    298306#. translators: %s: error message
    299 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:270
    300 #: includes/woocommerce/class-anka-commerce-woocommerce.php:120
     307#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:276
     308#: includes/woocommerce/class-anka-commerce-woocommerce.php:125
    301309msgid "ANKA Pay API Error: %s"
    302310msgstr ""
    303311
    304 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:320
     312#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:326
    305313msgid "Categories cache cleared and refreshed from API!"
    306314msgstr ""
    307315
    308316#. translators: 1: WooCommerce settings URL
    309 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:332
     317#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:338
    310318msgid "ANKA Pay is enabled, but the checkout page is not forced to use HTTPS. Please ensure your checkout page is secure by forcing SSL on the checkout pages in the %s."
    311319msgstr ""
    312320
    313 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:333
    314 #: includes/woocommerce/class-anka-commerce-woocommerce.php:261
     321#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:339
     322#: includes/woocommerce/class-anka-commerce-woocommerce.php:266
    315323msgid "WooCommerce settings"
    316324msgstr ""
    317325
    318 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:359
    319 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:377
     326#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:365
     327#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:383
    320328msgid "ANKA Pay: ACTION REQUIRED"
    321329msgstr ""
    322330
    323331#. translators: 1: WooCommerce categories URL, 2: ANKA Pay settings URL
    324 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:361
     332#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:367
    325333msgid "Payment processing is blocked because no product categories exist. You must %1$s, assign them to your products, and then map them in the %2$s for fraud prevention compliance."
    326334msgstr ""
    327335
    328 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:362
     336#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:368
    329337msgid "create product categories"
    330338msgstr ""
    331339
    332 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:363
    333 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:381
     340#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:369
     341#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:387
    334342msgid "ANKA Pay settings"
    335343msgstr ""
    336344
    337345#. translators: 1: list of unmapped categories, 2: ANKA Pay settings URL
    338 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:379
     346#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:385
    339347msgid "Payment processing is blocked for products in these unmapped categories: <strong>%1$s</strong>. You must map ALL categories in the %2$s for fraud prevention compliance."
    340348msgstr ""
    341349
    342 #: includes/woocommerce/class-anka-commerce-woocommerce.php:95
     350#: includes/woocommerce/class-anka-commerce-woocommerce.php:100
    343351msgid "Your cart is empty."
    344352msgstr ""
    345353
    346 #: includes/woocommerce/class-anka-commerce-woocommerce.php:102
     354#: includes/woocommerce/class-anka-commerce-woocommerce.php:107
    347355msgid "Unable to create order."
    348356msgstr ""
    349357
    350 #: includes/woocommerce/class-anka-commerce-woocommerce.php:114
     358#: includes/woocommerce/class-anka-commerce-woocommerce.php:119
    351359msgid "ANKA Pay payment link creation failed"
    352360msgstr ""
    353361
    354 #: includes/woocommerce/class-anka-commerce-woocommerce.php:163
     362#: includes/woocommerce/class-anka-commerce-woocommerce.php:168
    355363msgid "Uncategorized"
    356364msgstr ""
    357365
    358366#. translators: %s: product categories
    359 #: includes/woocommerce/class-anka-commerce-woocommerce.php:168
     367#: includes/woocommerce/class-anka-commerce-woocommerce.php:173
    360368msgid "Payment link creation blocked: No ANKA Pay category mapping configured for product categories: %s. This is required for fraud monitoring. Please configure category mapping in ANKA Pay settings."
    361369msgstr ""
    362370
    363371#. translators: %s: link to contact
    364 #: includes/woocommerce/class-anka-commerce-woocommerce.php:178
     372#: includes/woocommerce/class-anka-commerce-woocommerce.php:183
    365373msgid "Unable to process payment: Products in your cart must have categories assigned and mapped by the store administrator for fraud prevention. Please contact the store for assistance. %s"
    366374msgstr ""
    367375
    368 #: includes/woocommerce/class-anka-commerce-woocommerce.php:179
     376#: includes/woocommerce/class-anka-commerce-woocommerce.php:184
    369377msgid "Configure now"
    370378msgstr ""
    371379
    372380#. translators: %s: category value
    373 #: includes/woocommerce/class-anka-commerce-woocommerce.php:189
     381#: includes/woocommerce/class-anka-commerce-woocommerce.php:194
    374382msgid "Payment link creation blocked: Invalid ANKA Pay category \"%s\". Please update category mapping in ANKA Pay settings with a valid category."
    375383msgstr ""
    376384
    377 #: includes/woocommerce/class-anka-commerce-woocommerce.php:196
     385#: includes/woocommerce/class-anka-commerce-woocommerce.php:201
    378386msgid "Invalid product category configuration. Please contact the store administrator to update category mappings."
    379387msgstr ""
  • anka-commerce/tags/1.2.1/package-lock.json

    r3336161 r3497619  
    11{
    22  "name": "anka-commerce",
    3   "version": "1.1.4",
     3  "version": "1.2.1",
    44  "lockfileVersion": 3,
    55  "requires": true,
     
    77    "": {
    88      "name": "anka-commerce",
    9       "version": "1.1.4",
     9      "version": "1.2.1",
    1010      "license": "ISC",
    1111      "devDependencies": {
  • anka-commerce/tags/1.2.1/package.json

    r3434624 r3497619  
    22  "name": "anka-commerce",
    33  "title": "ANKA Commerce",
    4   "version": "1.2.0",
     4  "version": "1.2.1",
    55  "license": "ISC",
    66  "keywords": [],
  • anka-commerce/tags/1.2.1/readme.txt

    r3465368 r3497619  
    66Tested up to: 6.7
    77Requires PHP: 7.2
    8 Stable tag: 1.2.0
     8Stable tag: 1.2.1
    99License: GPLv3 or later
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    119119
    120120== Changelog ==
     121= 1.2.1 =
     122* Added an optional setting to charge buyers a fixed 4% ANKA Pay processing fee
     123* Applied processing fee support for ANKA Pay checkout flow, including direct checkout order creation
     124* Added fee metadata support for WooCommerce Blocks integration
     125* Updated translation catalogs and French locale strings for new processing fee labels
     126
    121127= 1.2.0 =
    122128* **IMPORTANT**: This update is required for compatibility with the latest ANKA Pay API. Previous versions will stop working when the API is updated.
     
    150156
    151157== Upgrade Notice ==
     158= 1.2.1 =
     159This update introduces optional ANKA Pay processing fee support and translation updates. Please test checkout totals and gateway settings after upgrading.
     160
    152161= 1.2.0 =
    153162**CRITICAL UPDATE REQUIRED**: You must upgrade to version 1.2.0 before the ANKA Pay API update. Previous versions will stop working after the API deployment. This version adds required category and image URL support for API compatibility.
  • anka-commerce/trunk/README.md

    r3434624 r3497619  
    77**Tested up to**: 6.7
    88**Requires PHP**: 7.2
    9 **Stable tag**: 1.2.0
     9**Stable tag**: 1.2.1
    1010**License**: GPLv3 or later
    1111**License URI**: [http://www.gnu.org/licenses/gpl-3.0.html](http://www.gnu.org/licenses/gpl-3.0.html)
     
    127127## Changelog
    128128
     129### 1.2.1
     130
     131- Added an optional setting to charge buyers a fixed 4% ANKA Pay processing fee
     132- Applied processing fee support for ANKA Pay checkout flow, including direct checkout order creation
     133- Added fee metadata support for WooCommerce Blocks integration
     134- Updated translation catalogs and French locale strings for new processing fee labels
     135
    129136### 1.2.0
    130137
     
    166173## Upgrade Notice
    167174
     175### Version 1.2.1
     176This update introduces optional ANKA Pay processing fee support and translation updates. Please test checkout totals and gateway settings after upgrading.
     177
    168178### Version 1.2.0
    169179**REQUIRED UPDATE**: The ANKA Pay API has been updated. You must use version 1.2.0 or later - previous versions are no longer compatible. This version adds required category mapping and enhanced API integration.
  • anka-commerce/trunk/anka-commerce.php

    r3434624 r3497619  
    33    * Plugin Name:       ANKA Commerce
    44    * Description:       Accept payments through ANKA Pay using Credit Cards, Mobile Money, Nigerian Bank Transfer, and PayPal on your WooCommerce store or Payment buttons.
    5     * Version:           1.2.0
     5    * Version:           1.2.1
    66    * Text Domain:       anka-commerce
    77    * Domain Path:       /languages
     
    1616    define( 'ANKA_COMMERCE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
    1717    define( 'ANKA_COMMERCE_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    18     define( 'ANKA_COMMERCE_VERSION', '1.2.0' );
     18    define( 'ANKA_COMMERCE_VERSION', '1.2.1' );
    1919    define( 'ANKA_COMMERCE_DB_VERSION', '1.1.0' );
    2020
     
    104104            add_action('template_redirect', array('Anka_Commerce_Woocommerce', 'anka_commerce_woocommerce_direct_checkout_redirection'));
    105105
     106            // Add ANKA Pay processing fee to buyer totals when enabled.
     107            add_action('woocommerce_cart_calculate_fees', array('Anka_Commerce_Woocommerce', 'anka_commerce_woocommerce_add_processing_fee'), 20, 1);
     108
    106109            // Register REST API route to get payment method icon url
    107110            add_action('rest_api_init', array('Anka_Commerce_Woocommerce', 'anka_commerce_woocommerce_register_rest_api_route'));
  • anka-commerce/trunk/build/anka-commerce-woocommerce-block.asset.php

    r3201011 r3497619  
    1 <?php return array('dependencies' => array('react', 'wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => '746ee53e2d62b689ac27');
     1<?php return array('dependencies' => array('react', 'wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => 'eaa63f08875620c4919d');
  • anka-commerce/trunk/build/anka-commerce-woocommerce-block.js

    r3201011 r3497619  
    1 (()=>{"use strict";var e={20:(e,t,r)=>{var o=r(609),n=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),s=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var o,c={},p=null,l=null;for(o in void 0!==r&&(p=""+r),void 0!==t.key&&(p=""+t.key),void 0!==t.ref&&(l=t.ref),t)a.call(t,o)&&!i.hasOwnProperty(o)&&(c[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===c[o]&&(c[o]=t[o]);return{$$typeof:n,type:e,key:p,ref:l,props:c,_owner:s.current}}t.jsx=c,t.jsxs=c},848:(e,t,r)=>{e.exports=r(20)},609:e=>{e.exports=window.React}},t={};const r=window.wp.i18n,o=window.wc.wcBlocksRegistry,n=window.wp.htmlEntities,a=window.wc.wcSettings,s=window.wp.element;var i=function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,r),a.exports}(848);const c=(0,a.getSetting)("ankapay_data",{}),p=(0,r.__)("ANKA Pay","anka-commerce"),l=(0,n.decodeEntities)(c.title)||p,w=()=>(0,n.decodeEntities)(c.description||""),d=()=>{const[e,t]=(0,s.useState)(c.default_icon);return(0,s.useEffect)((()=>{wp.apiFetch({path:"/anka-commerce/v1/woocommerce/get-icon-url"}).then((e=>{t(e)})).catch((e=>{console.error("Error fetching ANKA Pay icon:",e)}))}),[]),(0,i.jsx)("img",{src:e,alt:"ANKA Pay",style:{float:"right"}})},f=()=>(0,i.jsxs)("span",{style:{width:"100%"},children:[l,(0,i.jsx)(d,{})]}),u={name:"ankapay",label:(0,i.jsx)(f,{}),content:(0,i.jsx)(w,{}),edit:(0,i.jsx)(w,{}),icon:(0,i.jsx)(d,{}),canMakePayment:()=>!0,ariaLabel:l,supports:{features:c.supports}};(0,o.registerPaymentMethod)(u)})();
     1(()=>{"use strict";var e={20:(e,t,r)=>{var o=r(609),n=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),s=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var o,c={},p=null,l=null;for(o in void 0!==r&&(p=""+r),void 0!==t.key&&(p=""+t.key),void 0!==t.ref&&(l=t.ref),t)a.call(t,o)&&!i.hasOwnProperty(o)&&(c[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===c[o]&&(c[o]=t[o]);return{$$typeof:n,type:e,key:p,ref:l,props:c,_owner:s.current}}t.jsx=c,t.jsxs=c},848:(e,t,r)=>{e.exports=r(20)},609:e=>{e.exports=window.React}},t={};const r=window.wp.i18n,o=window.wc.wcBlocksRegistry,n=window.wp.htmlEntities,a=window.wc.wcSettings,s=window.wp.element;var i=function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,r),a.exports}(848);const c=(0,a.getSetting)("ankapay_data",{}),p=(0,r.__)("ANKA Pay","anka-commerce"),l=(0,n.decodeEntities)(c.title)||p,w=()=>(0,n.decodeEntities)(c.description||""),d=()=>{const[e,t]=(0,s.useState)(c.defaultIcon);return(0,s.useEffect)((()=>{wp.apiFetch({path:"/anka-commerce/v1/woocommerce/get-icon-url"}).then((e=>{t(e)})).catch((e=>{console.error("Error fetching ANKA Pay icon:",e)}))}),[]),(0,i.jsx)("img",{src:e,alt:"ANKA Pay",style:{float:"right"}})},f=()=>(0,i.jsxs)("span",{style:{width:"100%"},children:[l,(0,i.jsx)(d,{})]}),u={name:"ankapay",label:(0,i.jsx)(f,{}),content:(0,i.jsx)(w,{}),edit:(0,i.jsx)(w,{}),icon:(0,i.jsx)(d,{}),canMakePayment:()=>!0,ariaLabel:l,supports:{features:c.supports}};(0,o.registerPaymentMethod)(u)})();
  • anka-commerce/trunk/includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay-blocks-support.php

    r3201011 r3497619  
    8787                'title'       => sanitize_text_field( $this->get_setting( 'title' ) ),
    8888                'description' => sanitize_text_field( $this->get_setting( 'description' ) ),
     89                'chargeProcessingFee' => 'yes' === sanitize_text_field( $this->get_setting( 'charge_processing_fee' ) ),
     90                'processingFeeLabel' => __( 'ANKA Pay processing fee (4%)', 'anka-commerce' ),
    8991                'defaultIcon'   => esc_url( ANKA_COMMERCE_PLUGIN_URL . 'assets/img/anka-pay-global.png' ),
    9092                'supports'      => array_filter( $this->gateway->supports, [ $this->gateway, 'supports' ] )
  • anka-commerce/trunk/includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php

    r3434624 r3497619  
    8181          'title'       => __( 'Enable Direct Checkout', 'anka-commerce' ),
    8282          'description' => __( 'Skip WordPress checkout and go directly to ANKA Pay checkout.', 'anka-commerce' ),
     83          'type'        => 'checkbox',
     84          'default'     => 'no',
     85        ),
     86        'charge_processing_fee' => array(
     87          'title'       => __( 'Charge Processing Fee To Buyer', 'anka-commerce' ),
     88          'description' => __( 'Add a 4% ANKA Pay processing fee to the buyer total when ANKA Pay is selected.', 'anka-commerce' ),
    8389          'type'        => 'checkbox',
    8490          'default'     => 'no',
  • anka-commerce/trunk/includes/woocommerce/class-anka-commerce-woocommerce.php

    r3434624 r3497619  
    1414
    1515    class Anka_Commerce_Woocommerce {
     16
     17            /**
     18             * Fixed ANKA Pay processing fee rate.
     19             */
     20            const ANKA_COMMERCE_WOOCOMMERCE_PROCESSING_FEE_RATE = 0.04;
    1621
    1722        /**
     
    265270
    266271        /**
     272         * Add ANKA Pay processing fee to cart totals when enabled.
     273         *
     274         * @param WC_Cart $cart
     275         */
     276        public static function anka_commerce_woocommerce_add_processing_fee( $cart ) {
     277            if ( ! $cart || ! is_a( $cart, 'WC_Cart' ) ) {
     278                return;
     279            }
     280
     281            if ( is_admin() && ! defined( 'DOING_AJAX' ) ) {
     282                return;
     283            }
     284
     285            if ( ! self::anka_commerce_woocommerce_is_processing_fee_enabled() ) {
     286                return;
     287            }
     288
     289            $selected_payment_method = self::anka_commerce_woocommerce_get_selected_payment_method();
     290            if ( 'ankapay' !== $selected_payment_method ) {
     291                return;
     292            }
     293
     294            $cart_total_for_fee = self::anka_commerce_woocommerce_get_cart_total_for_processing_fee( $cart );
     295            $fee_amount = self::anka_commerce_woocommerce_get_processing_fee_amount( $cart_total_for_fee );
     296
     297            if ( $fee_amount <= 0 ) {
     298                return;
     299            }
     300
     301            $cart->add_fee( self::anka_commerce_woocommerce_get_processing_fee_label(), $fee_amount, false );
     302        }
     303
     304        /**
    267305         * Create WooCommerce order.
    268306         *
     
    275313                $quantity = $cart_item['quantity'];
    276314                $order->add_product(wc_get_product($product_id), $quantity);
     315            }
     316
     317            if ( self::anka_commerce_woocommerce_is_processing_fee_enabled() ) {
     318                $cart_total_for_fee = self::anka_commerce_woocommerce_get_cart_total_for_processing_fee( WC()->cart );
     319                $fee_amount = self::anka_commerce_woocommerce_get_processing_fee_amount( $cart_total_for_fee );
     320
     321                if ( $fee_amount > 0 ) {
     322                    $fee_item = new WC_Order_Item_Fee();
     323                    $fee_item->set_name( self::anka_commerce_woocommerce_get_processing_fee_label() );
     324                    $fee_item->set_amount( $fee_amount );
     325                    $fee_item->set_total( $fee_amount );
     326                    $fee_item->set_tax_status( 'none' );
     327
     328                    $order->add_item( $fee_item );
     329                }
    277330            }
    278331
     
    521574            return null;
    522575        }
     576
     577        /**
     578         * Check if processing fee is enabled in ANKA Pay settings.
     579         *
     580         * @return bool
     581         */
     582        private static function anka_commerce_woocommerce_is_processing_fee_enabled() {
     583            $settings = get_option( 'woocommerce_ankapay_settings', array() );
     584            return isset( $settings['charge_processing_fee'] ) && 'yes' === $settings['charge_processing_fee'];
     585        }
     586
     587        /**
     588         * Get fee amount based on configured fixed percentage.
     589         *
     590         * @param float $base_amount
     591         * @return float
     592         */
     593        private static function anka_commerce_woocommerce_get_processing_fee_amount( $base_amount ) {
     594            if ( $base_amount <= 0 ) {
     595                return 0;
     596            }
     597
     598            $fee_amount = (float) $base_amount * self::ANKA_COMMERCE_WOOCOMMERCE_PROCESSING_FEE_RATE;
     599            return (float) wc_format_decimal( $fee_amount, wc_get_price_decimals() );
     600        }
     601
     602        /**
     603         * Get the cart total basis for processing fee.
     604         *
     605         * @param WC_Cart $cart
     606         * @return float
     607         */
     608        private static function anka_commerce_woocommerce_get_cart_total_for_processing_fee( $cart ) {
     609            if ( ! $cart || ! is_a( $cart, 'WC_Cart' ) ) {
     610                return 0;
     611            }
     612
     613            return (float) $cart->get_cart_contents_total()
     614                + (float) $cart->get_shipping_total()
     615                + (float) $cart->get_cart_contents_tax()
     616                + (float) $cart->get_shipping_tax();
     617        }
     618
     619        /**
     620         * Resolve selected payment method from request/session.
     621         *
     622         * @return string
     623         */
     624        private static function anka_commerce_woocommerce_get_selected_payment_method() {
     625            if ( isset( $_POST['payment_method'] ) ) {
     626                $posted_method = sanitize_text_field( wp_unslash( $_POST['payment_method'] ) );
     627
     628                if ( WC()->session ) {
     629                    WC()->session->set( 'chosen_payment_method', $posted_method );
     630                }
     631
     632                return $posted_method;
     633            }
     634
     635            if ( WC()->session ) {
     636                return (string) WC()->session->get( 'chosen_payment_method', '' );
     637            }
     638
     639            return '';
     640        }
     641
     642        /**
     643         * Get buyer-visible processing fee label.
     644         *
     645         * @return string
     646         */
     647        private static function anka_commerce_woocommerce_get_processing_fee_label() {
     648            return __( 'ANKA Pay processing fee (4%)', 'anka-commerce' );
     649        }
    523650    }
    524651?>
  • anka-commerce/trunk/languages/anka-commerce-fr_FR.po

    r3434624 r3497619  
    1 # Copyright (C) 2026 
     1# Copyright (C) 2026
    22# This file is distributed under the GPL-3.0+.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: ANKA Commerce 1.2.0\n"
    6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wordpress-"
    7 "plugin\n"
    8 "POT-Creation-Date: 2026-01-07T09:24:29+00:00\n"
     5"Project-Id-Version: ANKA Commerce 1.2.1\n"
     6"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wordpress-plugin\n"
     7"POT-Creation-Date: 2026-04-02T14:03:22+00:00\n"
    98"PO-Revision-Date: 2026-01-07 10:27+0100\n"
    109"Last-Translator: \n"
     
    2928msgstr ""
    3029"Acceptez les paiements via ANKA Pay sur votre boutique WooCommerce en "
    31 "utilisant des cartes de crédit, Mobile Money, Virement bancaire nigérian, "
    32 "et PayPal."
    33 
    34 #. translators: %1$s is the error status, %2$s is the error detail, %3$s is the error source pointer
    35 #: includes/api/class-anka-pay-api.php:215
    36 msgid "Error %1$s: %2$s (%3$s)"
    37 msgstr "Erreur %1$s: %2$s (%3$s)"
     30"utilisant des cartes de crédit, Mobile Money, Virement bancaire nigérian, et "
     31"PayPal."
    3832
    3933#: includes/class-anka-commerce-categories.php:305
     
    10599"Please set your API token in the settings before creating a payment button."
    106100msgstr ""
    107 "Veuillez entrer votre Token API dans les paramètres avant de créer un "
    108 "bouton de paiement."
     101"Veuillez entrer votre Token API dans les paramètres avant de créer un bouton "
     102"de paiement."
    109103
    110104#: includes/payment-button/class-anka-commerce-payment-button-admin-setting.php:167
     
    159153#: includes/payment-button/class-anka-commerce-payment-button-admin-setting.php:228
    160154msgid "Select the category that best describes your product or service"
    161 msgstr ""
    162 "Sélectionnez la catégorie qui décrit le mieux votre produit ou service"
     155msgstr "Sélectionnez la catégorie qui décrit le mieux votre produit ou service"
    163156
    164157#: includes/payment-button/class-anka-commerce-payment-button-admin-setting.php:230
     
    248241
    249242#: includes/webhook/class-anka-pay-webhook-handler.php:143
    250 #: includes/woocommerce/class-anka-commerce-woocommerce.php:204
     243#: includes/woocommerce/class-anka-commerce-woocommerce.php:209
    251244msgid "Awaiting ANKA Pay payment"
    252245msgstr "En attente du paiement ANKA Pay"
     
    259252msgid "ANKA Pay payment failed"
    260253msgstr "Échec du paiement ANKA Pay"
     254
     255#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay-blocks-support.php:90
     256#: includes/woocommerce/class-anka-commerce-woocommerce.php:648
     257msgid "ANKA Pay processing fee (4%)"
     258msgstr "Frais de traitement ANKA Pay (4 %)"
    261259
    262260#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:34
     
    273271msgstr ""
    274272"Acceptez les paiements via ANKA Pay sur votre boutique WooCommerce en "
    275 "utilisant des cartes de crédit, Mobile Money, Virement bancaire nigérian, "
    276 "et PayPal."
     273"utilisant des cartes de crédit, Mobile Money, Virement bancaire nigérian, et "
     274"PayPal."
    277275
    278276#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:75
     
    299297
    300298#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:87
     299msgid "Charge Processing Fee To Buyer"
     300msgstr "Facturer les frais de traitement à l’acheteur"
     301
     302#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:88
     303msgid ""
     304"Add a 4% ANKA Pay processing fee to the buyer total when ANKA Pay is "
     305"selected."
     306msgstr ""
     307"Ajouter des frais de traitement ANKA Pay de 4 % au total payé par "
     308"l’acheteur lorsque ANKA Pay est sélectionné."
     309
     310#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:93
    301311msgid "Category Mapping"
    302312msgstr "Cartographie des catégories"
    303313
    304314#. translators: %s: Clear cache URL
    305 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:91
     315#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:97
    306316msgid ""
    307317"<strong>REQUIRED FOR FRAUD MONITORING:</strong> You must map each "
     
    320330"actualiser les catégories à partir de l'API"
    321331
    322 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:136
     332#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:142
    323333msgid "WooCommerce Category"
    324334msgstr "Catégories WooCommerce"
    325335
    326 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:139
     336#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:145
    327337msgid "ANKA Pay Category"
    328338msgstr "Catégories ANKA Pay"
    329339
    330 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:157
     340#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:163
    331341msgid "-- Select ANKA Category --"
    332342msgstr "-- Sélectionnez la catégorie ANKA --"
    333343
    334 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:176
     344#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:182
    335345msgid ""
    336346"No WooCommerce product categories found. Create product categories first."
     
    339349"catégories de produits."
    340350
    341 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:262
     351#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:268
    342352msgid "Payment error: Unable to create payment link with ANKA Pay."
    343353msgstr ""
     
    345355
    346356#. translators: %s: error message
    347 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:270
    348 #: includes/woocommerce/class-anka-commerce-woocommerce.php:120
     357#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:276
     358#: includes/woocommerce/class-anka-commerce-woocommerce.php:125
    349359msgid "ANKA Pay API Error: %s"
    350360msgstr "Erreur API ANKA Pay : %s"
    351361
    352 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:320
     362#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:326
    353363msgid "Categories cache cleared and refreshed from API!"
    354364msgstr "Cache des catégories effacé et actualisé à partir de l'API !"
    355365
    356366#. translators: 1: WooCommerce settings URL
    357 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:332
     367#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:338
    358368msgid ""
    359369"ANKA Pay is enabled, but the checkout page is not forced to use HTTPS. "
     
    365375"forçant l’utilisation de SSL sur les pages de paiement dans le %s."
    366376
    367 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:333
    368 #: includes/woocommerce/class-anka-commerce-woocommerce.php:261
     377#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:339
     378#: includes/woocommerce/class-anka-commerce-woocommerce.php:266
    369379msgid "WooCommerce settings"
    370380msgstr "Réglages WooCommerce"
    371381
    372 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:359
    373 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:377
     382#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:365
     383#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:383
    374384msgid "ANKA Pay: ACTION REQUIRED"
    375385msgstr "ANKA Pay : ACTION REQUISE"
    376386
    377387#. translators: 1: WooCommerce categories URL, 2: ANKA Pay settings URL
    378 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:361
     388#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:367
    379389msgid ""
    380390"Payment processing is blocked because no product categories exist. You must "
     
    386396"dans %2$s afin de respecter les normes de prévention de la fraude."
    387397
    388 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:362
     398#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:368
    389399msgid "create product categories"
    390400msgstr "créer des catégories de produits"
    391401
    392 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:363
    393 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:381
     402#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:369
     403#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:387
    394404msgid "ANKA Pay settings"
    395405msgstr "Réglages ANKA Pay"
    396406
    397407#. translators: 1: list of unmapped categories, 2: ANKA Pay settings URL
    398 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:379
     408#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:385
    399409msgid ""
    400410"Payment processing is blocked for products in these unmapped categories: "
     
    407417"de la fraude."
    408418
    409 #: includes/woocommerce/class-anka-commerce-woocommerce.php:95
     419#: includes/woocommerce/class-anka-commerce-woocommerce.php:100
    410420msgid "Your cart is empty."
    411421msgstr "Votre panier est vide."
    412422
    413 #: includes/woocommerce/class-anka-commerce-woocommerce.php:102
     423#: includes/woocommerce/class-anka-commerce-woocommerce.php:107
    414424msgid "Unable to create order."
    415425msgstr "Impossible de créer une commande."
    416426
    417 #: includes/woocommerce/class-anka-commerce-woocommerce.php:114
     427#: includes/woocommerce/class-anka-commerce-woocommerce.php:119
    418428msgid "ANKA Pay payment link creation failed"
    419429msgstr "Échec de la création du lien de paiement ANKA Pay"
    420430
    421 #: includes/woocommerce/class-anka-commerce-woocommerce.php:163
     431#: includes/woocommerce/class-anka-commerce-woocommerce.php:168
    422432msgid "Uncategorized"
    423433msgstr "Sans catégorie"
    424434
    425435#. translators: %s: product categories
    426 #: includes/woocommerce/class-anka-commerce-woocommerce.php:168
     436#: includes/woocommerce/class-anka-commerce-woocommerce.php:173
    427437msgid ""
    428438"Payment link creation blocked: No ANKA Pay category mapping configured for "
     
    436446
    437447#. translators: %s: link to contact
    438 #: includes/woocommerce/class-anka-commerce-woocommerce.php:178
     448#: includes/woocommerce/class-anka-commerce-woocommerce.php:183
    439449msgid ""
    440450"Unable to process payment: Products in your cart must have categories "
     
    444454"Impossible de traiter le paiement : les produits dans votre panier doivent "
    445455"être classés dans des catégories attribuées et mappées par l'administrateur "
    446 "du magasin afin de prévenir toute fraude. Veuillez contacter le magasin "
    447 "pour obtenir de l'aide. %s"
    448 
    449 #: includes/woocommerce/class-anka-commerce-woocommerce.php:179
     456"du magasin afin de prévenir toute fraude. Veuillez contacter le magasin pour "
     457"obtenir de l'aide. %s"
     458
     459#: includes/woocommerce/class-anka-commerce-woocommerce.php:184
    450460msgid "Configure now"
    451461msgstr "Configurer maintenant"
    452462
    453463#. translators: %s: category value
    454 #: includes/woocommerce/class-anka-commerce-woocommerce.php:189
     464#: includes/woocommerce/class-anka-commerce-woocommerce.php:194
    455465msgid ""
    456466"Payment link creation blocked: Invalid ANKA Pay category \"%s\". Please "
    457467"update category mapping in ANKA Pay settings with a valid category."
    458468msgstr ""
    459 "Création du lien de paiement bloquée : catégorie ANKA Pay « %s » non "
    460 "valide. Veuillez mettre à jour le mappage des catégories dans les "
    461 "paramètres ANKA Pay avec une catégorie valide."
    462 
    463 #: includes/woocommerce/class-anka-commerce-woocommerce.php:196
     469"Création du lien de paiement bloquée : catégorie ANKA Pay « %s » non valide. "
     470"Veuillez mettre à jour le mappage des catégories dans les paramètres ANKA "
     471"Pay avec une catégorie valide."
     472
     473#: includes/woocommerce/class-anka-commerce-woocommerce.php:201
    464474msgid ""
    465475"Invalid product category configuration. Please contact the store "
     
    489499msgid "Select Payment Button"
    490500msgstr "Sélectionner un bouton de paiement"
     501
     502#~ msgid "Error %1$s: %2$s (%3$s)"
     503#~ msgstr "Erreur %1$s: %2$s (%3$s)"
  • anka-commerce/trunk/languages/anka-commerce.pot

    r3434624 r3497619  
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-01-07T09:24:29+00:00\n"
     12"POT-Creation-Date: 2026-04-02T14:03:22+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.10.0\n"
     
    2323#: anka-commerce.php
    2424msgid "Accept payments through ANKA Pay using Credit Cards, Mobile Money, Nigerian Bank Transfer, and PayPal on your WooCommerce store or Payment buttons."
    25 msgstr ""
    26 
    27 #. translators: %1$s is the error status, %2$s is the error detail, %3$s is the error source pointer
    28 #: includes/api/class-anka-pay-api.php:215
    29 msgid "Error %1$s: %2$s (%3$s)"
    3025msgstr ""
    3126
     
    228223
    229224#: includes/webhook/class-anka-pay-webhook-handler.php:143
    230 #: includes/woocommerce/class-anka-commerce-woocommerce.php:204
     225#: includes/woocommerce/class-anka-commerce-woocommerce.php:209
    231226msgid "Awaiting ANKA Pay payment"
    232227msgstr ""
     
    238233#: includes/webhook/class-anka-pay-webhook-handler.php:153
    239234msgid "ANKA Pay payment failed"
     235msgstr ""
     236
     237#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay-blocks-support.php:90
     238#: includes/woocommerce/class-anka-commerce-woocommerce.php:648
     239msgid "ANKA Pay processing fee (4%)"
    240240msgstr ""
    241241
     
    268268
    269269#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:87
     270msgid "Charge Processing Fee To Buyer"
     271msgstr ""
     272
     273#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:88
     274msgid "Add a 4% ANKA Pay processing fee to the buyer total when ANKA Pay is selected."
     275msgstr ""
     276
     277#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:93
    270278msgid "Category Mapping"
    271279msgstr ""
    272280
    273281#. translators: %s: Clear cache URL
    274 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:91
     282#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:97
    275283msgid "<strong>REQUIRED FOR FRAUD MONITORING:</strong> You must map each WooCommerce product category to a specific ANKA Pay category. Payment link creation will be blocked for products without a valid category mapping. Unmapped categories will cause checkout to fail.<br><br><a href=\"%s\" class=\"button button-secondary\">Clear Categories Cache</a> - Click to refresh categories from API"
    276284msgstr ""
    277285
    278 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:136
     286#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:142
    279287msgid "WooCommerce Category"
    280288msgstr ""
    281289
    282 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:139
     290#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:145
    283291msgid "ANKA Pay Category"
    284292msgstr ""
    285293
    286 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:157
     294#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:163
    287295msgid "-- Select ANKA Category --"
    288296msgstr ""
    289297
    290 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:176
     298#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:182
    291299msgid "No WooCommerce product categories found. Create product categories first."
    292300msgstr ""
    293301
    294 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:262
     302#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:268
    295303msgid "Payment error: Unable to create payment link with ANKA Pay."
    296304msgstr ""
    297305
    298306#. translators: %s: error message
    299 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:270
    300 #: includes/woocommerce/class-anka-commerce-woocommerce.php:120
     307#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:276
     308#: includes/woocommerce/class-anka-commerce-woocommerce.php:125
    301309msgid "ANKA Pay API Error: %s"
    302310msgstr ""
    303311
    304 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:320
     312#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:326
    305313msgid "Categories cache cleared and refreshed from API!"
    306314msgstr ""
    307315
    308316#. translators: 1: WooCommerce settings URL
    309 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:332
     317#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:338
    310318msgid "ANKA Pay is enabled, but the checkout page is not forced to use HTTPS. Please ensure your checkout page is secure by forcing SSL on the checkout pages in the %s."
    311319msgstr ""
    312320
    313 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:333
    314 #: includes/woocommerce/class-anka-commerce-woocommerce.php:261
     321#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:339
     322#: includes/woocommerce/class-anka-commerce-woocommerce.php:266
    315323msgid "WooCommerce settings"
    316324msgstr ""
    317325
    318 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:359
    319 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:377
     326#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:365
     327#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:383
    320328msgid "ANKA Pay: ACTION REQUIRED"
    321329msgstr ""
    322330
    323331#. translators: 1: WooCommerce categories URL, 2: ANKA Pay settings URL
    324 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:361
     332#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:367
    325333msgid "Payment processing is blocked because no product categories exist. You must %1$s, assign them to your products, and then map them in the %2$s for fraud prevention compliance."
    326334msgstr ""
    327335
    328 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:362
     336#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:368
    329337msgid "create product categories"
    330338msgstr ""
    331339
    332 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:363
    333 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:381
     340#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:369
     341#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:387
    334342msgid "ANKA Pay settings"
    335343msgstr ""
    336344
    337345#. translators: 1: list of unmapped categories, 2: ANKA Pay settings URL
    338 #: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:379
     346#: includes/woocommerce/class-anka-commerce-woocommerce-gateway-anka-pay.php:385
    339347msgid "Payment processing is blocked for products in these unmapped categories: <strong>%1$s</strong>. You must map ALL categories in the %2$s for fraud prevention compliance."
    340348msgstr ""
    341349
    342 #: includes/woocommerce/class-anka-commerce-woocommerce.php:95
     350#: includes/woocommerce/class-anka-commerce-woocommerce.php:100
    343351msgid "Your cart is empty."
    344352msgstr ""
    345353
    346 #: includes/woocommerce/class-anka-commerce-woocommerce.php:102
     354#: includes/woocommerce/class-anka-commerce-woocommerce.php:107
    347355msgid "Unable to create order."
    348356msgstr ""
    349357
    350 #: includes/woocommerce/class-anka-commerce-woocommerce.php:114
     358#: includes/woocommerce/class-anka-commerce-woocommerce.php:119
    351359msgid "ANKA Pay payment link creation failed"
    352360msgstr ""
    353361
    354 #: includes/woocommerce/class-anka-commerce-woocommerce.php:163
     362#: includes/woocommerce/class-anka-commerce-woocommerce.php:168
    355363msgid "Uncategorized"
    356364msgstr ""
    357365
    358366#. translators: %s: product categories
    359 #: includes/woocommerce/class-anka-commerce-woocommerce.php:168
     367#: includes/woocommerce/class-anka-commerce-woocommerce.php:173
    360368msgid "Payment link creation blocked: No ANKA Pay category mapping configured for product categories: %s. This is required for fraud monitoring. Please configure category mapping in ANKA Pay settings."
    361369msgstr ""
    362370
    363371#. translators: %s: link to contact
    364 #: includes/woocommerce/class-anka-commerce-woocommerce.php:178
     372#: includes/woocommerce/class-anka-commerce-woocommerce.php:183
    365373msgid "Unable to process payment: Products in your cart must have categories assigned and mapped by the store administrator for fraud prevention. Please contact the store for assistance. %s"
    366374msgstr ""
    367375
    368 #: includes/woocommerce/class-anka-commerce-woocommerce.php:179
     376#: includes/woocommerce/class-anka-commerce-woocommerce.php:184
    369377msgid "Configure now"
    370378msgstr ""
    371379
    372380#. translators: %s: category value
    373 #: includes/woocommerce/class-anka-commerce-woocommerce.php:189
     381#: includes/woocommerce/class-anka-commerce-woocommerce.php:194
    374382msgid "Payment link creation blocked: Invalid ANKA Pay category \"%s\". Please update category mapping in ANKA Pay settings with a valid category."
    375383msgstr ""
    376384
    377 #: includes/woocommerce/class-anka-commerce-woocommerce.php:196
     385#: includes/woocommerce/class-anka-commerce-woocommerce.php:201
    378386msgid "Invalid product category configuration. Please contact the store administrator to update category mappings."
    379387msgstr ""
  • anka-commerce/trunk/package-lock.json

    r3336161 r3497619  
    11{
    22  "name": "anka-commerce",
    3   "version": "1.1.4",
     3  "version": "1.2.1",
    44  "lockfileVersion": 3,
    55  "requires": true,
     
    77    "": {
    88      "name": "anka-commerce",
    9       "version": "1.1.4",
     9      "version": "1.2.1",
    1010      "license": "ISC",
    1111      "devDependencies": {
  • anka-commerce/trunk/package.json

    r3434624 r3497619  
    22  "name": "anka-commerce",
    33  "title": "ANKA Commerce",
    4   "version": "1.2.0",
     4  "version": "1.2.1",
    55  "license": "ISC",
    66  "keywords": [],
  • anka-commerce/trunk/readme.txt

    r3465368 r3497619  
    66Tested up to: 6.7
    77Requires PHP: 7.2
    8 Stable tag: 1.2.0
     8Stable tag: 1.2.1
    99License: GPLv3 or later
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    119119
    120120== Changelog ==
     121= 1.2.1 =
     122* Added an optional setting to charge buyers a fixed 4% ANKA Pay processing fee
     123* Applied processing fee support for ANKA Pay checkout flow, including direct checkout order creation
     124* Added fee metadata support for WooCommerce Blocks integration
     125* Updated translation catalogs and French locale strings for new processing fee labels
     126
    121127= 1.2.0 =
    122128* **IMPORTANT**: This update is required for compatibility with the latest ANKA Pay API. Previous versions will stop working when the API is updated.
     
    150156
    151157== Upgrade Notice ==
     158= 1.2.1 =
     159This update introduces optional ANKA Pay processing fee support and translation updates. Please test checkout totals and gateway settings after upgrading.
     160
    152161= 1.2.0 =
    153162**CRITICAL UPDATE REQUIRED**: You must upgrade to version 1.2.0 before the ANKA Pay API update. Previous versions will stop working after the API deployment. This version adds required category and image URL support for API compatibility.
Note: See TracChangeset for help on using the changeset viewer.