Changeset 3491957
- Timestamp:
- 03/26/2026 04:07:44 PM (5 days ago)
- Location:
- monei
- Files:
-
- 18 edited
- 1 copied
-
tags/7.0.3 (copied) (copied from monei/trunk)
-
tags/7.0.3/README.md (modified) (11 diffs)
-
tags/7.0.3/class-woocommerce-gateway-monei.php (modified) (3 diffs)
-
tags/7.0.3/public/js/monei-block-checkout-cc.min.asset.php (modified) (1 diff)
-
tags/7.0.3/public/js/monei-block-checkout-cc.min.js (modified) (1 diff)
-
tags/7.0.3/readme.txt (modified) (8 diffs)
-
tags/7.0.3/scripts/generate-readme.js (modified) (2 diffs)
-
tags/7.0.3/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/7.0.3/vendor/composer/installed.php (modified) (2 diffs)
-
tags/7.0.3/woocommerce-gateway-monei.php (modified) (1 diff)
-
trunk/README.md (modified) (11 diffs)
-
trunk/class-woocommerce-gateway-monei.php (modified) (3 diffs)
-
trunk/public/js/monei-block-checkout-cc.min.asset.php (modified) (1 diff)
-
trunk/public/js/monei-block-checkout-cc.min.js (modified) (1 diff)
-
trunk/readme.txt (modified) (8 diffs)
-
trunk/scripts/generate-readme.js (modified) (2 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/woocommerce-gateway-monei.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
monei/tags/7.0.3/README.md
r3399638 r3491957 1 1 # MONEI Payments for WooCommerce 2 3 2 Tags: woocommerce, credit card, payment gateway, payments, ecommerce 4 3 Contributors: monei, furi3r 5 4 Requires at least: 5.0 6 5 Tested up to: 6.8 7 Stable tag: 7.0. 16 Stable tag: 7.0.2 8 7 Requires PHP: 8.0 9 8 License: GPLv2 or later … … 16 15 ## Description 17 16 18 = ACCEPT ONLINE PAYMENTS WITH MONEI = 17 ### ACCEPT ONLINE PAYMENTS WITH MONEI 19 18 MONEI is an e-commerce payment gateway for WooCommerce (and other e-commerce platforms). 20 19 20 21 21 Its 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. 22 22 23 23 24 MONEI is dedicated to helping you simplify your digital payments so you can focus on growing your online business. 24 25 25 = PAYMENT METHODS = 26 ### PAYMENT METHODS 26 27 Use MONEI's payment gateway to accept debit and credit card payments from customers worldwide in 230+ currencies. 27 28 29 28 30 Let 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). 29 31 32 30 33 Offering customers [many payment methods](https://monei.com/es/online-payment-methods/) leads to an increase in sales and customer satisfaction. 🚀 31 34 32 = WHY TO USE MONEI'S PAYMENT PLUGIN FOR WOOCOMMERCE = 35 ### WHY TO USE MONEI'S PAYMENT PLUGIN FOR WOOCOMMERCE 33 36 34 37 MONEI'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. 35 38 39 36 40 Payment security is crucial. MONEI is PCI DSS compliant, 3D Secure, and uses payment tokenization to make sure sensitive payment information is never compromised. 37 41 42 38 43 Connect your custom domain to MONEI and customize the appearance of your checkout page to build trust and brand awareness. 39 44 45 40 46 With MONEI's payment gateway for e-commerce, get real-time sales analytics via your customer dashboard. 41 47 48 42 49 Please 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. 43 50 44 = PAYMENT GATEWAY FEATURES = 45 46 -Merchant support for all available MONEI payment methods47 -Accept and manage all major and alternative payment methods in a single platform48 -Quickly and easily integrate with your WooCommerce website using MONEI's API49 -Connect your custom domain to MONEI and customize the appearance of your checkout page50 -Scale and process a high volume of transactions51 -Dynamic pricing model — as you sell more your transaction fees decrease52 -Verified merchants enjoy 1-day payment settlements53 -PCI-DSS compliant54 -Self-hosted flexible input fields55 -Supports 3D Secure and 3D Secure exemptions56 -Tokenization for deep integration of recurring billing + usage-based charges57 -Subscriptions support for various payment methods via WooCommerce Subscriptions58 -13 languages available with auto-detection based on browser language59 -Capture pre-authorized payments and process refunds within your WooCommerce admin Dashboard60 -Notifications via email or SMS for customer information and monitoring your store61 -Get real-time sales analytics via your customer dashboard62 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 65 72 1. 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)73 Learn how to [get started with MONEI here ››](https://support.monei.com/hc/en-us/articles/360017801677-Get-started-with-MONEI) 67 74 2. 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!75 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! 69 76 3. 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.77 Please contact support@monei.com with your MONEI ID. Describe your problem in detail and include screenshots when necessary. 71 78 72 79 ## 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 88 94 This plugin is using [MONEI API](https://docs.monei.com/api/) to process payments as well as 89 95 [MONEI UI Components](https://docs.monei.com/docs/monei-js/overview/) to securely collect sensitive payment information during checkout. … … 98 104 ## Changelog 99 105 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 100 109 ### v7.0.1 - 2025-10-14 101 102 110 - fix: upgrade to PHP 8.0+ to resolve PHP-DI compatibility issue ([95f9ffd](https://github.com/MONEI/MONEI-WooCommerce/commit/95f9ffd)) 103 111 - PHP 7.4 users cannot upgrade. PHP 8.0 is now the 104 112 minimum required version. PHP 7.4 reached end-of-life in November 105 106 113 2022. WordPress 6.8 officially supports PHP 8.0-8.3. 107 114 108 115 ### v7.0.0 - 2025-10-10 109 110 116 - chore: add PHPCS rule to enforce namespace use statements ([248d8bb](https://github.com/MONEI/MONEI-WooCommerce/commit/248d8bb)) 111 117 - 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))113 118 - chore: remove pre-push hook to prevent direct pushes to master/main branch ([abad3bf](https://github.com/MONEI/MONEI-WooCommerce/commit/abad3bf)) 114 119 - chore: setup comprehensive linting workflow with lint-staged ([db39b8a](https://github.com/MONEI/MONEI-WooCommerce/commit/db39b8a)) … … 203 208 - style: prevent payment method title text from wrapping ([9267c10](https://github.com/MONEI/MONEI-WooCommerce/commit/9267c10)) 204 209 - 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 210 Analysis revealed WooCommerce creates orders BEFORE payment (unlike PrestaShop), 211 so duplicate order creation is impossible. The lock and processed flag were: 208 212 1. Broken - wp_cache not persistent without external cache 209 213 2. Harmful - flag blocked AUTHORIZED→SUCCEEDED and SUCCEEDED→REFUNDED transitions 210 214 3. Unnecessary - WooCommerce's payment_complete() is already idempotent 211 Removed components: 212 215 Removed components: 213 216 - WC_Monei_Lock_Helper class 214 217 - Lock acquisition/release in IPN and redirect handlers 215 218 - \_monei_payment_id_processed flag checks and setting 216 219 - 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.220 The order status check provides sufficient protection against duplicate processing. 221 Any duplicate order notes are cosmetic and acceptable. 219 222 220 223 ### v6.4.0 - 2025-10-01 221 222 224 - feat: add custom readme generator to show latest 10 releases ([371e09c](https://github.com/MONEI/MONEI-WooCommerce/commit/371e09c)) 223 225 - 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))227 226 - chore: remove unused generate-wp-readme package ([4e06b1b](https://github.com/MONEI/MONEI-WooCommerce/commit/4e06b1b)) 228 227 - chore: update CHANGELOG.md with corrected tag hash ([f9b0dfa](https://github.com/MONEI/MONEI-WooCommerce/commit/f9b0dfa)) … … 234 233 235 234 ### v6.3.12 - 2025-10-01 236 237 235 - fix: add changelog length limit to show all versions ([c135b7c](https://github.com/MONEI/MONEI-WooCommerce/commit/c135b7c)) 238 236 - fix: correct changelog template to show actual 6.3.8 release ([0efe693](https://github.com/MONEI/MONEI-WooCommerce/commit/0efe693)) 239 237 - fix: limit changelog to last 10 releases ([1a3f468](https://github.com/MONEI/MONEI-WooCommerce/commit/1a3f468)) 240 238 - 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))244 239 - chore: update CHANGELOG.md with corrected tag hash ([f9b0dfa](https://github.com/MONEI/MONEI-WooCommerce/commit/f9b0dfa)) 245 240 246 241 ### v6.3.9 - 2025-10-01 247 248 242 - Fix amount when checkout data is updated ([2013a03](https://github.com/MONEI/MONEI-WooCommerce/commit/2013a03)) 249 243 - Fix card input style ([6c12a5a](https://github.com/MONEI/MONEI-WooCommerce/commit/6c12a5a)) … … 254 248 - chore: auto-remove README.md after generation ([b299478](https://github.com/MONEI/MONEI-WooCommerce/commit/b299478)) 255 249 - 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))257 250 - chore: remove redundant changelog.txt ([1703044](https://github.com/MONEI/MONEI-WooCommerce/commit/1703044)) 258 251 - chore: remove unnecessary README.md auto-deletion ([86c727e](https://github.com/MONEI/MONEI-WooCommerce/commit/86c727e)) … … 267 260 268 261 ### v6.3.8 - 2025-09-10 269 270 262 - Add 3ds credit card automated tests ([0c7faf9](https://github.com/MONEI/MONEI-WooCommerce/commit/0c7faf9)) 271 263 - Add api key and method visibility tests ([cf6615a](https://github.com/MONEI/MONEI-WooCommerce/commit/cf6615a)) … … 319 311 - Use rounding ([cb79abd](https://github.com/MONEI/MONEI-WooCommerce/commit/cb79abd)) 320 312 - 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))322 313 323 314 ### v6.3.5 - 2025-06-04 324 325 315 - Add 30 seconds caching ([73a4d1a](https://github.com/MONEI/MONEI-WooCommerce/commit/73a4d1a)) 326 316 - Change payment methods check to sdk ([5e045eb](https://github.com/MONEI/MONEI-WooCommerce/commit/5e045eb)) … … 330 320 331 321 ### v6.3.4 - 2025-05-30 332 333 322 - Copy old keys only when no new keys are there ([14b066f](https://github.com/MONEI/MONEI-WooCommerce/commit/14b066f)) 334 323 - Declare $handler to avoid dynamic-property deprecation ([0a4aa60](https://github.com/MONEI/MONEI-WooCommerce/commit/0a4aa60)) … … 357 346 358 347 ### v6.3.1 - 2025-04-24 359 360 348 - Bail on renewal if already processing ([718bc42](https://github.com/MONEI/MONEI-WooCommerce/commit/718bc42)) 361 349 - Fix change payment method in my account ([48e2f07](https://github.com/MONEI/MONEI-WooCommerce/commit/48e2f07)) … … 364 352 - Update to release version to 6.3.0 ([790b5f6](https://github.com/MONEI/MONEI-WooCommerce/commit/790b5f6)) 365 353 - Use 2 API keys ([97fdd93](https://github.com/MONEI/MONEI-WooCommerce/commit/97fdd93)) 366 367 ### v6.2.1 - 2025-04-07368 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 6 6 * @category Core 7 7 * @package Woocommerce_Gateway_Monei 8 * @version 7.0. 28 * @version 7.0.3 9 9 */ 10 10 … … 26 26 * @var string 27 27 */ 28 public $version = '7.0. 2';28 public $version = '7.0.3'; 29 29 30 30 /** … … 345 345 * Load plugin text domain for translations. 346 346 * 347 * @since 7.0. 2347 * @since 7.0.3 348 348 */ 349 349 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 4 4 Requires at least: 5.0 5 5 Tested up to: 6.8 6 Stable tag: 7.0. 26 Stable tag: 7.0.3 7 7 Requires PHP: 8.0 8 8 License: GPLv2 or later … … 104 104 == Changelog == 105 105 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 = 107 110 - fix: upgrade to PHP 8.0+ to resolve PHP-DI compatibility issue ([95f9ffd](https://github.com/MONEI/MONEI-WooCommerce/commit/95f9ffd)) 108 111 - PHP 7.4 users cannot upgrade. PHP 8.0 is now the … … 113 116 - chore: add PHPCS rule to enforce namespace use statements ([248d8bb](https://github.com/MONEI/MONEI-WooCommerce/commit/248d8bb)) 114 117 - 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))116 118 - chore: remove pre-push hook to prevent direct pushes to master/main branch ([abad3bf](https://github.com/MONEI/MONEI-WooCommerce/commit/abad3bf)) 117 119 - chore: setup comprehensive linting workflow with lint-staged ([db39b8a](https://github.com/MONEI/MONEI-WooCommerce/commit/db39b8a)) … … 222 224 - feat: add custom readme generator to show latest 10 releases ([371e09c](https://github.com/MONEI/MONEI-WooCommerce/commit/371e09c)) 223 225 - 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))227 226 - chore: remove unused generate-wp-readme package ([4e06b1b](https://github.com/MONEI/MONEI-WooCommerce/commit/4e06b1b)) 228 227 - chore: update CHANGELOG.md with corrected tag hash ([f9b0dfa](https://github.com/MONEI/MONEI-WooCommerce/commit/f9b0dfa)) … … 238 237 - fix: limit changelog to last 10 releases ([1a3f468](https://github.com/MONEI/MONEI-WooCommerce/commit/1a3f468)) 239 238 - 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))243 239 - chore: update CHANGELOG.md with corrected tag hash ([f9b0dfa](https://github.com/MONEI/MONEI-WooCommerce/commit/f9b0dfa)) 244 240 … … 252 248 - chore: auto-remove README.md after generation ([b299478](https://github.com/MONEI/MONEI-WooCommerce/commit/b299478)) 253 249 - 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))255 250 - chore: remove redundant changelog.txt ([1703044](https://github.com/MONEI/MONEI-WooCommerce/commit/1703044)) 256 251 - chore: remove unnecessary README.md auto-deletion ([86c727e](https://github.com/MONEI/MONEI-WooCommerce/commit/86c727e)) … … 316 311 - Use rounding ([cb79abd](https://github.com/MONEI/MONEI-WooCommerce/commit/cb79abd)) 317 312 - 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))319 313 320 314 = v6.3.5 - 2025-06-04 = … … 358 352 - Update to release version to 6.3.0 ([790b5f6](https://github.com/MONEI/MONEI-WooCommerce/commit/790b5f6)) 359 353 - 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 89 89 .split( '\n' ) 90 90 .filter( ( line ) => line.trim() && ! line.match( /^##/ ) ) // Remove headers 91 .filter( ( line ) => ! line.match( /chore:\s+release/ ) ) // Remove "chore: release" commits 91 92 .join( '\n' ); 92 93 … … 204 205 205 206 // 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 213 214 readme = readme.replace( 214 215 /^=\s+(v\d+\.\d+\.\d+\s+-\s+\d{4}-\d{2}-\d{2})\s+=$/gm, 215 '### $1 ###'216 '### $1' 216 217 ); 218 219 // Subsections: = Subsection = -> ### Subsection 220 readme = readme.replace( /^=\s+(.+?)\s+=$/gm, '### $1' ); 217 221 218 222 return readme; -
monei/tags/7.0.3/vendor/composer/autoload_static.php
r3377949 r3491957 13 13 14 14 public static $prefixLengthsPsr4 = array ( 15 'P' => 15 'P' => 16 16 array ( 17 17 'Psr\\Container\\' => 14, 18 18 ), 19 'M' => 19 'M' => 20 20 array ( 21 21 'Monei\\' => 6, 22 22 ), 23 'L' => 23 'L' => 24 24 array ( 25 25 'Laravel\\SerializableClosure\\' => 28, 26 26 ), 27 'I' => 27 'I' => 28 28 array ( 29 29 'Invoker\\' => 8, 30 30 ), 31 'D' => 31 'D' => 32 32 array ( 33 33 'DI\\' => 3, … … 36 36 37 37 public static $prefixDirsPsr4 = array ( 38 'Psr\\Container\\' => 38 'Psr\\Container\\' => 39 39 array ( 40 40 0 => __DIR__ . '/..' . '/psr/container/src', 41 41 ), 42 'Monei\\' => 42 'Monei\\' => 43 43 array ( 44 44 0 => __DIR__ . '/../..' . '/src', 45 45 1 => __DIR__ . '/..' . '/monei/monei-php-sdk/lib', 46 46 ), 47 'Laravel\\SerializableClosure\\' => 47 'Laravel\\SerializableClosure\\' => 48 48 array ( 49 49 0 => __DIR__ . '/..' . '/laravel/serializable-closure/src', 50 50 ), 51 'Invoker\\' => 51 'Invoker\\' => 52 52 array ( 53 53 0 => __DIR__ . '/..' . '/php-di/invoker/src', 54 54 ), 55 'DI\\' => 55 'DI\\' => 56 56 array ( 57 57 0 => __DIR__ . '/..' . '/php-di/php-di/src', -
monei/tags/7.0.3/vendor/composer/installed.php
r3399638 r3491957 2 2 'root' => array( 3 3 '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', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 '__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', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../', -
monei/tags/7.0.3/woocommerce-gateway-monei.php
r3399638 r3491957 11 11 * Plugin URI: https://wordpress.org/plugins/monei/ 12 12 * Description: Accept Card, Apple Pay, Google Pay, Bizum, PayPal and many more payment methods in your store. 13 * Version: 7.0. 213 * Version: 7.0.3 14 14 * Author: MONEI 15 15 * Author URI: https://www.monei.com/ -
monei/trunk/README.md
r3399638 r3491957 1 1 # MONEI Payments for WooCommerce 2 3 2 Tags: woocommerce, credit card, payment gateway, payments, ecommerce 4 3 Contributors: monei, furi3r 5 4 Requires at least: 5.0 6 5 Tested up to: 6.8 7 Stable tag: 7.0. 16 Stable tag: 7.0.2 8 7 Requires PHP: 8.0 9 8 License: GPLv2 or later … … 16 15 ## Description 17 16 18 = ACCEPT ONLINE PAYMENTS WITH MONEI = 17 ### ACCEPT ONLINE PAYMENTS WITH MONEI 19 18 MONEI is an e-commerce payment gateway for WooCommerce (and other e-commerce platforms). 20 19 20 21 21 Its 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. 22 22 23 23 24 MONEI is dedicated to helping you simplify your digital payments so you can focus on growing your online business. 24 25 25 = PAYMENT METHODS = 26 ### PAYMENT METHODS 26 27 Use MONEI's payment gateway to accept debit and credit card payments from customers worldwide in 230+ currencies. 27 28 29 28 30 Let 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). 29 31 32 30 33 Offering customers [many payment methods](https://monei.com/es/online-payment-methods/) leads to an increase in sales and customer satisfaction. 🚀 31 34 32 = WHY TO USE MONEI'S PAYMENT PLUGIN FOR WOOCOMMERCE = 35 ### WHY TO USE MONEI'S PAYMENT PLUGIN FOR WOOCOMMERCE 33 36 34 37 MONEI'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. 35 38 39 36 40 Payment security is crucial. MONEI is PCI DSS compliant, 3D Secure, and uses payment tokenization to make sure sensitive payment information is never compromised. 37 41 42 38 43 Connect your custom domain to MONEI and customize the appearance of your checkout page to build trust and brand awareness. 39 44 45 40 46 With MONEI's payment gateway for e-commerce, get real-time sales analytics via your customer dashboard. 41 47 48 42 49 Please 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. 43 50 44 = PAYMENT GATEWAY FEATURES = 45 46 -Merchant support for all available MONEI payment methods47 -Accept and manage all major and alternative payment methods in a single platform48 -Quickly and easily integrate with your WooCommerce website using MONEI's API49 -Connect your custom domain to MONEI and customize the appearance of your checkout page50 -Scale and process a high volume of transactions51 -Dynamic pricing model — as you sell more your transaction fees decrease52 -Verified merchants enjoy 1-day payment settlements53 -PCI-DSS compliant54 -Self-hosted flexible input fields55 -Supports 3D Secure and 3D Secure exemptions56 -Tokenization for deep integration of recurring billing + usage-based charges57 -Subscriptions support for various payment methods via WooCommerce Subscriptions58 -13 languages available with auto-detection based on browser language59 -Capture pre-authorized payments and process refunds within your WooCommerce admin Dashboard60 -Notifications via email or SMS for customer information and monitoring your store61 -Get real-time sales analytics via your customer dashboard62 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 65 72 1. 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)73 Learn how to [get started with MONEI here ››](https://support.monei.com/hc/en-us/articles/360017801677-Get-started-with-MONEI) 67 74 2. 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!75 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! 69 76 3. 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.77 Please contact support@monei.com with your MONEI ID. Describe your problem in detail and include screenshots when necessary. 71 78 72 79 ## 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 88 94 This plugin is using [MONEI API](https://docs.monei.com/api/) to process payments as well as 89 95 [MONEI UI Components](https://docs.monei.com/docs/monei-js/overview/) to securely collect sensitive payment information during checkout. … … 98 104 ## Changelog 99 105 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 100 109 ### v7.0.1 - 2025-10-14 101 102 110 - fix: upgrade to PHP 8.0+ to resolve PHP-DI compatibility issue ([95f9ffd](https://github.com/MONEI/MONEI-WooCommerce/commit/95f9ffd)) 103 111 - PHP 7.4 users cannot upgrade. PHP 8.0 is now the 104 112 minimum required version. PHP 7.4 reached end-of-life in November 105 106 113 2022. WordPress 6.8 officially supports PHP 8.0-8.3. 107 114 108 115 ### v7.0.0 - 2025-10-10 109 110 116 - chore: add PHPCS rule to enforce namespace use statements ([248d8bb](https://github.com/MONEI/MONEI-WooCommerce/commit/248d8bb)) 111 117 - 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))113 118 - chore: remove pre-push hook to prevent direct pushes to master/main branch ([abad3bf](https://github.com/MONEI/MONEI-WooCommerce/commit/abad3bf)) 114 119 - chore: setup comprehensive linting workflow with lint-staged ([db39b8a](https://github.com/MONEI/MONEI-WooCommerce/commit/db39b8a)) … … 203 208 - style: prevent payment method title text from wrapping ([9267c10](https://github.com/MONEI/MONEI-WooCommerce/commit/9267c10)) 204 209 - 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 210 Analysis revealed WooCommerce creates orders BEFORE payment (unlike PrestaShop), 211 so duplicate order creation is impossible. The lock and processed flag were: 208 212 1. Broken - wp_cache not persistent without external cache 209 213 2. Harmful - flag blocked AUTHORIZED→SUCCEEDED and SUCCEEDED→REFUNDED transitions 210 214 3. Unnecessary - WooCommerce's payment_complete() is already idempotent 211 Removed components: 212 215 Removed components: 213 216 - WC_Monei_Lock_Helper class 214 217 - Lock acquisition/release in IPN and redirect handlers 215 218 - \_monei_payment_id_processed flag checks and setting 216 219 - 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.220 The order status check provides sufficient protection against duplicate processing. 221 Any duplicate order notes are cosmetic and acceptable. 219 222 220 223 ### v6.4.0 - 2025-10-01 221 222 224 - feat: add custom readme generator to show latest 10 releases ([371e09c](https://github.com/MONEI/MONEI-WooCommerce/commit/371e09c)) 223 225 - 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))227 226 - chore: remove unused generate-wp-readme package ([4e06b1b](https://github.com/MONEI/MONEI-WooCommerce/commit/4e06b1b)) 228 227 - chore: update CHANGELOG.md with corrected tag hash ([f9b0dfa](https://github.com/MONEI/MONEI-WooCommerce/commit/f9b0dfa)) … … 234 233 235 234 ### v6.3.12 - 2025-10-01 236 237 235 - fix: add changelog length limit to show all versions ([c135b7c](https://github.com/MONEI/MONEI-WooCommerce/commit/c135b7c)) 238 236 - fix: correct changelog template to show actual 6.3.8 release ([0efe693](https://github.com/MONEI/MONEI-WooCommerce/commit/0efe693)) 239 237 - fix: limit changelog to last 10 releases ([1a3f468](https://github.com/MONEI/MONEI-WooCommerce/commit/1a3f468)) 240 238 - 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))244 239 - chore: update CHANGELOG.md with corrected tag hash ([f9b0dfa](https://github.com/MONEI/MONEI-WooCommerce/commit/f9b0dfa)) 245 240 246 241 ### v6.3.9 - 2025-10-01 247 248 242 - Fix amount when checkout data is updated ([2013a03](https://github.com/MONEI/MONEI-WooCommerce/commit/2013a03)) 249 243 - Fix card input style ([6c12a5a](https://github.com/MONEI/MONEI-WooCommerce/commit/6c12a5a)) … … 254 248 - chore: auto-remove README.md after generation ([b299478](https://github.com/MONEI/MONEI-WooCommerce/commit/b299478)) 255 249 - 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))257 250 - chore: remove redundant changelog.txt ([1703044](https://github.com/MONEI/MONEI-WooCommerce/commit/1703044)) 258 251 - chore: remove unnecessary README.md auto-deletion ([86c727e](https://github.com/MONEI/MONEI-WooCommerce/commit/86c727e)) … … 267 260 268 261 ### v6.3.8 - 2025-09-10 269 270 262 - Add 3ds credit card automated tests ([0c7faf9](https://github.com/MONEI/MONEI-WooCommerce/commit/0c7faf9)) 271 263 - Add api key and method visibility tests ([cf6615a](https://github.com/MONEI/MONEI-WooCommerce/commit/cf6615a)) … … 319 311 - Use rounding ([cb79abd](https://github.com/MONEI/MONEI-WooCommerce/commit/cb79abd)) 320 312 - 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))322 313 323 314 ### v6.3.5 - 2025-06-04 324 325 315 - Add 30 seconds caching ([73a4d1a](https://github.com/MONEI/MONEI-WooCommerce/commit/73a4d1a)) 326 316 - Change payment methods check to sdk ([5e045eb](https://github.com/MONEI/MONEI-WooCommerce/commit/5e045eb)) … … 330 320 331 321 ### v6.3.4 - 2025-05-30 332 333 322 - Copy old keys only when no new keys are there ([14b066f](https://github.com/MONEI/MONEI-WooCommerce/commit/14b066f)) 334 323 - Declare $handler to avoid dynamic-property deprecation ([0a4aa60](https://github.com/MONEI/MONEI-WooCommerce/commit/0a4aa60)) … … 357 346 358 347 ### v6.3.1 - 2025-04-24 359 360 348 - Bail on renewal if already processing ([718bc42](https://github.com/MONEI/MONEI-WooCommerce/commit/718bc42)) 361 349 - Fix change payment method in my account ([48e2f07](https://github.com/MONEI/MONEI-WooCommerce/commit/48e2f07)) … … 364 352 - Update to release version to 6.3.0 ([790b5f6](https://github.com/MONEI/MONEI-WooCommerce/commit/790b5f6)) 365 353 - Use 2 API keys ([97fdd93](https://github.com/MONEI/MONEI-WooCommerce/commit/97fdd93)) 366 367 ### v6.2.1 - 2025-04-07368 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 6 6 * @category Core 7 7 * @package Woocommerce_Gateway_Monei 8 * @version 7.0. 28 * @version 7.0.3 9 9 */ 10 10 … … 26 26 * @var string 27 27 */ 28 public $version = '7.0. 2';28 public $version = '7.0.3'; 29 29 30 30 /** … … 345 345 * Load plugin text domain for translations. 346 346 * 347 * @since 7.0. 2347 * @since 7.0.3 348 348 */ 349 349 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 4 4 Requires at least: 5.0 5 5 Tested up to: 6.8 6 Stable tag: 7.0. 26 Stable tag: 7.0.3 7 7 Requires PHP: 8.0 8 8 License: GPLv2 or later … … 104 104 == Changelog == 105 105 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 = 107 110 - fix: upgrade to PHP 8.0+ to resolve PHP-DI compatibility issue ([95f9ffd](https://github.com/MONEI/MONEI-WooCommerce/commit/95f9ffd)) 108 111 - PHP 7.4 users cannot upgrade. PHP 8.0 is now the … … 113 116 - chore: add PHPCS rule to enforce namespace use statements ([248d8bb](https://github.com/MONEI/MONEI-WooCommerce/commit/248d8bb)) 114 117 - 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))116 118 - chore: remove pre-push hook to prevent direct pushes to master/main branch ([abad3bf](https://github.com/MONEI/MONEI-WooCommerce/commit/abad3bf)) 117 119 - chore: setup comprehensive linting workflow with lint-staged ([db39b8a](https://github.com/MONEI/MONEI-WooCommerce/commit/db39b8a)) … … 222 224 - feat: add custom readme generator to show latest 10 releases ([371e09c](https://github.com/MONEI/MONEI-WooCommerce/commit/371e09c)) 223 225 - 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))227 226 - chore: remove unused generate-wp-readme package ([4e06b1b](https://github.com/MONEI/MONEI-WooCommerce/commit/4e06b1b)) 228 227 - chore: update CHANGELOG.md with corrected tag hash ([f9b0dfa](https://github.com/MONEI/MONEI-WooCommerce/commit/f9b0dfa)) … … 238 237 - fix: limit changelog to last 10 releases ([1a3f468](https://github.com/MONEI/MONEI-WooCommerce/commit/1a3f468)) 239 238 - 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))243 239 - chore: update CHANGELOG.md with corrected tag hash ([f9b0dfa](https://github.com/MONEI/MONEI-WooCommerce/commit/f9b0dfa)) 244 240 … … 252 248 - chore: auto-remove README.md after generation ([b299478](https://github.com/MONEI/MONEI-WooCommerce/commit/b299478)) 253 249 - 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))255 250 - chore: remove redundant changelog.txt ([1703044](https://github.com/MONEI/MONEI-WooCommerce/commit/1703044)) 256 251 - chore: remove unnecessary README.md auto-deletion ([86c727e](https://github.com/MONEI/MONEI-WooCommerce/commit/86c727e)) … … 316 311 - Use rounding ([cb79abd](https://github.com/MONEI/MONEI-WooCommerce/commit/cb79abd)) 317 312 - 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))319 313 320 314 = v6.3.5 - 2025-06-04 = … … 358 352 - Update to release version to 6.3.0 ([790b5f6](https://github.com/MONEI/MONEI-WooCommerce/commit/790b5f6)) 359 353 - 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 89 89 .split( '\n' ) 90 90 .filter( ( line ) => line.trim() && ! line.match( /^##/ ) ) // Remove headers 91 .filter( ( line ) => ! line.match( /chore:\s+release/ ) ) // Remove "chore: release" commits 91 92 .join( '\n' ); 92 93 … … 204 205 205 206 // 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 213 214 readme = readme.replace( 214 215 /^=\s+(v\d+\.\d+\.\d+\s+-\s+\d{4}-\d{2}-\d{2})\s+=$/gm, 215 '### $1 ###'216 '### $1' 216 217 ); 218 219 // Subsections: = Subsection = -> ### Subsection 220 readme = readme.replace( /^=\s+(.+?)\s+=$/gm, '### $1' ); 217 221 218 222 return readme; -
monei/trunk/vendor/composer/autoload_static.php
r3377949 r3491957 13 13 14 14 public static $prefixLengthsPsr4 = array ( 15 'P' => 15 'P' => 16 16 array ( 17 17 'Psr\\Container\\' => 14, 18 18 ), 19 'M' => 19 'M' => 20 20 array ( 21 21 'Monei\\' => 6, 22 22 ), 23 'L' => 23 'L' => 24 24 array ( 25 25 'Laravel\\SerializableClosure\\' => 28, 26 26 ), 27 'I' => 27 'I' => 28 28 array ( 29 29 'Invoker\\' => 8, 30 30 ), 31 'D' => 31 'D' => 32 32 array ( 33 33 'DI\\' => 3, … … 36 36 37 37 public static $prefixDirsPsr4 = array ( 38 'Psr\\Container\\' => 38 'Psr\\Container\\' => 39 39 array ( 40 40 0 => __DIR__ . '/..' . '/psr/container/src', 41 41 ), 42 'Monei\\' => 42 'Monei\\' => 43 43 array ( 44 44 0 => __DIR__ . '/../..' . '/src', 45 45 1 => __DIR__ . '/..' . '/monei/monei-php-sdk/lib', 46 46 ), 47 'Laravel\\SerializableClosure\\' => 47 'Laravel\\SerializableClosure\\' => 48 48 array ( 49 49 0 => __DIR__ . '/..' . '/laravel/serializable-closure/src', 50 50 ), 51 'Invoker\\' => 51 'Invoker\\' => 52 52 array ( 53 53 0 => __DIR__ . '/..' . '/php-di/invoker/src', 54 54 ), 55 'DI\\' => 55 'DI\\' => 56 56 array ( 57 57 0 => __DIR__ . '/..' . '/php-di/php-di/src', -
monei/trunk/vendor/composer/installed.php
r3399638 r3491957 2 2 'root' => array( 3 3 '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', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 '__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', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../', -
monei/trunk/woocommerce-gateway-monei.php
r3399638 r3491957 11 11 * Plugin URI: https://wordpress.org/plugins/monei/ 12 12 * Description: Accept Card, Apple Pay, Google Pay, Bizum, PayPal and many more payment methods in your store. 13 * Version: 7.0. 213 * Version: 7.0.3 14 14 * Author: MONEI 15 15 * Author URI: https://www.monei.com/
Note: See TracChangeset
for help on using the changeset viewer.