Plugin Directory

Changeset 3491957


Ignore:
Timestamp:
03/26/2026 04:07:44 PM (5 days ago)
Author:
monei
Message:

Update to version 7.0.3 from GitHub

Location:
monei
Files:
18 edited
1 copied

Legend:

Unmodified
Added
Removed
  • monei/tags/7.0.3/README.md

    r3399638 r3491957  
    11# MONEI Payments for WooCommerce
    2 
    32Tags: woocommerce, credit card, payment gateway, payments, ecommerce
    43Contributors: monei, furi3r
    54Requires at least: 5.0
    65Tested up to: 6.8
    7 Stable tag: 7.0.1
     6Stable tag: 7.0.2
    87Requires PHP: 8.0
    98License: GPLv2 or later
     
    1615## Description
    1716
    18 = ACCEPT ONLINE PAYMENTS WITH MONEI =
     17### ACCEPT ONLINE PAYMENTS WITH MONEI
    1918MONEI is an e-commerce payment gateway for WooCommerce (and other e-commerce platforms).
    2019
     20
    2121Its payment gateway is the choice of many Spain and Andorra based e-commerce businesses. Use MONEI's technology to accept and manage all major and alternative payment methods in a single platform.
    2222
     23
    2324MONEI is dedicated to helping you simplify your digital payments so you can focus on growing your online business.
    2425
    25 = PAYMENT METHODS =
     26### PAYMENT METHODS
    2627Use MONEI's payment gateway to accept debit and credit card payments from customers worldwide in 230+ currencies.
    2728
     29
    2830Let shoppers pay from the convenience of their smartphone with digital wallets like Apple Pay, Google Pay, and PayPal. And accept local payment methods such as Bizum (Spain) and SEPA Direct Debit (EU).
    2931
     32
    3033Offering customers [many payment methods](https://monei.com/es/online-payment-methods/) leads to an increase in sales and customer satisfaction. 🚀
    3134
    32 = WHY TO USE MONEI'S PAYMENT PLUGIN FOR WOOCOMMERCE =
     35### WHY TO USE MONEI'S PAYMENT PLUGIN FOR WOOCOMMERCE
    3336
    3437MONEI's serverless architecture allows you to scale and process a high volume of transactions. Its dynamic pricing model means as you sell more your transaction fees decrease. Once you're an approved merchant, enjoy 1-day payment settlements.
    3538
     39
    3640Payment security is crucial. MONEI is PCI DSS compliant, 3D Secure, and uses payment tokenization to make sure sensitive payment information is never compromised.
    3741
     42
    3843Connect your custom domain to MONEI and customize the appearance of your checkout page to build trust and brand awareness.
    3944
     45
    4046With MONEI's payment gateway for e-commerce, get real-time sales analytics via your customer dashboard.
    4147
     48
    4249Please go to the 👉 [signup page](https://dashboard.monei.com/?action=signUp) 👈 to create a new MONEI account. Contact support@monei.com if you have any questions or feedback about this plugin.
    4350
    44 = PAYMENT GATEWAY FEATURES =
    45 
    46  Merchant support for all available MONEI payment methods
    47  Accept and manage all major and alternative payment methods in a single platform
    48  Quickly and easily integrate with your WooCommerce website using MONEI's API
    49  Connect your custom domain to MONEI and customize the appearance of your checkout page
    50  Scale and process a high volume of transactions
    51  Dynamic pricing model — as you sell more your transaction fees decrease
    52  Verified merchants enjoy 1-day payment settlements
    53  PCI-DSS compliant
    54  Self-hosted flexible input fields
    55  Supports 3D Secure and 3D Secure exemptions
    56  Tokenization for deep integration of recurring billing + usage-based charges
    57  Subscriptions support for various payment methods via WooCommerce Subscriptions
    58  13 languages available with auto-detection based on browser language
    59  Capture pre-authorized payments and process refunds within your WooCommerce admin Dashboard
    60  Notifications via email or SMS for customer information and monitoring your store
    61  Get real-time sales analytics via your customer dashboard
    62 
    63 = GETTING STARTED WITH MONEI =
    64 
     51
     52### PAYMENT GATEWAY FEATURES
     53* Merchant support for all available MONEI payment methods
     54* Accept and manage all major and alternative payment methods in a single platform
     55* Quickly and easily integrate with your WooCommerce website using MONEI's API
     56* Connect your custom domain to MONEI and customize the appearance of your checkout page
     57* Scale and process a high volume of transactions
     58* Dynamic pricing model — as you sell more your transaction fees decrease
     59* Verified merchants enjoy 1-day payment settlements
     60* PCI-DSS compliant
     61* Self-hosted flexible input fields
     62* Supports 3D Secure and 3D Secure exemptions
     63* Tokenization for deep integration of recurring billing + usage-based charges
     64* Subscriptions support for various payment methods via WooCommerce Subscriptions
     65* 13 languages available with auto-detection based on browser language
     66* Capture pre-authorized payments and process refunds within your WooCommerce admin Dashboard
     67* Notifications via email or SMS for customer information and monitoring your store
     68* Get real-time sales analytics via your customer dashboard
     69
     70
     71### GETTING STARTED WITH MONEI
    65721. How do I open my MONEI account so I can plug in with WooCommerce?
    66    Learn how to [get started with MONEI here ››](https://support.monei.com/hc/en-us/articles/360017801677-Get-started-with-MONEI)
     73Learn how to [get started with MONEI here ››](https://support.monei.com/hc/en-us/articles/360017801677-Get-started-with-MONEI)
    67742. What countries does MONEI support?
    68    Currently, MONEI is available in Spain and Andorra, but our global expansion is happening fast. [Join our newsletter here](https://client.moonmail.io/ac8e391c-8cfb-46e3-aed9-e7a84d0fd830/forms/6bafcdbf-442a-4e3b-874f-7e2ed30ee001) to get notified once we support your country!
     75Currently, MONEI is available in Spain and Andorra, but our global expansion is happening fast. [Join our newsletter here](https://client.moonmail.io/ac8e391c-8cfb-46e3-aed9-e7a84d0fd830/forms/6bafcdbf-442a-4e3b-874f-7e2ed30ee001) to get notified once we support your country!
    69763. I have different questions about this plugin.
    70    Please contact support@monei.com with your MONEI ID. Describe your problem in detail and include screenshots when necessary.
     77Please contact support@monei.com with your MONEI ID. Describe your problem in detail and include screenshots when necessary.
    7178
    7279## Installation
    73 
    74 -   Go to wp-admin > Plugins
    75 -   Click Add new
    76 -   Search for MONEI
    77 -   Press Install
    78 -   Press Activate now
    79 -   Go to WooCommerce > Settings > Payments > MONEI
    80 -   Add your API Key.
    81 
    82 = If you don't have API Key =
    83 
    84 -   Go to [MONEI Dashboard > Settings > API Access](https://dashboard.monei.com/settings/api)
    85 -   Click on "Create API Key"
    86 
    87 = Use of 3rd Party Services =
     80* Go to wp-admin > Plugins
     81* Click Add new
     82* Search for MONEI
     83* Press Install
     84* Press Activate now
     85* Go to WooCommerce > Settings > Payments > MONEI
     86* Add your API Key.
     87
     88### If you don't have API Key
     89
     90* Go to [MONEI Dashboard > Settings > API Access](https://dashboard.monei.com/settings/api)
     91* Click on "Create API Key"
     92
     93### Use of 3rd Party Services
    8894This plugin is using [MONEI API](https://docs.monei.com/api/) to process payments as well as
    8995[MONEI UI Components](https://docs.monei.com/docs/monei-js/overview/) to securely collect sensitive payment information during checkout.
     
    98104## Changelog
    99105
     106### v7.0.2 - 2025-11-20
     107-   fix: prevent wp_sanitize_redirect from stripping domain in payment URLs ([a982699](https://github.com/MONEI/MONEI-WooCommerce/commit/a982699))
     108
    100109### v7.0.1 - 2025-10-14
    101 
    102110-   fix: upgrade to PHP 8.0+ to resolve PHP-DI compatibility issue ([95f9ffd](https://github.com/MONEI/MONEI-WooCommerce/commit/95f9ffd))
    103111-   PHP 7.4 users cannot upgrade. PHP 8.0 is now the
    104112    minimum required version. PHP 7.4 reached end-of-life in November
    105 
    1061132022. WordPress 6.8 officially supports PHP 8.0-8.3.
    107114
    108115### v7.0.0 - 2025-10-10
    109 
    110116-   chore: add PHPCS rule to enforce namespace use statements ([248d8bb](https://github.com/MONEI/MONEI-WooCommerce/commit/248d8bb))
    111117-   chore: add PHPCS rule to enforce use statements over fully qualified names ([eb53879](https://github.com/MONEI/MONEI-WooCommerce/commit/eb53879))
    112 -   chore: release v6.4.0 ([d3f0067](https://github.com/MONEI/MONEI-WooCommerce/commit/d3f0067))
    113118-   chore: remove pre-push hook to prevent direct pushes to master/main branch ([abad3bf](https://github.com/MONEI/MONEI-WooCommerce/commit/abad3bf))
    114119-   chore: setup comprehensive linting workflow with lint-staged ([db39b8a](https://github.com/MONEI/MONEI-WooCommerce/commit/db39b8a))
     
    203208-   style: prevent payment method title text from wrapping ([9267c10](https://github.com/MONEI/MONEI-WooCommerce/commit/9267c10))
    204209-   Removed lock and \_monei_payment_id_processed flag
    205     Analysis revealed WooCommerce creates orders BEFORE payment (unlike PrestaShop),
    206     so duplicate order creation is impossible. The lock and processed flag were:
    207 
     210Analysis revealed WooCommerce creates orders BEFORE payment (unlike PrestaShop),
     211so duplicate order creation is impossible. The lock and processed flag were:
    2082121. Broken - wp_cache not persistent without external cache
    2092132. Harmful - flag blocked AUTHORIZED→SUCCEEDED and SUCCEEDED→REFUNDED transitions
    2102143. Unnecessary - WooCommerce's payment_complete() is already idempotent
    211    Removed components:
    212 
     215Removed components:
    213216-   WC_Monei_Lock_Helper class
    214217-   Lock acquisition/release in IPN and redirect handlers
    215218-   \_monei_payment_id_processed flag checks and setting
    216219-   wp_cache stubs from PHPStan bootstrap
    217     The order status check provides sufficient protection against duplicate processing.
    218     Any duplicate order notes are cosmetic and acceptable.
     220The order status check provides sufficient protection against duplicate processing.
     221Any duplicate order notes are cosmetic and acceptable.
    219222
    220223### v6.4.0 - 2025-10-01
    221 
    222224-   feat: add custom readme generator to show latest 10 releases ([371e09c](https://github.com/MONEI/MONEI-WooCommerce/commit/371e09c))
    223225-   feat: configure GitHub release notes with conventional changelog ([226db8f](https://github.com/MONEI/MONEI-WooCommerce/commit/226db8f))
    224 -   chore: release v6.3.10 ([86d825a](https://github.com/MONEI/MONEI-WooCommerce/commit/86d825a))
    225 -   chore: release v6.3.11 ([184814d](https://github.com/MONEI/MONEI-WooCommerce/commit/184814d))
    226 -   chore: release v6.3.12 ([e119cc1](https://github.com/MONEI/MONEI-WooCommerce/commit/e119cc1))
    227226-   chore: remove unused generate-wp-readme package ([4e06b1b](https://github.com/MONEI/MONEI-WooCommerce/commit/4e06b1b))
    228227-   chore: update CHANGELOG.md with corrected tag hash ([f9b0dfa](https://github.com/MONEI/MONEI-WooCommerce/commit/f9b0dfa))
     
    234233
    235234### v6.3.12 - 2025-10-01
    236 
    237235-   fix: add changelog length limit to show all versions ([c135b7c](https://github.com/MONEI/MONEI-WooCommerce/commit/c135b7c))
    238236-   fix: correct changelog template to show actual 6.3.8 release ([0efe693](https://github.com/MONEI/MONEI-WooCommerce/commit/0efe693))
    239237-   fix: limit changelog to last 10 releases ([1a3f468](https://github.com/MONEI/MONEI-WooCommerce/commit/1a3f468))
    240238-   fix: normalize changelog chronological order ([a3b1d8a](https://github.com/MONEI/MONEI-WooCommerce/commit/a3b1d8a))
    241 -   chore: release v6.3.10 ([86d825a](https://github.com/MONEI/MONEI-WooCommerce/commit/86d825a))
    242 -   chore: release v6.3.11 ([184814d](https://github.com/MONEI/MONEI-WooCommerce/commit/184814d))
    243 -   chore: release v6.3.12 ([af4cda6](https://github.com/MONEI/MONEI-WooCommerce/commit/af4cda6))
    244239-   chore: update CHANGELOG.md with corrected tag hash ([f9b0dfa](https://github.com/MONEI/MONEI-WooCommerce/commit/f9b0dfa))
    245240
    246241### v6.3.9 - 2025-10-01
    247 
    248242-   Fix amount when checkout data is updated ([2013a03](https://github.com/MONEI/MONEI-WooCommerce/commit/2013a03))
    249243-   Fix card input style ([6c12a5a](https://github.com/MONEI/MONEI-WooCommerce/commit/6c12a5a))
     
    254248-   chore: auto-remove README.md after generation ([b299478](https://github.com/MONEI/MONEI-WooCommerce/commit/b299478))
    255249-   chore: modernize build and release pipeline ([21384f0](https://github.com/MONEI/MONEI-WooCommerce/commit/21384f0))
    256 -   chore: release v6.3.9 ([79b2f41](https://github.com/MONEI/MONEI-WooCommerce/commit/79b2f41))
    257250-   chore: remove redundant changelog.txt ([1703044](https://github.com/MONEI/MONEI-WooCommerce/commit/1703044))
    258251-   chore: remove unnecessary README.md auto-deletion ([86c727e](https://github.com/MONEI/MONEI-WooCommerce/commit/86c727e))
     
    267260
    268261### v6.3.8 - 2025-09-10
    269 
    270262-   Add 3ds credit card automated tests ([0c7faf9](https://github.com/MONEI/MONEI-WooCommerce/commit/0c7faf9))
    271263-   Add api key and method visibility tests ([cf6615a](https://github.com/MONEI/MONEI-WooCommerce/commit/cf6615a))
     
    319311-   Use rounding ([cb79abd](https://github.com/MONEI/MONEI-WooCommerce/commit/cb79abd))
    320312-   Use Woo api client ([9c5362d](https://github.com/MONEI/MONEI-WooCommerce/commit/9c5362d))
    321 -   chore: release v6.3.8 ([9bed803](https://github.com/MONEI/MONEI-WooCommerce/commit/9bed803))
    322313
    323314### v6.3.5 - 2025-06-04
    324 
    325315-   Add 30 seconds caching ([73a4d1a](https://github.com/MONEI/MONEI-WooCommerce/commit/73a4d1a))
    326316-   Change payment methods check to sdk ([5e045eb](https://github.com/MONEI/MONEI-WooCommerce/commit/5e045eb))
     
    330320
    331321### v6.3.4 - 2025-05-30
    332 
    333322-   Copy old keys only when no new keys are there ([14b066f](https://github.com/MONEI/MONEI-WooCommerce/commit/14b066f))
    334323-   Declare $handler to avoid dynamic-property deprecation ([0a4aa60](https://github.com/MONEI/MONEI-WooCommerce/commit/0a4aa60))
     
    357346
    358347### v6.3.1 - 2025-04-24
    359 
    360348-   Bail on renewal if already processing ([718bc42](https://github.com/MONEI/MONEI-WooCommerce/commit/718bc42))
    361349-   Fix change payment method in my account ([48e2f07](https://github.com/MONEI/MONEI-WooCommerce/commit/48e2f07))
     
    364352-   Update to release version to 6.3.0 ([790b5f6](https://github.com/MONEI/MONEI-WooCommerce/commit/790b5f6))
    365353-   Use 2 API keys ([97fdd93](https://github.com/MONEI/MONEI-WooCommerce/commit/97fdd93))
    366 
    367 ### v6.2.1 - 2025-04-07
    368 
    369 -   Modify composer dependency installation ([a8082b1](https://github.com/MONEI/MONEI-WooCommerce/commit/a8082b1))
    370 -   Update plugin version ([caf01fb](https://github.com/MONEI/MONEI-WooCommerce/commit/caf01fb))
    371 -   Update release action to use composer no-dev ([0063b26](https://github.com/MONEI/MONEI-WooCommerce/commit/0063b26))
    372 -   Update SDK version to V2 ([5cc7cb8](https://github.com/MONEI/MONEI-WooCommerce/commit/5cc7cb8))
    373 -   Use ramsey/composer-install ([8927c67](https://github.com/MONEI/MONEI-WooCommerce/commit/8927c67))
  • monei/tags/7.0.3/class-woocommerce-gateway-monei.php

    r3399638 r3491957  
    66 * @category Core
    77 * @package  Woocommerce_Gateway_Monei
    8  * @version  7.0.2
     8 * @version  7.0.3
    99 */
    1010
     
    2626         * @var string
    2727         */
    28         public $version = '7.0.2';
     28        public $version = '7.0.3';
    2929
    3030        /**
     
    345345         * Load plugin text domain for translations.
    346346         *
    347          * @since 7.0.2
     347         * @since 7.0.3
    348348         */
    349349        private function load_plugin_textdomain() {
  • monei/tags/7.0.3/public/js/monei-block-checkout-cc.min.asset.php

    r3376325 r3491957  
    1 <?php return array('dependencies' => array('react-jsx-runtime'), 'version' => '32216693dbdd415d75b3');
     1<?php return array('dependencies' => array('react-jsx-runtime'), 'version' => 'dfa96c51e0e48323561d');
  • monei/tags/7.0.3/public/js/monei-block-checkout-cc.min.js

    r3376325 r3491957  
    1 (()=>{"use strict";const{useState:e,useEffect:r,useRef:n,useCallback:t,useMemo:a}=wp.element,o=window.ReactJSXRuntime,{useEffect:s,useState:c,useRef:i,useCallback:l,useMemo:d,createPortal:u}=wp.element,m=m=>{const{responseTypes:p,noticeContexts:g}=m.emitResponse,{onPaymentSetup:y,onCheckoutValidation:h,onCheckoutSuccess:f}=m.eventRegistration,k=d(()=>m.moneiData||wc.wcSettings.getSetting("monei_data"),[m.moneiData]),S="yes"===k.redirect,E=m.shouldSavePayment,v=i(null),[I,w]=c(!1),[x,C]=c(!1),j=(()=>{const[r,n]=e({}),o=t((e,r)=>{n(n=>({...n,[e]:r}))},[]),s=t(e=>{n(r=>{const n={...r};return delete n[e],n})},[]),c=t(()=>{n({})},[]),i=t(()=>Object.keys(r).length>0,[r]),l=t(e=>r[e]||"",[r]);return a(()=>({errors:r,setError:o,clearError:s,clearAllErrors:c,hasErrors:i,getError:l}),[r,o,s,c,i,l])})(),N=d(()=>({errorMessage:k.nameErrorString,pattern:/^[A-Za-zÀ-ú\s-]{5,50}$/}),[k.nameErrorString]),M=d(()=>({accountId:k.accountId,sessionId:k.sessionId,language:k.language,style:k.cardInputStyle}),[k.accountId,k.sessionId,k.language,k.cardInputStyle]),R=((r={})=>{const n=a(()=>r.pattern||/^[A-Za-zÀ-ú\s-]{5,50}$/,[r.pattern]),[o,s]=e(""),[c,i]=e(""),[l,d]=e(!1),u=t((e=o)=>{if(!e||!n.test(e)){const e=r.errorMessage||"Invalid cardholder name";return i(e),!1}return i(""),!0},[o,n,r.errorMessage]),m=t(e=>{const r=e.target.value;s(r),l&&u(r)},[l,u]),p=t(()=>{d(!0),u()},[u]),g=t(()=>{s(""),i(""),d(!1)},[]);return a(()=>({value:o,error:c,touched:l,isValid:!c&&l,handleChange:m,handleBlur:p,validate:u,reset:g}),[o,c,l,m,p,u,g])})(N),b=(o=>{const[s,c]=e(!1),[i,l]=e(""),[d,u]=e(!1),[m,p]=e(null),[g,y]=e(!1),h=n(null),f=n(null),k=n(!1),S=t(async()=>{if(!h.current||!monei?.createToken)return l("Card input not initialized"),null;y(!0),l("");try{const e=await monei.createToken(h.current);if(e.error){const r=e.error.message||("string"==typeof e.error?e.error:"Token creation failed");return l(r),null}return p(e.token),e.token}catch(e){return l(e.message||"Token creation failed"),null}finally{y(!1)}},[]),E=t(()=>{if("undefined"!=typeof monei&&monei.CardInput)if(f.current)try{const e=monei.CardInput({accountId:o.accountId,sessionId:o.sessionId,language:o.language,style:o.style||{},onFocus(){f.current&&f.current.classList.add("is-focused")},onBlur(){f.current&&f.current.classList.remove("is-focused")},onChange(e){if(e.isTouched&&e.error){const r=e.error.message||("string"==typeof e.error?e.error:"Validation error");l(r),u(!1),f.current&&f.current.classList.add("is-invalid")}else l(""),e.isTouched&&u(!0),f.current&&f.current.classList.remove("is-invalid")},onEnter(){h.current&&S().catch(e=>{console.error("Token creation failed on Enter:",e)})}});e.render(f.current),h.current=e,c(!0),l("")}catch(e){l(e.message||"Failed to initialize card input"),c(!1)}else l("Card input container not found");else l("MONEI SDK is not available")},[o,S]),v=t(()=>{h.current&&h.current.clear&&h.current.clear(),p(null),l(""),u(!1)},[]);return r(()=>{if(!k.current){const e=setTimeout(()=>{E(),k.current=!0},500);return()=>clearTimeout(e)}},[E]),r(()=>()=>{if(h.current&&h.current.destroy)try{h.current.destroy()}catch(e){}},[]),a(()=>({isReady:s,error:i,isValid:d,token:m,isCreatingToken:g,containerRef:f,createToken:S,reset:v}),[s,i,d,m,g,f,S,v])})(M),_=i(null),P=l(async()=>(_.current||(_.current=b.createToken().then(e=>(e&&(v.current=e),e)).finally(()=>{_.current=null})),_.current),[b]);return l(()=>{let e=!0;return R.validate()||(e=!1),b.isValid?j.clearError("card"):(j.setError("card",k.cardErrorString),e=!1),e},[R,b,j,k.cardErrorString]),s(()=>h(async()=>R.validate()?b.error?{errorMessage:b.error}:b.isValid?!!(v.current||b.token||await P())||{errorMessage:k.tokenErrorString}:{errorMessage:k.cardErrorString}:{errorMessage:R.error}),[h,R,b,P,k.cardErrorString,k.tokenErrorString]),s(()=>y(async()=>{w(!0);try{const e=v.current||b.token||await P();if(!e)return{type:p.ERROR,message:k.tokenErrorString};const r={monei_payment_token:e,monei_cardholder_name:R.value,monei_is_block_checkout:"yes"};return E&&(r["wc-monei-new-payment-method"]=!0),{type:p.SUCCESS,meta:{paymentMethodData:r}}}finally{w(!1)}}),[y,R,b,P,p,k.tokenErrorString,E]),s(()=>f(async({processingResponse:e})=>{const{paymentDetails:r}=e;if(!r?.paymentId)return console.error("No paymentId found in paymentDetails"),{type:p.SUCCESS};C(!0);try{const e=await monei.confirmPayment({paymentId:r.paymentId,paymentToken:r.token,paymentMethod:{card:{cardholderName:R.value}}});if("FAILED"===e.status){const e=new URL(r.failUrl);return e.searchParams.set("status","FAILED"),{type:p.SUCCESS,redirectUrl:e.toString()}}{const{orderId:n,paymentId:t}=r,a=new URL(r.completeUrl);return a.searchParams.set("id",t),a.searchParams.set("orderId",n),a.searchParams.set("status",e.status),{type:p.SUCCESS,redirectUrl:a.toString()}}}catch(e){return console.error("Error during payment confirmation:",e),C(!1),{type:p.ERROR,message:e.message||"Payment confirmation failed",messageContext:g.PAYMENTS}}}),[f,R,p,g]),S?(0,o.jsx)("div",{className:"monei-redirect-description",children:k.description}):(0,o.jsxs)("fieldset",{className:"monei-fieldset monei-card-fieldset wc-block-components-form",children:[x&&u((0,o.jsx)("div",{className:"monei-payment-overlay"}),document.body),k?.description&&(0,o.jsx)("p",{children:k.description}),(0,o.jsxs)("div",{className:"monei-input-container wc-block-components-text-input",children:[(0,o.jsx)("input",{type:"text",id:"cardholder_name",name:"cardholder_name","data-testid":"cardholder-name-input",placeholder:k.cardholderName,required:!0,className:"monei-input "+(R.error?"has-error":""),value:R.value,onChange:R.handleChange,onBlur:R.handleBlur,disabled:I}),R.error&&(0,o.jsx)("div",{className:"wc-block-components-validation-error",children:R.error})]}),(0,o.jsx)("div",{id:"monei-card-input",className:"monei-card-input",ref:b.containerRef}),(0,o.jsx)("input",{type:"hidden",id:"monei_payment_token",name:"monei_payment_token",value:b.token||""}),b.error&&(0,o.jsx)("div",{className:"wc-block-components-validation-error",children:b.error}),j.getError("card")&&(0,o.jsx)("div",{className:"wc-block-components-validation-error",children:j.getError("card")})]})},p=e=>{const r=e?.cardBrands?Object.keys(e.cardBrands).filter(e=>"default"!==e):[];return(0,o.jsxs)("div",{className:"monei-label-container",children:[e.title&&(0,o.jsx)("span",{className:"monei-text",children:e.title}),r.length>0?(0,o.jsx)("span",{className:"monei-card-brands",children:r.map(r=>{const n=e.cardBrands[r];return(0,o.jsx)("img",{src:n.url,alt:n.title,className:"card-brand-icon"},r)})}):e?.logo&&(0,o.jsx)("div",{className:"monei-logo",children:(0,o.jsx)("img",{src:e.logo,alt:""})})]})};!function(){const{registerPaymentMethod:e}=wc.wcBlocksRegistry,{__}=wp.i18n,r=wc.wcSettings.getSetting("monei_data");e({name:"monei",label:(0,o.jsx)(p,{...r}),ariaLabel:__("MONEI Payment Gateway","monei"),content:(0,o.jsx)(m,{}),edit:(0,o.jsx)("div",{children:__("MONEI Payment Form (Edit Mode)","monei")}),canMakePayment:()=>!0,supports:r.supports||{features:["products"],savePaymentMethod:!0}})}()})();
     1(()=>{"use strict";const{useState:e,useEffect:r,useRef:t,useCallback:n,useMemo:a}=wp.element,o=window.ReactJSXRuntime,{useEffect:s,useState:c,useRef:i,useCallback:l,useMemo:d,createPortal:u}=wp.element,m=m=>{const{responseTypes:p,noticeContexts:y}=m.emitResponse,{onPaymentSetup:g,onCheckoutValidation:h,onCheckoutSuccess:f}=m.eventRegistration,S=d(()=>m.moneiData||wc.wcSettings.getSetting("monei_data"),[m.moneiData]),k="yes"===S.redirect,E=m.shouldSavePayment,v=i(null),[I,w]=c(!1),[x,C]=c(!1),j=(()=>{const[r,t]=e({}),o=n((e,r)=>{t(t=>({...t,[e]:r}))},[]),s=n(e=>{t(r=>{const t={...r};return delete t[e],t})},[]),c=n(()=>{t({})},[]),i=n(()=>Object.keys(r).length>0,[r]),l=n(e=>r[e]||"",[r]);return a(()=>({errors:r,setError:o,clearError:s,clearAllErrors:c,hasErrors:i,getError:l}),[r,o,s,c,i,l])})(),N=d(()=>({errorMessage:S.nameErrorString,pattern:/^[A-Za-zÀ-ú\s-]{5,50}$/}),[S.nameErrorString]),M=d(()=>({accountId:S.accountId,sessionId:S.sessionId,language:S.language,style:S.cardInputStyle}),[S.accountId,S.sessionId,S.language,S.cardInputStyle]),_=((r={})=>{const t=a(()=>r.pattern||/^[A-Za-zÀ-ú\s-]{5,50}$/,[r.pattern]),[o,s]=e(""),[c,i]=e(""),[l,d]=e(!1),u=n((e=o)=>{if(!e||!t.test(e)){const e=r.errorMessage||"Invalid cardholder name";return i(e),!1}return i(""),!0},[o,t,r.errorMessage]),m=n(e=>{const r=e.target.value;s(r),l&&u(r)},[l,u]),p=n(()=>{d(!0),u()},[u]),y=n(()=>{s(""),i(""),d(!1)},[]);return a(()=>({value:o,error:c,touched:l,isValid:!c&&l,handleChange:m,handleBlur:p,validate:u,reset:y}),[o,c,l,m,p,u,y])})(N),b=(o=>{const[s,c]=e(!1),[i,l]=e(""),[d,u]=e(!1),[m,p]=e(null),[y,g]=e(!1),h=t(null),f=t(null),S=t(!1),k=n(async()=>{if(!h.current||!monei?.createToken)return l("Card input not initialized"),null;g(!0),l("");try{const e=await monei.createToken(h.current);if(e.error){const r=e.error.message||("string"==typeof e.error?e.error:"Token creation failed");return l(r),null}return p(e.token),e.token}catch(e){return l(e.message||"Token creation failed"),null}finally{g(!1)}},[]),E=n(()=>{if("undefined"!=typeof monei&&monei.CardInput)if(f.current)try{const e=monei.CardInput({accountId:o.accountId,sessionId:o.sessionId,language:o.language,style:o.style||{},onFocus(){f.current&&f.current.classList.add("is-focused")},onBlur(){f.current&&f.current.classList.remove("is-focused")},onChange(e){if(e.isTouched&&e.error){const r=e.error.message||("string"==typeof e.error?e.error:"Validation error");l(r),u(!1),f.current&&f.current.classList.add("is-invalid")}else l(""),e.isTouched&&u(!0),f.current&&f.current.classList.remove("is-invalid")},onEnter(){h.current&&k().catch(e=>{console.error("Token creation failed on Enter:",e)})}});e.render(f.current),h.current=e,c(!0),l("")}catch(e){l(e.message||"Failed to initialize card input"),c(!1)}else l("Card input container not found");else l("MONEI SDK is not available")},[o,k]),v=n(()=>{h.current&&h.current.clear&&h.current.clear(),p(null),l(""),u(!1)},[]);return r(()=>{if(!S.current){const e=setTimeout(()=>{E(),S.current=!0},500);return()=>clearTimeout(e)}},[E]),r(()=>()=>{if(h.current&&h.current.destroy)try{h.current.destroy()}catch(e){}},[]),a(()=>({isReady:s,error:i,isValid:d,token:m,isCreatingToken:y,containerRef:f,createToken:k,reset:v}),[s,i,d,m,y,f,k,v])})(M),R=i(null),P=l(async()=>(R.current||(R.current=b.createToken().then(e=>(e&&(v.current=e),e)).finally(()=>{R.current=null})),R.current),[b]);return l(()=>{let e=!0;return _.validate()||(e=!1),b.isValid?j.clearError("card"):(j.setError("card",S.cardErrorString),e=!1),e},[_,b,j,S.cardErrorString]),s(()=>h(async()=>!!k||(_.validate()?b.error?{errorMessage:b.error}:b.isValid?!!(v.current||b.token||await P())||{errorMessage:S.tokenErrorString}:{errorMessage:S.cardErrorString}:{errorMessage:_.error})),[h,k,_,b,P,S.cardErrorString,S.tokenErrorString]),s(()=>g(async()=>{if(k)return{type:p.SUCCESS,meta:{paymentMethodData:{monei_is_block_checkout:"yes"}}};w(!0);try{const e=v.current||b.token||await P();if(!e)return{type:p.ERROR,message:S.tokenErrorString};const r={monei_payment_token:e,monei_cardholder_name:_.value,monei_is_block_checkout:"yes"};return E&&(r["wc-monei-new-payment-method"]=!0),{type:p.SUCCESS,meta:{paymentMethodData:r}}}finally{w(!1)}}),[g,k,_,b,P,p,S.tokenErrorString,E]),s(()=>f(async({processingResponse:e})=>{const{paymentDetails:r}=e;if(!r?.paymentId)return console.error("No paymentId found in paymentDetails"),{type:p.SUCCESS};C(!0);try{const e=await monei.confirmPayment({paymentId:r.paymentId,paymentToken:r.token,paymentMethod:{card:{cardholderName:_.value}}});if("FAILED"===e.status){const e=new URL(r.failUrl);return e.searchParams.set("status","FAILED"),{type:p.SUCCESS,redirectUrl:e.toString()}}{const{orderId:t,paymentId:n}=r,a=new URL(r.completeUrl);return a.searchParams.set("id",n),a.searchParams.set("orderId",t),a.searchParams.set("status",e.status),{type:p.SUCCESS,redirectUrl:a.toString()}}}catch(e){return console.error("Error during payment confirmation:",e),C(!1),{type:p.ERROR,message:e.message||"Payment confirmation failed",messageContext:y.PAYMENTS}}}),[f,_,p,y]),k?(0,o.jsx)("div",{className:"monei-redirect-description",children:S.description}):(0,o.jsxs)("fieldset",{className:"monei-fieldset monei-card-fieldset wc-block-components-form",children:[x&&u((0,o.jsx)("div",{className:"monei-payment-overlay"}),document.body),S?.description&&(0,o.jsx)("p",{children:S.description}),(0,o.jsxs)("div",{className:"monei-input-container wc-block-components-text-input",children:[(0,o.jsx)("input",{type:"text",id:"cardholder_name",name:"cardholder_name","data-testid":"cardholder-name-input",placeholder:S.cardholderName,required:!0,className:"monei-input "+(_.error?"has-error":""),value:_.value,onChange:_.handleChange,onBlur:_.handleBlur,disabled:I}),_.error&&(0,o.jsx)("div",{className:"wc-block-components-validation-error",children:_.error})]}),(0,o.jsx)("div",{id:"monei-card-input",className:"monei-card-input",ref:b.containerRef}),(0,o.jsx)("input",{type:"hidden",id:"monei_payment_token",name:"monei_payment_token",value:b.token||""}),b.error&&(0,o.jsx)("div",{className:"wc-block-components-validation-error",children:b.error}),j.getError("card")&&(0,o.jsx)("div",{className:"wc-block-components-validation-error",children:j.getError("card")})]})},p=e=>{const r=e?.cardBrands?Object.keys(e.cardBrands).filter(e=>"default"!==e):[];return(0,o.jsxs)("div",{className:"monei-label-container",children:[e.title&&(0,o.jsx)("span",{className:"monei-text",children:e.title}),r.length>0?(0,o.jsx)("span",{className:"monei-card-brands",children:r.map(r=>{const t=e.cardBrands[r];return(0,o.jsx)("img",{src:t.url,alt:t.title,className:"card-brand-icon"},r)})}):e?.logo&&(0,o.jsx)("div",{className:"monei-logo",children:(0,o.jsx)("img",{src:e.logo,alt:""})})]})};!function(){const{registerPaymentMethod:e}=wc.wcBlocksRegistry,{__}=wp.i18n,r=wc.wcSettings.getSetting("monei_data");e({name:"monei",label:(0,o.jsx)(p,{...r}),ariaLabel:__("MONEI Payment Gateway","monei"),content:(0,o.jsx)(m,{}),edit:(0,o.jsx)("div",{children:__("MONEI Payment Form (Edit Mode)","monei")}),canMakePayment:()=>!0,supports:r.supports||{features:["products"],savePaymentMethod:!0}})}()})();
  • monei/tags/7.0.3/readme.txt

    r3399638 r3491957  
    44Requires at least: 5.0
    55Tested up to: 6.8
    6 Stable tag: 7.0.2
     6Stable tag: 7.0.3
    77Requires PHP: 8.0
    88License: GPLv2 or later
     
    104104== Changelog ==
    105105
    106 = v7.0.2 - 2025-10-14 =
     106= v7.0.3 - 2025-11-20 =
     107-   fix: prevent wp_sanitize_redirect from stripping domain in payment URLs ([a982699](https://github.com/MONEI/MONEI-WooCommerce/commit/a982699))
     108
     109= v7.0.1 - 2025-10-14 =
    107110-   fix: upgrade to PHP 8.0+ to resolve PHP-DI compatibility issue ([95f9ffd](https://github.com/MONEI/MONEI-WooCommerce/commit/95f9ffd))
    108111-   PHP 7.4 users cannot upgrade. PHP 8.0 is now the
     
    113116-   chore: add PHPCS rule to enforce namespace use statements ([248d8bb](https://github.com/MONEI/MONEI-WooCommerce/commit/248d8bb))
    114117-   chore: add PHPCS rule to enforce use statements over fully qualified names ([eb53879](https://github.com/MONEI/MONEI-WooCommerce/commit/eb53879))
    115 -   chore: release v6.4.0 ([d3f0067](https://github.com/MONEI/MONEI-WooCommerce/commit/d3f0067))
    116118-   chore: remove pre-push hook to prevent direct pushes to master/main branch ([abad3bf](https://github.com/MONEI/MONEI-WooCommerce/commit/abad3bf))
    117119-   chore: setup comprehensive linting workflow with lint-staged ([db39b8a](https://github.com/MONEI/MONEI-WooCommerce/commit/db39b8a))
     
    222224-   feat: add custom readme generator to show latest 10 releases ([371e09c](https://github.com/MONEI/MONEI-WooCommerce/commit/371e09c))
    223225-   feat: configure GitHub release notes with conventional changelog ([226db8f](https://github.com/MONEI/MONEI-WooCommerce/commit/226db8f))
    224 -   chore: release v6.3.10 ([86d825a](https://github.com/MONEI/MONEI-WooCommerce/commit/86d825a))
    225 -   chore: release v6.3.11 ([184814d](https://github.com/MONEI/MONEI-WooCommerce/commit/184814d))
    226 -   chore: release v6.3.12 ([e119cc1](https://github.com/MONEI/MONEI-WooCommerce/commit/e119cc1))
    227226-   chore: remove unused generate-wp-readme package ([4e06b1b](https://github.com/MONEI/MONEI-WooCommerce/commit/4e06b1b))
    228227-   chore: update CHANGELOG.md with corrected tag hash ([f9b0dfa](https://github.com/MONEI/MONEI-WooCommerce/commit/f9b0dfa))
     
    238237-   fix: limit changelog to last 10 releases ([1a3f468](https://github.com/MONEI/MONEI-WooCommerce/commit/1a3f468))
    239238-   fix: normalize changelog chronological order ([a3b1d8a](https://github.com/MONEI/MONEI-WooCommerce/commit/a3b1d8a))
    240 -   chore: release v6.3.10 ([86d825a](https://github.com/MONEI/MONEI-WooCommerce/commit/86d825a))
    241 -   chore: release v6.3.11 ([184814d](https://github.com/MONEI/MONEI-WooCommerce/commit/184814d))
    242 -   chore: release v6.3.12 ([af4cda6](https://github.com/MONEI/MONEI-WooCommerce/commit/af4cda6))
    243239-   chore: update CHANGELOG.md with corrected tag hash ([f9b0dfa](https://github.com/MONEI/MONEI-WooCommerce/commit/f9b0dfa))
    244240
     
    252248-   chore: auto-remove README.md after generation ([b299478](https://github.com/MONEI/MONEI-WooCommerce/commit/b299478))
    253249-   chore: modernize build and release pipeline ([21384f0](https://github.com/MONEI/MONEI-WooCommerce/commit/21384f0))
    254 -   chore: release v6.3.9 ([79b2f41](https://github.com/MONEI/MONEI-WooCommerce/commit/79b2f41))
    255250-   chore: remove redundant changelog.txt ([1703044](https://github.com/MONEI/MONEI-WooCommerce/commit/1703044))
    256251-   chore: remove unnecessary README.md auto-deletion ([86c727e](https://github.com/MONEI/MONEI-WooCommerce/commit/86c727e))
     
    316311-   Use rounding ([cb79abd](https://github.com/MONEI/MONEI-WooCommerce/commit/cb79abd))
    317312-   Use Woo api client ([9c5362d](https://github.com/MONEI/MONEI-WooCommerce/commit/9c5362d))
    318 -   chore: release v6.3.8 ([9bed803](https://github.com/MONEI/MONEI-WooCommerce/commit/9bed803))
    319313
    320314= v6.3.5 - 2025-06-04 =
     
    358352-   Update to release version to 6.3.0 ([790b5f6](https://github.com/MONEI/MONEI-WooCommerce/commit/790b5f6))
    359353-   Use 2 API keys ([97fdd93](https://github.com/MONEI/MONEI-WooCommerce/commit/97fdd93))
    360 
    361 = v6.2.1 - 2025-04-07 =
    362 -   Modify composer dependency installation ([a8082b1](https://github.com/MONEI/MONEI-WooCommerce/commit/a8082b1))
    363 -   Update plugin version ([caf01fb](https://github.com/MONEI/MONEI-WooCommerce/commit/caf01fb))
    364 -   Update release action to use composer no-dev ([0063b26](https://github.com/MONEI/MONEI-WooCommerce/commit/0063b26))
    365 -   Update SDK version to V2 ([5cc7cb8](https://github.com/MONEI/MONEI-WooCommerce/commit/5cc7cb8))
    366 -   Use ramsey/composer-install ([8927c67](https://github.com/MONEI/MONEI-WooCommerce/commit/8927c67))
  • monei/tags/7.0.3/scripts/generate-readme.js

    r3376325 r3491957  
    8989            .split( '\n' )
    9090            .filter( ( line ) => line.trim() && ! line.match( /^##/ ) ) // Remove headers
     91            .filter( ( line ) => ! line.match( /chore:\s+release/ ) ) // Remove "chore: release" commits
    9192            .join( '\n' );
    9293
     
    204205
    205206    // Convert WordPress readme.txt format to Markdown
    206     // Headers: === Title === -> # Title #
    207     readme = readme.replace( /^===\s*(.+?)\s*===/gm, '# $1 #' );
    208 
    209     // Subheaders: == Section == -> ## Section ##
    210     readme = readme.replace( /^==\s*(.+?)\s*==/gm, '## $1 ##' );
    211 
    212     // Changelog versions: = v6.3.12 - 2025-10-01 = -> ### v6.3.12 - 2025-10-01 ###
     207    // Headers: === Title === -> # Title
     208    readme = readme.replace( /^===\s*(.+?)\s*===/gm, '# $1' );
     209
     210    // Subheaders: == Section == -> ## Section
     211    readme = readme.replace( /^==\s*(.+?)\s*==/gm, '## $1' );
     212
     213    // Changelog versions: = v6.3.12 - 2025-10-01 = -> ### v6.3.12 - 2025-10-01
    213214    readme = readme.replace(
    214215        /^=\s+(v\d+\.\d+\.\d+\s+-\s+\d{4}-\d{2}-\d{2})\s+=$/gm,
    215         '### $1 ###'
     216        '### $1'
    216217    );
     218
     219    // Subsections: = Subsection = -> ### Subsection
     220    readme = readme.replace( /^=\s+(.+?)\s+=$/gm, '### $1' );
    217221
    218222    return readme;
  • monei/tags/7.0.3/vendor/composer/autoload_static.php

    r3377949 r3491957  
    1313
    1414    public static $prefixLengthsPsr4 = array (
    15         'P' => 
     15        'P' =>
    1616        array (
    1717            'Psr\\Container\\' => 14,
    1818        ),
    19         'M' => 
     19        'M' =>
    2020        array (
    2121            'Monei\\' => 6,
    2222        ),
    23         'L' => 
     23        'L' =>
    2424        array (
    2525            'Laravel\\SerializableClosure\\' => 28,
    2626        ),
    27         'I' => 
     27        'I' =>
    2828        array (
    2929            'Invoker\\' => 8,
    3030        ),
    31         'D' => 
     31        'D' =>
    3232        array (
    3333            'DI\\' => 3,
     
    3636
    3737    public static $prefixDirsPsr4 = array (
    38         'Psr\\Container\\' => 
     38        'Psr\\Container\\' =>
    3939        array (
    4040            0 => __DIR__ . '/..' . '/psr/container/src',
    4141        ),
    42         'Monei\\' => 
     42        'Monei\\' =>
    4343        array (
    4444            0 => __DIR__ . '/../..' . '/src',
    4545            1 => __DIR__ . '/..' . '/monei/monei-php-sdk/lib',
    4646        ),
    47         'Laravel\\SerializableClosure\\' => 
     47        'Laravel\\SerializableClosure\\' =>
    4848        array (
    4949            0 => __DIR__ . '/..' . '/laravel/serializable-closure/src',
    5050        ),
    51         'Invoker\\' => 
     51        'Invoker\\' =>
    5252        array (
    5353            0 => __DIR__ . '/..' . '/php-di/invoker/src',
    5454        ),
    55         'DI\\' => 
     55        'DI\\' =>
    5656        array (
    5757            0 => __DIR__ . '/..' . '/php-di/php-di/src',
  • monei/tags/7.0.3/vendor/composer/installed.php

    r3399638 r3491957  
    22    'root' => array(
    33        'name' => '__root__',
    4         'pretty_version' => '7.0.2',
    5         'version' => '7.0.2.0',
    6         'reference' => '1557eae207e76a1b1bd32ceb7c7d985255fcfa88',
     4        'pretty_version' => '7.0.3',
     5        'version' => '7.0.3.0',
     6        'reference' => '5229baf8da928344c9630ebe027286a57e83dc0c',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        '__root__' => array(
    14             'pretty_version' => '7.0.2',
    15             'version' => '7.0.2.0',
    16             'reference' => '1557eae207e76a1b1bd32ceb7c7d985255fcfa88',
     14            'pretty_version' => '7.0.3',
     15            'version' => '7.0.3.0',
     16            'reference' => '5229baf8da928344c9630ebe027286a57e83dc0c',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
  • monei/tags/7.0.3/woocommerce-gateway-monei.php

    r3399638 r3491957  
    1111 * Plugin URI: https://wordpress.org/plugins/monei/
    1212 * Description: Accept Card, Apple Pay, Google Pay, Bizum, PayPal and many more payment methods in your store.
    13  * Version: 7.0.2
     13 * Version: 7.0.3
    1414 * Author: MONEI
    1515 * Author URI: https://www.monei.com/
  • monei/trunk/README.md

    r3399638 r3491957  
    11# MONEI Payments for WooCommerce
    2 
    32Tags: woocommerce, credit card, payment gateway, payments, ecommerce
    43Contributors: monei, furi3r
    54Requires at least: 5.0
    65Tested up to: 6.8
    7 Stable tag: 7.0.1
     6Stable tag: 7.0.2
    87Requires PHP: 8.0
    98License: GPLv2 or later
     
    1615## Description
    1716
    18 = ACCEPT ONLINE PAYMENTS WITH MONEI =
     17### ACCEPT ONLINE PAYMENTS WITH MONEI
    1918MONEI is an e-commerce payment gateway for WooCommerce (and other e-commerce platforms).
    2019
     20
    2121Its payment gateway is the choice of many Spain and Andorra based e-commerce businesses. Use MONEI's technology to accept and manage all major and alternative payment methods in a single platform.
    2222
     23
    2324MONEI is dedicated to helping you simplify your digital payments so you can focus on growing your online business.
    2425
    25 = PAYMENT METHODS =
     26### PAYMENT METHODS
    2627Use MONEI's payment gateway to accept debit and credit card payments from customers worldwide in 230+ currencies.
    2728
     29
    2830Let shoppers pay from the convenience of their smartphone with digital wallets like Apple Pay, Google Pay, and PayPal. And accept local payment methods such as Bizum (Spain) and SEPA Direct Debit (EU).
    2931
     32
    3033Offering customers [many payment methods](https://monei.com/es/online-payment-methods/) leads to an increase in sales and customer satisfaction. 🚀
    3134
    32 = WHY TO USE MONEI'S PAYMENT PLUGIN FOR WOOCOMMERCE =
     35### WHY TO USE MONEI'S PAYMENT PLUGIN FOR WOOCOMMERCE
    3336
    3437MONEI's serverless architecture allows you to scale and process a high volume of transactions. Its dynamic pricing model means as you sell more your transaction fees decrease. Once you're an approved merchant, enjoy 1-day payment settlements.
    3538
     39
    3640Payment security is crucial. MONEI is PCI DSS compliant, 3D Secure, and uses payment tokenization to make sure sensitive payment information is never compromised.
    3741
     42
    3843Connect your custom domain to MONEI and customize the appearance of your checkout page to build trust and brand awareness.
    3944
     45
    4046With MONEI's payment gateway for e-commerce, get real-time sales analytics via your customer dashboard.
    4147
     48
    4249Please go to the 👉 [signup page](https://dashboard.monei.com/?action=signUp) 👈 to create a new MONEI account. Contact support@monei.com if you have any questions or feedback about this plugin.
    4350
    44 = PAYMENT GATEWAY FEATURES =
    45 
    46  Merchant support for all available MONEI payment methods
    47  Accept and manage all major and alternative payment methods in a single platform
    48  Quickly and easily integrate with your WooCommerce website using MONEI's API
    49  Connect your custom domain to MONEI and customize the appearance of your checkout page
    50  Scale and process a high volume of transactions
    51  Dynamic pricing model — as you sell more your transaction fees decrease
    52  Verified merchants enjoy 1-day payment settlements
    53  PCI-DSS compliant
    54  Self-hosted flexible input fields
    55  Supports 3D Secure and 3D Secure exemptions
    56  Tokenization for deep integration of recurring billing + usage-based charges
    57  Subscriptions support for various payment methods via WooCommerce Subscriptions
    58  13 languages available with auto-detection based on browser language
    59  Capture pre-authorized payments and process refunds within your WooCommerce admin Dashboard
    60  Notifications via email or SMS for customer information and monitoring your store
    61  Get real-time sales analytics via your customer dashboard
    62 
    63 = GETTING STARTED WITH MONEI =
    64 
     51
     52### PAYMENT GATEWAY FEATURES
     53* Merchant support for all available MONEI payment methods
     54* Accept and manage all major and alternative payment methods in a single platform
     55* Quickly and easily integrate with your WooCommerce website using MONEI's API
     56* Connect your custom domain to MONEI and customize the appearance of your checkout page
     57* Scale and process a high volume of transactions
     58* Dynamic pricing model — as you sell more your transaction fees decrease
     59* Verified merchants enjoy 1-day payment settlements
     60* PCI-DSS compliant
     61* Self-hosted flexible input fields
     62* Supports 3D Secure and 3D Secure exemptions
     63* Tokenization for deep integration of recurring billing + usage-based charges
     64* Subscriptions support for various payment methods via WooCommerce Subscriptions
     65* 13 languages available with auto-detection based on browser language
     66* Capture pre-authorized payments and process refunds within your WooCommerce admin Dashboard
     67* Notifications via email or SMS for customer information and monitoring your store
     68* Get real-time sales analytics via your customer dashboard
     69
     70
     71### GETTING STARTED WITH MONEI
    65721. How do I open my MONEI account so I can plug in with WooCommerce?
    66    Learn how to [get started with MONEI here ››](https://support.monei.com/hc/en-us/articles/360017801677-Get-started-with-MONEI)
     73Learn how to [get started with MONEI here ››](https://support.monei.com/hc/en-us/articles/360017801677-Get-started-with-MONEI)
    67742. What countries does MONEI support?
    68    Currently, MONEI is available in Spain and Andorra, but our global expansion is happening fast. [Join our newsletter here](https://client.moonmail.io/ac8e391c-8cfb-46e3-aed9-e7a84d0fd830/forms/6bafcdbf-442a-4e3b-874f-7e2ed30ee001) to get notified once we support your country!
     75Currently, MONEI is available in Spain and Andorra, but our global expansion is happening fast. [Join our newsletter here](https://client.moonmail.io/ac8e391c-8cfb-46e3-aed9-e7a84d0fd830/forms/6bafcdbf-442a-4e3b-874f-7e2ed30ee001) to get notified once we support your country!
    69763. I have different questions about this plugin.
    70    Please contact support@monei.com with your MONEI ID. Describe your problem in detail and include screenshots when necessary.
     77Please contact support@monei.com with your MONEI ID. Describe your problem in detail and include screenshots when necessary.
    7178
    7279## Installation
    73 
    74 -   Go to wp-admin > Plugins
    75 -   Click Add new
    76 -   Search for MONEI
    77 -   Press Install
    78 -   Press Activate now
    79 -   Go to WooCommerce > Settings > Payments > MONEI
    80 -   Add your API Key.
    81 
    82 = If you don't have API Key =
    83 
    84 -   Go to [MONEI Dashboard > Settings > API Access](https://dashboard.monei.com/settings/api)
    85 -   Click on "Create API Key"
    86 
    87 = Use of 3rd Party Services =
     80* Go to wp-admin > Plugins
     81* Click Add new
     82* Search for MONEI
     83* Press Install
     84* Press Activate now
     85* Go to WooCommerce > Settings > Payments > MONEI
     86* Add your API Key.
     87
     88### If you don't have API Key
     89
     90* Go to [MONEI Dashboard > Settings > API Access](https://dashboard.monei.com/settings/api)
     91* Click on "Create API Key"
     92
     93### Use of 3rd Party Services
    8894This plugin is using [MONEI API](https://docs.monei.com/api/) to process payments as well as
    8995[MONEI UI Components](https://docs.monei.com/docs/monei-js/overview/) to securely collect sensitive payment information during checkout.
     
    98104## Changelog
    99105
     106### v7.0.2 - 2025-11-20
     107-   fix: prevent wp_sanitize_redirect from stripping domain in payment URLs ([a982699](https://github.com/MONEI/MONEI-WooCommerce/commit/a982699))
     108
    100109### v7.0.1 - 2025-10-14
    101 
    102110-   fix: upgrade to PHP 8.0+ to resolve PHP-DI compatibility issue ([95f9ffd](https://github.com/MONEI/MONEI-WooCommerce/commit/95f9ffd))
    103111-   PHP 7.4 users cannot upgrade. PHP 8.0 is now the
    104112    minimum required version. PHP 7.4 reached end-of-life in November
    105 
    1061132022. WordPress 6.8 officially supports PHP 8.0-8.3.
    107114
    108115### v7.0.0 - 2025-10-10
    109 
    110116-   chore: add PHPCS rule to enforce namespace use statements ([248d8bb](https://github.com/MONEI/MONEI-WooCommerce/commit/248d8bb))
    111117-   chore: add PHPCS rule to enforce use statements over fully qualified names ([eb53879](https://github.com/MONEI/MONEI-WooCommerce/commit/eb53879))
    112 -   chore: release v6.4.0 ([d3f0067](https://github.com/MONEI/MONEI-WooCommerce/commit/d3f0067))
    113118-   chore: remove pre-push hook to prevent direct pushes to master/main branch ([abad3bf](https://github.com/MONEI/MONEI-WooCommerce/commit/abad3bf))
    114119-   chore: setup comprehensive linting workflow with lint-staged ([db39b8a](https://github.com/MONEI/MONEI-WooCommerce/commit/db39b8a))
     
    203208-   style: prevent payment method title text from wrapping ([9267c10](https://github.com/MONEI/MONEI-WooCommerce/commit/9267c10))
    204209-   Removed lock and \_monei_payment_id_processed flag
    205     Analysis revealed WooCommerce creates orders BEFORE payment (unlike PrestaShop),
    206     so duplicate order creation is impossible. The lock and processed flag were:
    207 
     210Analysis revealed WooCommerce creates orders BEFORE payment (unlike PrestaShop),
     211so duplicate order creation is impossible. The lock and processed flag were:
    2082121. Broken - wp_cache not persistent without external cache
    2092132. Harmful - flag blocked AUTHORIZED→SUCCEEDED and SUCCEEDED→REFUNDED transitions
    2102143. Unnecessary - WooCommerce's payment_complete() is already idempotent
    211    Removed components:
    212 
     215Removed components:
    213216-   WC_Monei_Lock_Helper class
    214217-   Lock acquisition/release in IPN and redirect handlers
    215218-   \_monei_payment_id_processed flag checks and setting
    216219-   wp_cache stubs from PHPStan bootstrap
    217     The order status check provides sufficient protection against duplicate processing.
    218     Any duplicate order notes are cosmetic and acceptable.
     220The order status check provides sufficient protection against duplicate processing.
     221Any duplicate order notes are cosmetic and acceptable.
    219222
    220223### v6.4.0 - 2025-10-01
    221 
    222224-   feat: add custom readme generator to show latest 10 releases ([371e09c](https://github.com/MONEI/MONEI-WooCommerce/commit/371e09c))
    223225-   feat: configure GitHub release notes with conventional changelog ([226db8f](https://github.com/MONEI/MONEI-WooCommerce/commit/226db8f))
    224 -   chore: release v6.3.10 ([86d825a](https://github.com/MONEI/MONEI-WooCommerce/commit/86d825a))
    225 -   chore: release v6.3.11 ([184814d](https://github.com/MONEI/MONEI-WooCommerce/commit/184814d))
    226 -   chore: release v6.3.12 ([e119cc1](https://github.com/MONEI/MONEI-WooCommerce/commit/e119cc1))
    227226-   chore: remove unused generate-wp-readme package ([4e06b1b](https://github.com/MONEI/MONEI-WooCommerce/commit/4e06b1b))
    228227-   chore: update CHANGELOG.md with corrected tag hash ([f9b0dfa](https://github.com/MONEI/MONEI-WooCommerce/commit/f9b0dfa))
     
    234233
    235234### v6.3.12 - 2025-10-01
    236 
    237235-   fix: add changelog length limit to show all versions ([c135b7c](https://github.com/MONEI/MONEI-WooCommerce/commit/c135b7c))
    238236-   fix: correct changelog template to show actual 6.3.8 release ([0efe693](https://github.com/MONEI/MONEI-WooCommerce/commit/0efe693))
    239237-   fix: limit changelog to last 10 releases ([1a3f468](https://github.com/MONEI/MONEI-WooCommerce/commit/1a3f468))
    240238-   fix: normalize changelog chronological order ([a3b1d8a](https://github.com/MONEI/MONEI-WooCommerce/commit/a3b1d8a))
    241 -   chore: release v6.3.10 ([86d825a](https://github.com/MONEI/MONEI-WooCommerce/commit/86d825a))
    242 -   chore: release v6.3.11 ([184814d](https://github.com/MONEI/MONEI-WooCommerce/commit/184814d))
    243 -   chore: release v6.3.12 ([af4cda6](https://github.com/MONEI/MONEI-WooCommerce/commit/af4cda6))
    244239-   chore: update CHANGELOG.md with corrected tag hash ([f9b0dfa](https://github.com/MONEI/MONEI-WooCommerce/commit/f9b0dfa))
    245240
    246241### v6.3.9 - 2025-10-01
    247 
    248242-   Fix amount when checkout data is updated ([2013a03](https://github.com/MONEI/MONEI-WooCommerce/commit/2013a03))
    249243-   Fix card input style ([6c12a5a](https://github.com/MONEI/MONEI-WooCommerce/commit/6c12a5a))
     
    254248-   chore: auto-remove README.md after generation ([b299478](https://github.com/MONEI/MONEI-WooCommerce/commit/b299478))
    255249-   chore: modernize build and release pipeline ([21384f0](https://github.com/MONEI/MONEI-WooCommerce/commit/21384f0))
    256 -   chore: release v6.3.9 ([79b2f41](https://github.com/MONEI/MONEI-WooCommerce/commit/79b2f41))
    257250-   chore: remove redundant changelog.txt ([1703044](https://github.com/MONEI/MONEI-WooCommerce/commit/1703044))
    258251-   chore: remove unnecessary README.md auto-deletion ([86c727e](https://github.com/MONEI/MONEI-WooCommerce/commit/86c727e))
     
    267260
    268261### v6.3.8 - 2025-09-10
    269 
    270262-   Add 3ds credit card automated tests ([0c7faf9](https://github.com/MONEI/MONEI-WooCommerce/commit/0c7faf9))
    271263-   Add api key and method visibility tests ([cf6615a](https://github.com/MONEI/MONEI-WooCommerce/commit/cf6615a))
     
    319311-   Use rounding ([cb79abd](https://github.com/MONEI/MONEI-WooCommerce/commit/cb79abd))
    320312-   Use Woo api client ([9c5362d](https://github.com/MONEI/MONEI-WooCommerce/commit/9c5362d))
    321 -   chore: release v6.3.8 ([9bed803](https://github.com/MONEI/MONEI-WooCommerce/commit/9bed803))
    322313
    323314### v6.3.5 - 2025-06-04
    324 
    325315-   Add 30 seconds caching ([73a4d1a](https://github.com/MONEI/MONEI-WooCommerce/commit/73a4d1a))
    326316-   Change payment methods check to sdk ([5e045eb](https://github.com/MONEI/MONEI-WooCommerce/commit/5e045eb))
     
    330320
    331321### v6.3.4 - 2025-05-30
    332 
    333322-   Copy old keys only when no new keys are there ([14b066f](https://github.com/MONEI/MONEI-WooCommerce/commit/14b066f))
    334323-   Declare $handler to avoid dynamic-property deprecation ([0a4aa60](https://github.com/MONEI/MONEI-WooCommerce/commit/0a4aa60))
     
    357346
    358347### v6.3.1 - 2025-04-24
    359 
    360348-   Bail on renewal if already processing ([718bc42](https://github.com/MONEI/MONEI-WooCommerce/commit/718bc42))
    361349-   Fix change payment method in my account ([48e2f07](https://github.com/MONEI/MONEI-WooCommerce/commit/48e2f07))
     
    364352-   Update to release version to 6.3.0 ([790b5f6](https://github.com/MONEI/MONEI-WooCommerce/commit/790b5f6))
    365353-   Use 2 API keys ([97fdd93](https://github.com/MONEI/MONEI-WooCommerce/commit/97fdd93))
    366 
    367 ### v6.2.1 - 2025-04-07
    368 
    369 -   Modify composer dependency installation ([a8082b1](https://github.com/MONEI/MONEI-WooCommerce/commit/a8082b1))
    370 -   Update plugin version ([caf01fb](https://github.com/MONEI/MONEI-WooCommerce/commit/caf01fb))
    371 -   Update release action to use composer no-dev ([0063b26](https://github.com/MONEI/MONEI-WooCommerce/commit/0063b26))
    372 -   Update SDK version to V2 ([5cc7cb8](https://github.com/MONEI/MONEI-WooCommerce/commit/5cc7cb8))
    373 -   Use ramsey/composer-install ([8927c67](https://github.com/MONEI/MONEI-WooCommerce/commit/8927c67))
  • monei/trunk/class-woocommerce-gateway-monei.php

    r3399638 r3491957  
    66 * @category Core
    77 * @package  Woocommerce_Gateway_Monei
    8  * @version  7.0.2
     8 * @version  7.0.3
    99 */
    1010
     
    2626         * @var string
    2727         */
    28         public $version = '7.0.2';
     28        public $version = '7.0.3';
    2929
    3030        /**
     
    345345         * Load plugin text domain for translations.
    346346         *
    347          * @since 7.0.2
     347         * @since 7.0.3
    348348         */
    349349        private function load_plugin_textdomain() {
  • monei/trunk/public/js/monei-block-checkout-cc.min.asset.php

    r3376325 r3491957  
    1 <?php return array('dependencies' => array('react-jsx-runtime'), 'version' => '32216693dbdd415d75b3');
     1<?php return array('dependencies' => array('react-jsx-runtime'), 'version' => 'dfa96c51e0e48323561d');
  • monei/trunk/public/js/monei-block-checkout-cc.min.js

    r3376325 r3491957  
    1 (()=>{"use strict";const{useState:e,useEffect:r,useRef:n,useCallback:t,useMemo:a}=wp.element,o=window.ReactJSXRuntime,{useEffect:s,useState:c,useRef:i,useCallback:l,useMemo:d,createPortal:u}=wp.element,m=m=>{const{responseTypes:p,noticeContexts:g}=m.emitResponse,{onPaymentSetup:y,onCheckoutValidation:h,onCheckoutSuccess:f}=m.eventRegistration,k=d(()=>m.moneiData||wc.wcSettings.getSetting("monei_data"),[m.moneiData]),S="yes"===k.redirect,E=m.shouldSavePayment,v=i(null),[I,w]=c(!1),[x,C]=c(!1),j=(()=>{const[r,n]=e({}),o=t((e,r)=>{n(n=>({...n,[e]:r}))},[]),s=t(e=>{n(r=>{const n={...r};return delete n[e],n})},[]),c=t(()=>{n({})},[]),i=t(()=>Object.keys(r).length>0,[r]),l=t(e=>r[e]||"",[r]);return a(()=>({errors:r,setError:o,clearError:s,clearAllErrors:c,hasErrors:i,getError:l}),[r,o,s,c,i,l])})(),N=d(()=>({errorMessage:k.nameErrorString,pattern:/^[A-Za-zÀ-ú\s-]{5,50}$/}),[k.nameErrorString]),M=d(()=>({accountId:k.accountId,sessionId:k.sessionId,language:k.language,style:k.cardInputStyle}),[k.accountId,k.sessionId,k.language,k.cardInputStyle]),R=((r={})=>{const n=a(()=>r.pattern||/^[A-Za-zÀ-ú\s-]{5,50}$/,[r.pattern]),[o,s]=e(""),[c,i]=e(""),[l,d]=e(!1),u=t((e=o)=>{if(!e||!n.test(e)){const e=r.errorMessage||"Invalid cardholder name";return i(e),!1}return i(""),!0},[o,n,r.errorMessage]),m=t(e=>{const r=e.target.value;s(r),l&&u(r)},[l,u]),p=t(()=>{d(!0),u()},[u]),g=t(()=>{s(""),i(""),d(!1)},[]);return a(()=>({value:o,error:c,touched:l,isValid:!c&&l,handleChange:m,handleBlur:p,validate:u,reset:g}),[o,c,l,m,p,u,g])})(N),b=(o=>{const[s,c]=e(!1),[i,l]=e(""),[d,u]=e(!1),[m,p]=e(null),[g,y]=e(!1),h=n(null),f=n(null),k=n(!1),S=t(async()=>{if(!h.current||!monei?.createToken)return l("Card input not initialized"),null;y(!0),l("");try{const e=await monei.createToken(h.current);if(e.error){const r=e.error.message||("string"==typeof e.error?e.error:"Token creation failed");return l(r),null}return p(e.token),e.token}catch(e){return l(e.message||"Token creation failed"),null}finally{y(!1)}},[]),E=t(()=>{if("undefined"!=typeof monei&&monei.CardInput)if(f.current)try{const e=monei.CardInput({accountId:o.accountId,sessionId:o.sessionId,language:o.language,style:o.style||{},onFocus(){f.current&&f.current.classList.add("is-focused")},onBlur(){f.current&&f.current.classList.remove("is-focused")},onChange(e){if(e.isTouched&&e.error){const r=e.error.message||("string"==typeof e.error?e.error:"Validation error");l(r),u(!1),f.current&&f.current.classList.add("is-invalid")}else l(""),e.isTouched&&u(!0),f.current&&f.current.classList.remove("is-invalid")},onEnter(){h.current&&S().catch(e=>{console.error("Token creation failed on Enter:",e)})}});e.render(f.current),h.current=e,c(!0),l("")}catch(e){l(e.message||"Failed to initialize card input"),c(!1)}else l("Card input container not found");else l("MONEI SDK is not available")},[o,S]),v=t(()=>{h.current&&h.current.clear&&h.current.clear(),p(null),l(""),u(!1)},[]);return r(()=>{if(!k.current){const e=setTimeout(()=>{E(),k.current=!0},500);return()=>clearTimeout(e)}},[E]),r(()=>()=>{if(h.current&&h.current.destroy)try{h.current.destroy()}catch(e){}},[]),a(()=>({isReady:s,error:i,isValid:d,token:m,isCreatingToken:g,containerRef:f,createToken:S,reset:v}),[s,i,d,m,g,f,S,v])})(M),_=i(null),P=l(async()=>(_.current||(_.current=b.createToken().then(e=>(e&&(v.current=e),e)).finally(()=>{_.current=null})),_.current),[b]);return l(()=>{let e=!0;return R.validate()||(e=!1),b.isValid?j.clearError("card"):(j.setError("card",k.cardErrorString),e=!1),e},[R,b,j,k.cardErrorString]),s(()=>h(async()=>R.validate()?b.error?{errorMessage:b.error}:b.isValid?!!(v.current||b.token||await P())||{errorMessage:k.tokenErrorString}:{errorMessage:k.cardErrorString}:{errorMessage:R.error}),[h,R,b,P,k.cardErrorString,k.tokenErrorString]),s(()=>y(async()=>{w(!0);try{const e=v.current||b.token||await P();if(!e)return{type:p.ERROR,message:k.tokenErrorString};const r={monei_payment_token:e,monei_cardholder_name:R.value,monei_is_block_checkout:"yes"};return E&&(r["wc-monei-new-payment-method"]=!0),{type:p.SUCCESS,meta:{paymentMethodData:r}}}finally{w(!1)}}),[y,R,b,P,p,k.tokenErrorString,E]),s(()=>f(async({processingResponse:e})=>{const{paymentDetails:r}=e;if(!r?.paymentId)return console.error("No paymentId found in paymentDetails"),{type:p.SUCCESS};C(!0);try{const e=await monei.confirmPayment({paymentId:r.paymentId,paymentToken:r.token,paymentMethod:{card:{cardholderName:R.value}}});if("FAILED"===e.status){const e=new URL(r.failUrl);return e.searchParams.set("status","FAILED"),{type:p.SUCCESS,redirectUrl:e.toString()}}{const{orderId:n,paymentId:t}=r,a=new URL(r.completeUrl);return a.searchParams.set("id",t),a.searchParams.set("orderId",n),a.searchParams.set("status",e.status),{type:p.SUCCESS,redirectUrl:a.toString()}}}catch(e){return console.error("Error during payment confirmation:",e),C(!1),{type:p.ERROR,message:e.message||"Payment confirmation failed",messageContext:g.PAYMENTS}}}),[f,R,p,g]),S?(0,o.jsx)("div",{className:"monei-redirect-description",children:k.description}):(0,o.jsxs)("fieldset",{className:"monei-fieldset monei-card-fieldset wc-block-components-form",children:[x&&u((0,o.jsx)("div",{className:"monei-payment-overlay"}),document.body),k?.description&&(0,o.jsx)("p",{children:k.description}),(0,o.jsxs)("div",{className:"monei-input-container wc-block-components-text-input",children:[(0,o.jsx)("input",{type:"text",id:"cardholder_name",name:"cardholder_name","data-testid":"cardholder-name-input",placeholder:k.cardholderName,required:!0,className:"monei-input "+(R.error?"has-error":""),value:R.value,onChange:R.handleChange,onBlur:R.handleBlur,disabled:I}),R.error&&(0,o.jsx)("div",{className:"wc-block-components-validation-error",children:R.error})]}),(0,o.jsx)("div",{id:"monei-card-input",className:"monei-card-input",ref:b.containerRef}),(0,o.jsx)("input",{type:"hidden",id:"monei_payment_token",name:"monei_payment_token",value:b.token||""}),b.error&&(0,o.jsx)("div",{className:"wc-block-components-validation-error",children:b.error}),j.getError("card")&&(0,o.jsx)("div",{className:"wc-block-components-validation-error",children:j.getError("card")})]})},p=e=>{const r=e?.cardBrands?Object.keys(e.cardBrands).filter(e=>"default"!==e):[];return(0,o.jsxs)("div",{className:"monei-label-container",children:[e.title&&(0,o.jsx)("span",{className:"monei-text",children:e.title}),r.length>0?(0,o.jsx)("span",{className:"monei-card-brands",children:r.map(r=>{const n=e.cardBrands[r];return(0,o.jsx)("img",{src:n.url,alt:n.title,className:"card-brand-icon"},r)})}):e?.logo&&(0,o.jsx)("div",{className:"monei-logo",children:(0,o.jsx)("img",{src:e.logo,alt:""})})]})};!function(){const{registerPaymentMethod:e}=wc.wcBlocksRegistry,{__}=wp.i18n,r=wc.wcSettings.getSetting("monei_data");e({name:"monei",label:(0,o.jsx)(p,{...r}),ariaLabel:__("MONEI Payment Gateway","monei"),content:(0,o.jsx)(m,{}),edit:(0,o.jsx)("div",{children:__("MONEI Payment Form (Edit Mode)","monei")}),canMakePayment:()=>!0,supports:r.supports||{features:["products"],savePaymentMethod:!0}})}()})();
     1(()=>{"use strict";const{useState:e,useEffect:r,useRef:t,useCallback:n,useMemo:a}=wp.element,o=window.ReactJSXRuntime,{useEffect:s,useState:c,useRef:i,useCallback:l,useMemo:d,createPortal:u}=wp.element,m=m=>{const{responseTypes:p,noticeContexts:y}=m.emitResponse,{onPaymentSetup:g,onCheckoutValidation:h,onCheckoutSuccess:f}=m.eventRegistration,S=d(()=>m.moneiData||wc.wcSettings.getSetting("monei_data"),[m.moneiData]),k="yes"===S.redirect,E=m.shouldSavePayment,v=i(null),[I,w]=c(!1),[x,C]=c(!1),j=(()=>{const[r,t]=e({}),o=n((e,r)=>{t(t=>({...t,[e]:r}))},[]),s=n(e=>{t(r=>{const t={...r};return delete t[e],t})},[]),c=n(()=>{t({})},[]),i=n(()=>Object.keys(r).length>0,[r]),l=n(e=>r[e]||"",[r]);return a(()=>({errors:r,setError:o,clearError:s,clearAllErrors:c,hasErrors:i,getError:l}),[r,o,s,c,i,l])})(),N=d(()=>({errorMessage:S.nameErrorString,pattern:/^[A-Za-zÀ-ú\s-]{5,50}$/}),[S.nameErrorString]),M=d(()=>({accountId:S.accountId,sessionId:S.sessionId,language:S.language,style:S.cardInputStyle}),[S.accountId,S.sessionId,S.language,S.cardInputStyle]),_=((r={})=>{const t=a(()=>r.pattern||/^[A-Za-zÀ-ú\s-]{5,50}$/,[r.pattern]),[o,s]=e(""),[c,i]=e(""),[l,d]=e(!1),u=n((e=o)=>{if(!e||!t.test(e)){const e=r.errorMessage||"Invalid cardholder name";return i(e),!1}return i(""),!0},[o,t,r.errorMessage]),m=n(e=>{const r=e.target.value;s(r),l&&u(r)},[l,u]),p=n(()=>{d(!0),u()},[u]),y=n(()=>{s(""),i(""),d(!1)},[]);return a(()=>({value:o,error:c,touched:l,isValid:!c&&l,handleChange:m,handleBlur:p,validate:u,reset:y}),[o,c,l,m,p,u,y])})(N),b=(o=>{const[s,c]=e(!1),[i,l]=e(""),[d,u]=e(!1),[m,p]=e(null),[y,g]=e(!1),h=t(null),f=t(null),S=t(!1),k=n(async()=>{if(!h.current||!monei?.createToken)return l("Card input not initialized"),null;g(!0),l("");try{const e=await monei.createToken(h.current);if(e.error){const r=e.error.message||("string"==typeof e.error?e.error:"Token creation failed");return l(r),null}return p(e.token),e.token}catch(e){return l(e.message||"Token creation failed"),null}finally{g(!1)}},[]),E=n(()=>{if("undefined"!=typeof monei&&monei.CardInput)if(f.current)try{const e=monei.CardInput({accountId:o.accountId,sessionId:o.sessionId,language:o.language,style:o.style||{},onFocus(){f.current&&f.current.classList.add("is-focused")},onBlur(){f.current&&f.current.classList.remove("is-focused")},onChange(e){if(e.isTouched&&e.error){const r=e.error.message||("string"==typeof e.error?e.error:"Validation error");l(r),u(!1),f.current&&f.current.classList.add("is-invalid")}else l(""),e.isTouched&&u(!0),f.current&&f.current.classList.remove("is-invalid")},onEnter(){h.current&&k().catch(e=>{console.error("Token creation failed on Enter:",e)})}});e.render(f.current),h.current=e,c(!0),l("")}catch(e){l(e.message||"Failed to initialize card input"),c(!1)}else l("Card input container not found");else l("MONEI SDK is not available")},[o,k]),v=n(()=>{h.current&&h.current.clear&&h.current.clear(),p(null),l(""),u(!1)},[]);return r(()=>{if(!S.current){const e=setTimeout(()=>{E(),S.current=!0},500);return()=>clearTimeout(e)}},[E]),r(()=>()=>{if(h.current&&h.current.destroy)try{h.current.destroy()}catch(e){}},[]),a(()=>({isReady:s,error:i,isValid:d,token:m,isCreatingToken:y,containerRef:f,createToken:k,reset:v}),[s,i,d,m,y,f,k,v])})(M),R=i(null),P=l(async()=>(R.current||(R.current=b.createToken().then(e=>(e&&(v.current=e),e)).finally(()=>{R.current=null})),R.current),[b]);return l(()=>{let e=!0;return _.validate()||(e=!1),b.isValid?j.clearError("card"):(j.setError("card",S.cardErrorString),e=!1),e},[_,b,j,S.cardErrorString]),s(()=>h(async()=>!!k||(_.validate()?b.error?{errorMessage:b.error}:b.isValid?!!(v.current||b.token||await P())||{errorMessage:S.tokenErrorString}:{errorMessage:S.cardErrorString}:{errorMessage:_.error})),[h,k,_,b,P,S.cardErrorString,S.tokenErrorString]),s(()=>g(async()=>{if(k)return{type:p.SUCCESS,meta:{paymentMethodData:{monei_is_block_checkout:"yes"}}};w(!0);try{const e=v.current||b.token||await P();if(!e)return{type:p.ERROR,message:S.tokenErrorString};const r={monei_payment_token:e,monei_cardholder_name:_.value,monei_is_block_checkout:"yes"};return E&&(r["wc-monei-new-payment-method"]=!0),{type:p.SUCCESS,meta:{paymentMethodData:r}}}finally{w(!1)}}),[g,k,_,b,P,p,S.tokenErrorString,E]),s(()=>f(async({processingResponse:e})=>{const{paymentDetails:r}=e;if(!r?.paymentId)return console.error("No paymentId found in paymentDetails"),{type:p.SUCCESS};C(!0);try{const e=await monei.confirmPayment({paymentId:r.paymentId,paymentToken:r.token,paymentMethod:{card:{cardholderName:_.value}}});if("FAILED"===e.status){const e=new URL(r.failUrl);return e.searchParams.set("status","FAILED"),{type:p.SUCCESS,redirectUrl:e.toString()}}{const{orderId:t,paymentId:n}=r,a=new URL(r.completeUrl);return a.searchParams.set("id",n),a.searchParams.set("orderId",t),a.searchParams.set("status",e.status),{type:p.SUCCESS,redirectUrl:a.toString()}}}catch(e){return console.error("Error during payment confirmation:",e),C(!1),{type:p.ERROR,message:e.message||"Payment confirmation failed",messageContext:y.PAYMENTS}}}),[f,_,p,y]),k?(0,o.jsx)("div",{className:"monei-redirect-description",children:S.description}):(0,o.jsxs)("fieldset",{className:"monei-fieldset monei-card-fieldset wc-block-components-form",children:[x&&u((0,o.jsx)("div",{className:"monei-payment-overlay"}),document.body),S?.description&&(0,o.jsx)("p",{children:S.description}),(0,o.jsxs)("div",{className:"monei-input-container wc-block-components-text-input",children:[(0,o.jsx)("input",{type:"text",id:"cardholder_name",name:"cardholder_name","data-testid":"cardholder-name-input",placeholder:S.cardholderName,required:!0,className:"monei-input "+(_.error?"has-error":""),value:_.value,onChange:_.handleChange,onBlur:_.handleBlur,disabled:I}),_.error&&(0,o.jsx)("div",{className:"wc-block-components-validation-error",children:_.error})]}),(0,o.jsx)("div",{id:"monei-card-input",className:"monei-card-input",ref:b.containerRef}),(0,o.jsx)("input",{type:"hidden",id:"monei_payment_token",name:"monei_payment_token",value:b.token||""}),b.error&&(0,o.jsx)("div",{className:"wc-block-components-validation-error",children:b.error}),j.getError("card")&&(0,o.jsx)("div",{className:"wc-block-components-validation-error",children:j.getError("card")})]})},p=e=>{const r=e?.cardBrands?Object.keys(e.cardBrands).filter(e=>"default"!==e):[];return(0,o.jsxs)("div",{className:"monei-label-container",children:[e.title&&(0,o.jsx)("span",{className:"monei-text",children:e.title}),r.length>0?(0,o.jsx)("span",{className:"monei-card-brands",children:r.map(r=>{const t=e.cardBrands[r];return(0,o.jsx)("img",{src:t.url,alt:t.title,className:"card-brand-icon"},r)})}):e?.logo&&(0,o.jsx)("div",{className:"monei-logo",children:(0,o.jsx)("img",{src:e.logo,alt:""})})]})};!function(){const{registerPaymentMethod:e}=wc.wcBlocksRegistry,{__}=wp.i18n,r=wc.wcSettings.getSetting("monei_data");e({name:"monei",label:(0,o.jsx)(p,{...r}),ariaLabel:__("MONEI Payment Gateway","monei"),content:(0,o.jsx)(m,{}),edit:(0,o.jsx)("div",{children:__("MONEI Payment Form (Edit Mode)","monei")}),canMakePayment:()=>!0,supports:r.supports||{features:["products"],savePaymentMethod:!0}})}()})();
  • monei/trunk/readme.txt

    r3399638 r3491957  
    44Requires at least: 5.0
    55Tested up to: 6.8
    6 Stable tag: 7.0.2
     6Stable tag: 7.0.3
    77Requires PHP: 8.0
    88License: GPLv2 or later
     
    104104== Changelog ==
    105105
    106 = v7.0.2 - 2025-10-14 =
     106= v7.0.3 - 2025-11-20 =
     107-   fix: prevent wp_sanitize_redirect from stripping domain in payment URLs ([a982699](https://github.com/MONEI/MONEI-WooCommerce/commit/a982699))
     108
     109= v7.0.1 - 2025-10-14 =
    107110-   fix: upgrade to PHP 8.0+ to resolve PHP-DI compatibility issue ([95f9ffd](https://github.com/MONEI/MONEI-WooCommerce/commit/95f9ffd))
    108111-   PHP 7.4 users cannot upgrade. PHP 8.0 is now the
     
    113116-   chore: add PHPCS rule to enforce namespace use statements ([248d8bb](https://github.com/MONEI/MONEI-WooCommerce/commit/248d8bb))
    114117-   chore: add PHPCS rule to enforce use statements over fully qualified names ([eb53879](https://github.com/MONEI/MONEI-WooCommerce/commit/eb53879))
    115 -   chore: release v6.4.0 ([d3f0067](https://github.com/MONEI/MONEI-WooCommerce/commit/d3f0067))
    116118-   chore: remove pre-push hook to prevent direct pushes to master/main branch ([abad3bf](https://github.com/MONEI/MONEI-WooCommerce/commit/abad3bf))
    117119-   chore: setup comprehensive linting workflow with lint-staged ([db39b8a](https://github.com/MONEI/MONEI-WooCommerce/commit/db39b8a))
     
    222224-   feat: add custom readme generator to show latest 10 releases ([371e09c](https://github.com/MONEI/MONEI-WooCommerce/commit/371e09c))
    223225-   feat: configure GitHub release notes with conventional changelog ([226db8f](https://github.com/MONEI/MONEI-WooCommerce/commit/226db8f))
    224 -   chore: release v6.3.10 ([86d825a](https://github.com/MONEI/MONEI-WooCommerce/commit/86d825a))
    225 -   chore: release v6.3.11 ([184814d](https://github.com/MONEI/MONEI-WooCommerce/commit/184814d))
    226 -   chore: release v6.3.12 ([e119cc1](https://github.com/MONEI/MONEI-WooCommerce/commit/e119cc1))
    227226-   chore: remove unused generate-wp-readme package ([4e06b1b](https://github.com/MONEI/MONEI-WooCommerce/commit/4e06b1b))
    228227-   chore: update CHANGELOG.md with corrected tag hash ([f9b0dfa](https://github.com/MONEI/MONEI-WooCommerce/commit/f9b0dfa))
     
    238237-   fix: limit changelog to last 10 releases ([1a3f468](https://github.com/MONEI/MONEI-WooCommerce/commit/1a3f468))
    239238-   fix: normalize changelog chronological order ([a3b1d8a](https://github.com/MONEI/MONEI-WooCommerce/commit/a3b1d8a))
    240 -   chore: release v6.3.10 ([86d825a](https://github.com/MONEI/MONEI-WooCommerce/commit/86d825a))
    241 -   chore: release v6.3.11 ([184814d](https://github.com/MONEI/MONEI-WooCommerce/commit/184814d))
    242 -   chore: release v6.3.12 ([af4cda6](https://github.com/MONEI/MONEI-WooCommerce/commit/af4cda6))
    243239-   chore: update CHANGELOG.md with corrected tag hash ([f9b0dfa](https://github.com/MONEI/MONEI-WooCommerce/commit/f9b0dfa))
    244240
     
    252248-   chore: auto-remove README.md after generation ([b299478](https://github.com/MONEI/MONEI-WooCommerce/commit/b299478))
    253249-   chore: modernize build and release pipeline ([21384f0](https://github.com/MONEI/MONEI-WooCommerce/commit/21384f0))
    254 -   chore: release v6.3.9 ([79b2f41](https://github.com/MONEI/MONEI-WooCommerce/commit/79b2f41))
    255250-   chore: remove redundant changelog.txt ([1703044](https://github.com/MONEI/MONEI-WooCommerce/commit/1703044))
    256251-   chore: remove unnecessary README.md auto-deletion ([86c727e](https://github.com/MONEI/MONEI-WooCommerce/commit/86c727e))
     
    316311-   Use rounding ([cb79abd](https://github.com/MONEI/MONEI-WooCommerce/commit/cb79abd))
    317312-   Use Woo api client ([9c5362d](https://github.com/MONEI/MONEI-WooCommerce/commit/9c5362d))
    318 -   chore: release v6.3.8 ([9bed803](https://github.com/MONEI/MONEI-WooCommerce/commit/9bed803))
    319313
    320314= v6.3.5 - 2025-06-04 =
     
    358352-   Update to release version to 6.3.0 ([790b5f6](https://github.com/MONEI/MONEI-WooCommerce/commit/790b5f6))
    359353-   Use 2 API keys ([97fdd93](https://github.com/MONEI/MONEI-WooCommerce/commit/97fdd93))
    360 
    361 = v6.2.1 - 2025-04-07 =
    362 -   Modify composer dependency installation ([a8082b1](https://github.com/MONEI/MONEI-WooCommerce/commit/a8082b1))
    363 -   Update plugin version ([caf01fb](https://github.com/MONEI/MONEI-WooCommerce/commit/caf01fb))
    364 -   Update release action to use composer no-dev ([0063b26](https://github.com/MONEI/MONEI-WooCommerce/commit/0063b26))
    365 -   Update SDK version to V2 ([5cc7cb8](https://github.com/MONEI/MONEI-WooCommerce/commit/5cc7cb8))
    366 -   Use ramsey/composer-install ([8927c67](https://github.com/MONEI/MONEI-WooCommerce/commit/8927c67))
  • monei/trunk/scripts/generate-readme.js

    r3376325 r3491957  
    8989            .split( '\n' )
    9090            .filter( ( line ) => line.trim() && ! line.match( /^##/ ) ) // Remove headers
     91            .filter( ( line ) => ! line.match( /chore:\s+release/ ) ) // Remove "chore: release" commits
    9192            .join( '\n' );
    9293
     
    204205
    205206    // Convert WordPress readme.txt format to Markdown
    206     // Headers: === Title === -> # Title #
    207     readme = readme.replace( /^===\s*(.+?)\s*===/gm, '# $1 #' );
    208 
    209     // Subheaders: == Section == -> ## Section ##
    210     readme = readme.replace( /^==\s*(.+?)\s*==/gm, '## $1 ##' );
    211 
    212     // Changelog versions: = v6.3.12 - 2025-10-01 = -> ### v6.3.12 - 2025-10-01 ###
     207    // Headers: === Title === -> # Title
     208    readme = readme.replace( /^===\s*(.+?)\s*===/gm, '# $1' );
     209
     210    // Subheaders: == Section == -> ## Section
     211    readme = readme.replace( /^==\s*(.+?)\s*==/gm, '## $1' );
     212
     213    // Changelog versions: = v6.3.12 - 2025-10-01 = -> ### v6.3.12 - 2025-10-01
    213214    readme = readme.replace(
    214215        /^=\s+(v\d+\.\d+\.\d+\s+-\s+\d{4}-\d{2}-\d{2})\s+=$/gm,
    215         '### $1 ###'
     216        '### $1'
    216217    );
     218
     219    // Subsections: = Subsection = -> ### Subsection
     220    readme = readme.replace( /^=\s+(.+?)\s+=$/gm, '### $1' );
    217221
    218222    return readme;
  • monei/trunk/vendor/composer/autoload_static.php

    r3377949 r3491957  
    1313
    1414    public static $prefixLengthsPsr4 = array (
    15         'P' => 
     15        'P' =>
    1616        array (
    1717            'Psr\\Container\\' => 14,
    1818        ),
    19         'M' => 
     19        'M' =>
    2020        array (
    2121            'Monei\\' => 6,
    2222        ),
    23         'L' => 
     23        'L' =>
    2424        array (
    2525            'Laravel\\SerializableClosure\\' => 28,
    2626        ),
    27         'I' => 
     27        'I' =>
    2828        array (
    2929            'Invoker\\' => 8,
    3030        ),
    31         'D' => 
     31        'D' =>
    3232        array (
    3333            'DI\\' => 3,
     
    3636
    3737    public static $prefixDirsPsr4 = array (
    38         'Psr\\Container\\' => 
     38        'Psr\\Container\\' =>
    3939        array (
    4040            0 => __DIR__ . '/..' . '/psr/container/src',
    4141        ),
    42         'Monei\\' => 
     42        'Monei\\' =>
    4343        array (
    4444            0 => __DIR__ . '/../..' . '/src',
    4545            1 => __DIR__ . '/..' . '/monei/monei-php-sdk/lib',
    4646        ),
    47         'Laravel\\SerializableClosure\\' => 
     47        'Laravel\\SerializableClosure\\' =>
    4848        array (
    4949            0 => __DIR__ . '/..' . '/laravel/serializable-closure/src',
    5050        ),
    51         'Invoker\\' => 
     51        'Invoker\\' =>
    5252        array (
    5353            0 => __DIR__ . '/..' . '/php-di/invoker/src',
    5454        ),
    55         'DI\\' => 
     55        'DI\\' =>
    5656        array (
    5757            0 => __DIR__ . '/..' . '/php-di/php-di/src',
  • monei/trunk/vendor/composer/installed.php

    r3399638 r3491957  
    22    'root' => array(
    33        'name' => '__root__',
    4         'pretty_version' => '7.0.2',
    5         'version' => '7.0.2.0',
    6         'reference' => '1557eae207e76a1b1bd32ceb7c7d985255fcfa88',
     4        'pretty_version' => '7.0.3',
     5        'version' => '7.0.3.0',
     6        'reference' => '5229baf8da928344c9630ebe027286a57e83dc0c',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        '__root__' => array(
    14             'pretty_version' => '7.0.2',
    15             'version' => '7.0.2.0',
    16             'reference' => '1557eae207e76a1b1bd32ceb7c7d985255fcfa88',
     14            'pretty_version' => '7.0.3',
     15            'version' => '7.0.3.0',
     16            'reference' => '5229baf8da928344c9630ebe027286a57e83dc0c',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
  • monei/trunk/woocommerce-gateway-monei.php

    r3399638 r3491957  
    1111 * Plugin URI: https://wordpress.org/plugins/monei/
    1212 * Description: Accept Card, Apple Pay, Google Pay, Bizum, PayPal and many more payment methods in your store.
    13  * Version: 7.0.2
     13 * Version: 7.0.3
    1414 * Author: MONEI
    1515 * Author URI: https://www.monei.com/
Note: See TracChangeset for help on using the changeset viewer.