Changeset 3253989
- Timestamp:
- 03/11/2025 11:50:32 AM (11 months ago)
- Location:
- visma-pay-embedded-card-payment-gateway/trunk
- Files:
-
- 10 edited
-
build/blocks.asset.php (modified) (1 diff)
-
build/blocks.js (modified) (1 diff)
-
includes/blocks/visma_pay_embedded_card_blocks_support.php (modified) (3 diffs)
-
includes/lib/Visma/VismaPay.php (modified) (1 diff)
-
languages/visma-pay-embedded-card-payment-gateway-fi-0a194271922d454324b7e88e0bfed673.json (modified) (1 diff)
-
languages/visma-pay-embedded-card-payment-gateway-fi.mo (modified) (previous)
-
languages/visma-pay-embedded-card-payment-gateway-fi.po (modified) (22 diffs)
-
languages/visma-pay-embedded-card-payment-gateway.pot (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
visma-pay-embedded-card-payment-gateway.php (modified) (17 diffs)
Legend:
- Unmodified
- Added
- Removed
-
visma-pay-embedded-card-payment-gateway/trunk/build/blocks.asset.php
r2974591 r3253989 1 <?php return array('dependencies' => array('wp-element', 'wp-i18n'), 'version' => ' eca14a32dee6a5fa52b7');1 <?php return array('dependencies' => array('wp-element', 'wp-i18n'), 'version' => 'c553693c98bb20bbfa99'); -
visma-pay-embedded-card-payment-gateway/trunk/build/blocks.js
r2974591 r3253989 1 !function(){"use strict";var e=window.wp.element,t=window.wp.i18n;const{registerPaymentMethod:a}=wc.wcBlocksRegistry,{getSetting:n}=wc.wcSettings,r="https://www.vismapay.com",s=n("vismapay_embedded_card_data",{}),c={generic:`${(0,t.__)("Something went wrong","visma-pay-embedded-card-payment-gateway")}.`,formInvalid:`${(0,t.__)("Please check the card information","visma-pay-embedded-card-payment-gateway")}.`},i=()=>(0,e.createElement)("div",{id:"pf-cc-form"},(0,e.createElement)("iframe",{scrolling:"no",id:"pf-cc-iframe",className:"intrinsic-ignore",height:"220px",style:{border:"none",width:"100%"},src:`${r}/e-payments/embedded_card_form?lang=${s.lang}`})),m=()=>(s.visa||s.master||s.amex||s.diners)&&(0,e.createElement)("div",{className:"vpe-card-brand-row"},s.visa&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(l,{imgSrc:"visa.png",imgAlt:"Visa",imgClassNames:"visa"}),(0,e.createElement)(l,{imgSrc:"verified.png",imgAlt:"Verified by Visa",imgClassNames:"verified"})),s.mastercard&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(l,{imgSrc:"mastercard.png",imgAlt:"MasterCard"}),(0,e.createElement)(l,{imgSrc:"securecode.png",imgAlt:"MasterCard SecureCode"})),s.amex&&(0,e.createElement)(l,{imgSrc:"americanexpress.png",imgAlt:"America Express"}),s.diners&&(0,e.createElement)(l,{imgSrc:"dinersclub.png",imgAlt:"Diners"}),(0,e.createElement)("div",{style:{display:"block",clear:"both"}})),l=({imgSrc:t,imgAlt:a,imgClassNames:n=""})=>(0,e.createElement)("div",{className:"vpe-card-brand-container"},(0,e.createElement)("img",{className:`vpe-card-brand-logo ${n}`,src:`${s.imgUrl}/${t}`,alt:a})),o=({eventRegistration:a,emitResponse:n,components:s})=>{const{onCheckoutValidation:l,onPaymentSetup:o,onCheckoutSuccess:d,onCheckoutFail:g}=a,{responseTypes:p}=n,{LoadingMask:u}=s,[y,f]=(0,e.useState)(!1);let E=null;const v=e=>{if(e.origin!==r)return;let t=null;try{t=JSON.parse(e.data)}catch(e){}E=null!==t&&void 0!==t.valid&&!0===t.valid},w=async(e=3e3)=>{let t=!0,a=!1;for(setTimeout((()=>{null===E&&(t=!1)}),e);t&&!a;)if(null!==E)a=!0;else{const e=new Promise((e=>{setTimeout(e,100)}));await e}if(null===E)return Promise.reject()};(0,e.useEffect)((()=>(window.addEventListener("message",v),()=>{window.removeEventListener("message",v)})),[]),(0,e.useEffect)((()=>{const e=l((async()=>{f(!0);const e=document.querySelector("#pf-cc-iframe");if(!e)return f(!1),{errorMessage:c.generic};e.contentWindow.postMessage(JSON.stringify({action:"validate"}),r);try{await w()}catch(e){return f(!1),{errorMessage:c.generic}}return!!E||(f(!1),{errorMessage:c.formInvalid})}));return()=>{e()}}),[l]),(0,e.useEffect)((()=>{const e=o((()=>({type:p.SUCCESS,meta:{paymentMethodData:{payment_method:"visma_pay_embedded_card"}}})));return()=>{e()}}),[p.SUCCESS,o]),(0,e.useEffect)((()=>{const e=d((async e=>{const t=e?.processingResponse;if(t&&"success"===t?.paymentStatus&&"success"===t?.paymentDetails?.result&&t.paymentDetails.bpf_token){const e=document.querySelector("#pf-cc-iframe");if(!e)return f(!1),{type:p.ERROR,message:c.generic};const a={action:"pay",token:t.paymentDetails.bpf_token};e.contentWindow.postMessage(JSON.stringify(a),r);try{await w(5e3)}catch(e){return f(!1),{type:p.ERROR,message:c.generic}}return!!E||(f(!1),{type:p.ERROR,message:c.formInvalid})}return f(!1),{type:p.ERROR,message:c.generic}}));return()=>{e()}}),[p.ERROR,p.SUCCESS,d]),(0,e.useEffect)((()=>{const e=g((e=>(f(!1),!0)));return()=>{e()}}),[g]);const S=(0,e.createElement)("div",{id:"visma-pay-embedded-card-payment-content"},(0,e.createElement)("p",null,(0,t.__)("Payment card","visma-pay-embedded-card-payment-gateway")),(0,e.createElement)(i,null),(0,e.createElement)(m,null));return(0,e.createElement)(u,{isLoading:y,showSpinner:!0},S)};a({name:"visma_pay_embedded_card",label:(0,e.createElement)((t=>{const{PaymentMethodLabel:a}=t.components;return(0,e.createElement)(a,{text:s.title})}),null),ariaLabel:s.title,content:(0,e.createElement)(o,null),edit:(0,e.createElement)(o,null),canMakePayment:()=>!0,paymentMethodId:"visma_pay_embedded_card",supports:{features:s.supports}})}();1 (()=>{"use strict";const e=window.wp.element,t=window.wp.i18n,{registerPaymentMethod:a}=wc.wcBlocksRegistry,{getSetting:n}=wc.wcSettings,r="https://www.vismapay.com",s=n("vismapay_embedded_card_data",{}),c={generic:`${(0,t.__)("Something went wrong","visma-pay-embedded-card-payment-gateway")}.`,formInvalid:`${(0,t.__)("Please check the card information","visma-pay-embedded-card-payment-gateway")}.`},i=()=>(0,e.createElement)("div",{id:"pf-cc-form"},(0,e.createElement)("iframe",{scrolling:"no",id:"pf-cc-iframe",className:"intrinsic-ignore",height:"220px",style:{border:"none",width:"100%"},src:`${r}/e-payments/embedded_card_form?lang=${s.lang}`})),m=()=>(s.visa||s.master||s.amex||s.diners)&&(0,e.createElement)("div",{className:"vpe-card-brand-row"},s.visa&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(o,{imgSrc:"visa.png",imgAlt:"Visa",imgClassNames:"visa"}),(0,e.createElement)(o,{imgSrc:"verified.png",imgAlt:"Verified by Visa",imgClassNames:"verified"})),s.mastercard&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(o,{imgSrc:"mastercard.png",imgAlt:"MasterCard"}),(0,e.createElement)(o,{imgSrc:"securecode.png",imgAlt:"MasterCard SecureCode"})),s.amex&&(0,e.createElement)(o,{imgSrc:"americanexpress.png",imgAlt:"America Express"}),s.diners&&(0,e.createElement)(o,{imgSrc:"dinersclub.png",imgAlt:"Diners"}),(0,e.createElement)("div",{style:{display:"block",clear:"both"}})),l=()=>s.onlyAuthorize&&(0,e.createElement)("div",{className:"woocommerce-info"},(0,t.sprintf)((0,t.__)("An authorization of 1 %s will be made on your card to save your card details. The authorization will be automatically cancelled after the order has been accepted.","visma-pay-embedded-card-payment-gateway"),s.currency)),o=({imgSrc:t,imgAlt:a,imgClassNames:n=""})=>(0,e.createElement)("div",{className:"vpe-card-brand-container"},(0,e.createElement)("img",{className:`vpe-card-brand-logo ${n}`,src:`${s.imgUrl}/${t}`,alt:a})),d=({eventRegistration:a,emitResponse:n,components:s})=>{const{onCheckoutValidation:o,onPaymentSetup:d,onCheckoutSuccess:p,onCheckoutFail:g}=a,{responseTypes:u}=n,{LoadingMask:y}=s,[f,E]=(0,e.useState)(!1);let v=null;const w=e=>{if(e.origin!==r)return;let t=null;try{t=JSON.parse(e.data)}catch(e){}v=null!==t&&void 0!==t.valid&&!0===t.valid},S=async(e=3e3)=>{let t=!0,a=!1;for(setTimeout((()=>{null===v&&(t=!1)}),e);t&&!a;)if(null!==v)a=!0;else{const e=new Promise((e=>{setTimeout(e,100)}));await e}if(null===v)return Promise.reject()};(0,e.useEffect)((()=>(window.addEventListener("message",w),()=>{window.removeEventListener("message",w)})),[]),(0,e.useEffect)((()=>{const e=o((async()=>{E(!0);const e=document.querySelector("#pf-cc-iframe");if(!e)return E(!1),{errorMessage:c.generic};e.contentWindow.postMessage(JSON.stringify({action:"validate"}),r);try{await S()}catch(e){return E(!1),{errorMessage:c.generic}}return!!v||(E(!1),{errorMessage:c.formInvalid})}));return()=>{e()}}),[o]),(0,e.useEffect)((()=>{const e=d((()=>({type:u.SUCCESS,meta:{paymentMethodData:{payment_method:"visma_pay_embedded_card"}}})));return()=>{e()}}),[u.SUCCESS,d]),(0,e.useEffect)((()=>{const e=p((async e=>{const t=e?.processingResponse;if(t&&"success"===t?.paymentStatus&&"success"===t?.paymentDetails?.result&&t.paymentDetails.bpf_token){const e=document.querySelector("#pf-cc-iframe");if(!e)return E(!1),{type:u.ERROR,message:c.generic};const a={action:"pay",token:t.paymentDetails.bpf_token};e.contentWindow.postMessage(JSON.stringify(a),r);try{await S(5e3)}catch(e){return E(!1),{type:u.ERROR,message:c.generic}}return!!v||(E(!1),{type:u.ERROR,message:c.formInvalid})}return E(!1),{type:u.ERROR,message:c.generic}}));return()=>{e()}}),[u.ERROR,u.SUCCESS,p]),(0,e.useEffect)((()=>{const e=g((e=>(E(!1),!0)));return()=>{e()}}),[g]);const b=(0,e.createElement)("div",{id:"visma-pay-embedded-card-payment-content"},(0,e.createElement)("p",null,(0,t.__)("Payment card","visma-pay-embedded-card-payment-gateway")),(0,e.createElement)(l,null),(0,e.createElement)(i,null),(0,e.createElement)(m,null));return(0,e.createElement)(y,{isLoading:f,showSpinner:!0},b)};a({name:"visma_pay_embedded_card",label:(0,e.createElement)((t=>{const{PaymentMethodLabel:a}=t.components;return(0,e.createElement)(a,{text:s.title})}),null),ariaLabel:s.title,content:(0,e.createElement)(d,null),edit:(0,e.createElement)(d,null),canMakePayment:()=>!0,paymentMethodId:"visma_pay_embedded_card",supports:{features:s.supports}})})(); -
visma-pay-embedded-card-payment-gateway/trunk/includes/blocks/visma_pay_embedded_card_blocks_support.php
r2974591 r3253989 60 60 $amex = false; 61 61 $diners = false; 62 $only_authorize = false; 62 63 63 64 // blocks will also be rendered in the editor … … 69 70 $amex = $this->get_setting('amex_logo') === 'yes'; 70 71 $diners = $this->get_setting('diners_logo') === 'yes'; 72 $only_authorize = $this->gateway->visma_pay_cart_has_free_trial(); 71 73 } 72 74 … … 79 81 'amex' => $amex, 80 82 'diners' => $diners, 81 'supports' => array_filter($this->gateway->supports, [$this->gateway, 'supports']) 83 'supports' => array_filter($this->gateway->supports, [$this->gateway, 'supports']), 84 'onlyAuthorize' => $only_authorize, 85 'currency' => get_woocommerce_currency(), 82 86 ]; 83 87 } -
visma-pay-embedded-card-payment-gateway/trunk/includes/lib/Visma/VismaPay.php
r3149117 r3253989 71 71 $payment_data['plugin_info'] .= '0'; 72 72 73 $payment_data['plugin_info'] .= '|1.1. 5';73 $payment_data['plugin_info'] .= '|1.1.6'; 74 74 75 75 return $this->makeRequest($url, $payment_data); -
visma-pay-embedded-card-payment-gateway/trunk/languages/visma-pay-embedded-card-payment-gateway-fi-0a194271922d454324b7e88e0bfed673.json
r2974591 r3253989 1 {"translation-revision-date":"202 3-09-27 09:50+0300","generator":"WP-CLI\/2.8.1","source":"build\/blocks.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fi","plural-forms":"nplurals=2; plural=n != 1;"},"Payment card":["Maksukortti"],"Something went wrong":["Jokin meni pieleen"],"Please check the card information":["Tarkista maksukortin tiedot"]}}}1 {"translation-revision-date":"2025-03-06 12:46+0200","generator":"WP-CLI\/2.11.0","source":"build\/blocks.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fi","plural-forms":"nplurals=2; plural=n != 1;"},"Payment card":["Maksukortti"],"An authorization of 1 %s will be made on your card to save your card details. The authorization will be automatically cancelled after the order has been accepted.":["Kortillesi tehd\u00e4\u00e4n katevaraus (1 %s) korttitietojesi tallentamista varten. Katevaraus perutaan automaattisesti kun tilaus on hyv\u00e4ksytty."],"Something went wrong":["Jokin meni pieleen"],"Please check the card information":["Tarkista maksukortin tiedot"]}}} -
visma-pay-embedded-card-payment-gateway/trunk/languages/visma-pay-embedded-card-payment-gateway-fi.po
r2974591 r3253989 4 4 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/visma-pay-" 5 5 "embedded-card-payment-gateway\n" 6 "POT-Creation-Date: 202 3-10-03T13:10:45+00:00\n"7 "PO-Revision-Date: 202 3-10-03 16:11+0300\n"6 "POT-Creation-Date: 2025-03-06T10:35:29+00:00\n" 7 "PO-Revision-Date: 2025-03-06 12:46+0200\n" 8 8 "Last-Translator: Visma Pay <[email protected]>\n" 9 9 "Language-Team: Suomi\n" … … 13 13 "Content-Transfer-Encoding: 8bit\n" 14 14 "Plural-Forms: nplurals=2; plural=n != 1;\n" 15 "X-Generator: Poedit 3. 4\n"15 "X-Generator: Poedit 3.5\n" 16 16 "X-Loco-Version: 2.5.0; wp-5.6\n" 17 17 18 18 #. Plugin Name of the plugin 19 #: visma-pay-embedded-card-payment-gateway.php 19 20 msgid "Visma Pay Embedded Card Payment Gateway" 20 21 msgstr "Visma Pay (Upotettu korttimaksaminen) maksulisäosa" 21 22 22 23 #. Plugin URI of the plugin 24 #: visma-pay-embedded-card-payment-gateway.php 23 25 msgid "https://www.vismapay.com/docs" 24 26 msgstr "https://www.vismapay.com/docs" 25 27 26 28 #. Description of the plugin 29 #: visma-pay-embedded-card-payment-gateway.php 27 30 msgid "Visma Pay Payment Gateway Embedded Card Integration for Woocommerce" 28 31 msgstr "" … … 31 34 32 35 #. Author of the plugin 36 #: visma-pay-embedded-card-payment-gateway.php 33 37 msgid "Visma" 34 38 msgstr "Visma" 35 39 36 40 #. Author URI of the plugin 41 #: visma-pay-embedded-card-payment-gateway.php 37 42 msgid "https://www.visma.fi/vismapay/" 38 43 msgstr "https://www.visma.fi/vismapay/" 39 44 40 #: visma-pay-embedded-card-payment-gateway.php: 7741 #: visma-pay-embedded-card-payment-gateway.php:17 345 #: visma-pay-embedded-card-payment-gateway.php:80 46 #: visma-pay-embedded-card-payment-gateway.php:177 42 47 msgid "Visma Pay (Embedded Card)" 43 48 msgstr "Visma Pay (Upotettu korttimaksaminen)" 44 49 45 #: visma-pay-embedded-card-payment-gateway.php: 7850 #: visma-pay-embedded-card-payment-gateway.php:81 46 51 msgid "" 47 52 "Visma Pay (Embedded Card) w3-API Payment Gateway integration for Woocommerce" … … 50 55 "Woocommerceen" 51 56 52 #: visma-pay-embedded-card-payment-gateway.php:1 5957 #: visma-pay-embedded-card-payment-gateway.php:163 53 58 msgid "General options" 54 59 msgstr "Yleiset asetukset" 55 60 56 #: visma-pay-embedded-card-payment-gateway.php:16 461 #: visma-pay-embedded-card-payment-gateway.php:168 57 62 msgid "Enable/Disable" 58 63 msgstr "Ota käyttöön / Poista käytöstä" 59 64 60 #: visma-pay-embedded-card-payment-gateway.php:1 6665 #: visma-pay-embedded-card-payment-gateway.php:170 61 66 msgid "Enable Visma Pay (Embedded Card)" 62 67 msgstr "Ota Visma Pay (Upotettu korttimaksaminen) käyttöön" 63 68 64 #: visma-pay-embedded-card-payment-gateway.php:17 069 #: visma-pay-embedded-card-payment-gateway.php:174 65 70 msgid "Title" 66 71 msgstr "Otsikko" 67 72 68 #: visma-pay-embedded-card-payment-gateway.php:17 273 #: visma-pay-embedded-card-payment-gateway.php:176 69 74 msgid "This controls the title which the user sees during checkout." 70 75 msgstr "Maksutavan kassasivulla näkyvä otsikko." 71 76 72 #: visma-pay-embedded-card-payment-gateway.php:1 7677 #: visma-pay-embedded-card-payment-gateway.php:180 73 78 msgid "Private key" 74 79 msgstr "Yksityinen salausavain" 75 80 76 #: visma-pay-embedded-card-payment-gateway.php:1 7881 #: visma-pay-embedded-card-payment-gateway.php:182 77 82 msgid "Private key of the sub-merchant" 78 83 msgstr "Alikauppiaan yksityinen salausavain" 79 84 80 #: visma-pay-embedded-card-payment-gateway.php:18 285 #: visma-pay-embedded-card-payment-gateway.php:186 81 86 msgid "API key" 82 87 msgstr "Rajapinta-avain" 83 88 84 #: visma-pay-embedded-card-payment-gateway.php:18 489 #: visma-pay-embedded-card-payment-gateway.php:188 85 90 msgid "API key of the sub-merchant" 86 91 msgstr "Alikauppiaan yksityinen rajapinta-avain" 87 92 88 #: visma-pay-embedded-card-payment-gateway.php:1 8893 #: visma-pay-embedded-card-payment-gateway.php:192 89 94 msgid "Order number prefix" 90 95 msgstr "Tilausnumeron etuliite" 91 96 92 #: visma-pay-embedded-card-payment-gateway.php:19 097 #: visma-pay-embedded-card-payment-gateway.php:194 93 98 msgid "Prefix to avoid order number duplication" 94 99 msgstr "" … … 96 101 "kauppiastunnus on käytössä useassa verkkokaupassa. (Valinnainen)" 97 102 98 #: visma-pay-embedded-card-payment-gateway.php:19 4103 #: visma-pay-embedded-card-payment-gateway.php:198 99 104 msgid "Send products" 100 105 msgstr "Lähetä tuote-erittely" 101 106 102 #: visma-pay-embedded-card-payment-gateway.php: 196107 #: visma-pay-embedded-card-payment-gateway.php:200 103 108 msgid "Send product breakdown to Visma Pay (Embedded Card)." 104 109 msgstr "Lähetä tuote-erittely Visma Payn maksurajapintaan." 105 110 106 #: visma-pay-embedded-card-payment-gateway.php:20 0111 #: visma-pay-embedded-card-payment-gateway.php:204 107 112 msgid "Send payment confirmation" 108 113 msgstr "Maksuvahvistus" 109 114 110 #: visma-pay-embedded-card-payment-gateway.php:20 2115 #: visma-pay-embedded-card-payment-gateway.php:206 111 116 msgid "" 112 117 "Send Visma Pay (Embedded Card)'s payment confirmation email to the " … … 116 121 "maksutapahtumasta." 117 122 118 #: visma-pay-embedded-card-payment-gateway.php:2 06123 #: visma-pay-embedded-card-payment-gateway.php:210 119 124 msgid "Only allow payments in EUR" 120 125 msgstr "Salli maksaminen vain euroilla" 121 126 122 #: visma-pay-embedded-card-payment-gateway.php:2 08127 #: visma-pay-embedded-card-payment-gateway.php:212 123 128 msgid "Enable this option if you want to allow payments only in EUR." 124 129 msgstr "Ota asetus käyttöön jos haluat sallia maksaminen ainoastaan euroilla." 125 130 126 #: visma-pay-embedded-card-payment-gateway.php:212 131 #: visma-pay-embedded-card-payment-gateway.php:216 132 msgid "Allow free trial" 133 msgstr "Salli ilmainen kokeilu" 134 135 #: visma-pay-embedded-card-payment-gateway.php:218 136 msgid "Enable to allow using free trial on WC Subscription products" 137 msgstr "" 138 "Ota asetus käyttöön jos haluat sallia ilmaisen kokeilun kestotilauksissa (WC " 139 "Subscriptions)" 140 141 #: visma-pay-embedded-card-payment-gateway.php:219 142 msgid "" 143 "When this option is enabled, the plugin will create an authorization of 100 " 144 "fractional monetary units. The currency depends on your store's settings. " 145 "The authorization is required to save the payment card. After the order is " 146 "completed, the authorization will be automatically canceled. For example, " 147 "when using EUR, the authorization will be 1.00 EUR." 148 msgstr "" 149 "Kun tämä asetus on käytössä, liitännäinen luo 100 sentin katevarauksen. " 150 "Valuutta riippuu kaupan asetuksista. Katevaraus tarvitaan maksukortin " 151 "tallentamiseen. Kun tilaus on suoritettu, katevaraus peruutetaan " 152 "automaattisesti. Esimerkiksi käytettäessä euroa (EUR) katevarauksen summa on " 153 "1,00 EUR." 154 155 #: visma-pay-embedded-card-payment-gateway.php:223 127 156 msgid "Cancel Page" 128 157 msgstr "Peruutetun maksun paluusivu" 129 158 130 #: visma-pay-embedded-card-payment-gateway.php:2 15159 #: visma-pay-embedded-card-payment-gateway.php:226 131 160 msgid "" 132 161 "Choose the page where the customer is redirected after a canceled/failed " … … 136 165 "jälkeen." 137 166 138 #: visma-pay-embedded-card-payment-gateway.php:2 16167 #: visma-pay-embedded-card-payment-gateway.php:227 139 168 msgid "" 140 169 "Order Received: Shows the customer information about their order and a " … … 146 175 "maksamista uudelleen." 147 176 148 #: visma-pay-embedded-card-payment-gateway.php:2 17177 #: visma-pay-embedded-card-payment-gateway.php:228 149 178 msgid "" 150 179 "Pay for Order: Returns user to a page where they can try to pay their unpaid " … … 152 181 msgstr "" 153 182 "Maksa Tilaus: Siirtää asiakkaan sivulle jossa hän voi yrittää uudelleen " 154 "maksamattoman tilauksensa maksamista. "155 156 #: visma-pay-embedded-card-payment-gateway.php:2 18183 "maksamattoman tilauksensa maksamista. " 184 185 #: visma-pay-embedded-card-payment-gateway.php:229 157 186 msgid "Cart: Customer is redirected back to the shopping cart." 158 187 msgstr "Ostoskori: Asiakas siirretään takaisin ostoskori-sivulle." 159 188 160 #: visma-pay-embedded-card-payment-gateway.php:2 19189 #: visma-pay-embedded-card-payment-gateway.php:230 161 190 msgid "Checkout: Customer is redirected back to the checkout." 162 191 msgstr "Kassa: Asiakas siirretään takaisin verkkokaupan kassalle." 163 192 164 #: visma-pay-embedded-card-payment-gateway.php:2 20193 #: visma-pay-embedded-card-payment-gateway.php:231 165 194 msgid "" 166 195 "(When using Cart or Checkout as the return page for failed orders, the " … … 171 200 "yhteydessä )" 172 201 173 #: visma-pay-embedded-card-payment-gateway.php:2 23202 #: visma-pay-embedded-card-payment-gateway.php:234 174 203 msgid "Order Received" 175 204 msgstr "Tilaus vastaanotettu" 176 205 177 #: visma-pay-embedded-card-payment-gateway.php:2 24206 #: visma-pay-embedded-card-payment-gateway.php:235 178 207 msgid "Pay for Order" 179 208 msgstr "Maksa Tilaus" 180 209 181 #: visma-pay-embedded-card-payment-gateway.php:2 25210 #: visma-pay-embedded-card-payment-gateway.php:236 182 211 msgid "Cart" 183 212 msgstr "Ostoskori" 184 213 185 #: visma-pay-embedded-card-payment-gateway.php:2 26214 #: visma-pay-embedded-card-payment-gateway.php:237 186 215 msgid "Checkout" 187 216 msgstr "Kassa" 188 217 189 #: visma-pay-embedded-card-payment-gateway.php:2 30218 #: visma-pay-embedded-card-payment-gateway.php:241 190 219 msgid "Display card logos" 191 220 msgstr "Näytä maksukorttien logot" 192 221 193 #: visma-pay-embedded-card-payment-gateway.php:2 35222 #: visma-pay-embedded-card-payment-gateway.php:246 194 223 msgid "Visa" 195 224 msgstr "Visa" 196 225 197 #: visma-pay-embedded-card-payment-gateway.php:2 37226 #: visma-pay-embedded-card-payment-gateway.php:248 198 227 msgid "Display Visa and Verified by Visa logo below the form." 199 228 msgstr "Näytä Visa ja Verified by Visa logo maksulomakkeen alapuolelle." 200 229 201 #: visma-pay-embedded-card-payment-gateway.php:2 41230 #: visma-pay-embedded-card-payment-gateway.php:252 202 231 msgid "Mastercard" 203 232 msgstr "Mastercard" 204 233 205 #: visma-pay-embedded-card-payment-gateway.php:2 43234 #: visma-pay-embedded-card-payment-gateway.php:254 206 235 msgid "Display Mastercard and Mastercard SecureCode logo below the form." 207 236 msgstr "" 208 237 "Näytä Mastercard ja Mastercard SecureCode logo maksulomakkeen alapuolelle." 209 238 210 #: visma-pay-embedded-card-payment-gateway.php:2 47239 #: visma-pay-embedded-card-payment-gateway.php:258 211 240 msgid "American Express" 212 241 msgstr "American Express" 213 242 214 #: visma-pay-embedded-card-payment-gateway.php:2 49243 #: visma-pay-embedded-card-payment-gateway.php:260 215 244 msgid "Display American Express logo below the form." 216 245 msgstr "Näytä American Expressin logo maksulomakkeen alapuolelle." 217 246 218 #: visma-pay-embedded-card-payment-gateway.php:2 53247 #: visma-pay-embedded-card-payment-gateway.php:264 219 248 msgid "Diners Club" 220 249 msgstr "Diners Club" 221 250 222 #: visma-pay-embedded-card-payment-gateway.php:2 55251 #: visma-pay-embedded-card-payment-gateway.php:266 223 252 msgid "Display Diners Club logo below the form." 224 253 msgstr "Näytä Diners Clubin logo maksulomakkeen alapuolelle." 225 254 226 #: visma-pay-embedded-card-payment-gateway.php:2 74build/blocks.js:1255 #: visma-pay-embedded-card-payment-gateway.php:286 build/blocks.js:1 227 256 msgid "Payment card" 228 257 msgstr "Maksukortti" 229 258 230 #: visma-pay-embedded-card-payment-gateway.php:416 231 #: visma-pay-embedded-card-payment-gateway.php:417 232 #: visma-pay-embedded-card-payment-gateway.php:432 259 #: visma-pay-embedded-card-payment-gateway.php:293 build/blocks.js:1 260 msgid "" 261 "An authorization of 1 %s will be made on your card to save your card " 262 "details. The authorization will be automatically cancelled after the order " 263 "has been accepted." 264 msgstr "" 265 "Kortillesi tehdään katevaraus (1 %s) korttitietojesi tallentamista varten. " 266 "Katevaraus perutaan automaattisesti kun tilaus on hyväksytty." 267 268 #: visma-pay-embedded-card-payment-gateway.php:383 269 msgid "" 270 "Visma Pay (Embedded Card): Creating a temporary authorization to save card " 271 "token." 272 msgstr "" 273 "Visma Pay (Upotettu korttimaksaminen): Luodaan väliaikainen katevaraus " 274 "korttitokenin tallentamista varten." 275 276 #: visma-pay-embedded-card-payment-gateway.php:448 277 #: visma-pay-embedded-card-payment-gateway.php:449 278 #: visma-pay-embedded-card-payment-gateway.php:464 233 279 msgid "Visma Pay: No payment methods available for the currency: " 234 msgstr "Visma Pay: Ei sallittuja maksutapoja valuutalle: "235 236 #: visma-pay-embedded-card-payment-gateway.php:4 30280 msgstr "Visma Pay: Ei sallittuja maksutapoja valuutalle: " 281 282 #: visma-pay-embedded-card-payment-gateway.php:462 237 283 msgid "" 238 284 "Visma Pay: \"Only allow payments in EUR\" is enabled and currency was not " … … 240 286 msgstr "" 241 287 "Visma Pay: \"Salli maksaminen vain euroilla\"-asetus on käytössä ja valuutta " 242 "ei ollut EUR tilauksessa: "243 244 #: visma-pay-embedded-card-payment-gateway.php:4 43245 #: visma-pay-embedded-card-payment-gateway.php:6 05246 #: visma-pay-embedded-card-payment-gateway.php:6 07288 "ei ollut EUR tilauksessa: " 289 290 #: visma-pay-embedded-card-payment-gateway.php:475 291 #: visma-pay-embedded-card-payment-gateway.php:638 292 #: visma-pay-embedded-card-payment-gateway.php:640 247 293 msgid "Visma Pay (Embedded Card) order" 248 294 msgstr "Visma Pay (Upotettu korttimaksaminen) tilaus" 249 295 250 #: visma-pay-embedded-card-payment-gateway.php:4 43296 #: visma-pay-embedded-card-payment-gateway.php:475 251 297 msgid "Payment pending. Waiting for result." 252 298 msgstr "Maksaminen kesken. Odottaa tulosta." 253 299 254 #: visma-pay-embedded-card-payment-gateway.php:4 65300 #: visma-pay-embedded-card-payment-gateway.php:497 255 301 msgid "" 256 302 "Visma Pay (Embedded Card) system is currently in maintenance. Please try " … … 260 306 "kuluttua uudelleen." 261 307 262 #: visma-pay-embedded-card-payment-gateway.php: 471263 #: visma-pay-embedded-card-payment-gateway.php: 485308 #: visma-pay-embedded-card-payment-gateway.php:503 309 #: visma-pay-embedded-card-payment-gateway.php:517 264 310 msgid "Payment failed due to an error." 265 311 msgstr "Maksu epäonnistui - Tapahtui virhe." 266 312 267 #: visma-pay-embedded-card-payment-gateway.php: 573313 #: visma-pay-embedded-card-payment-gateway.php:604 268 314 msgid "Payment method: Card payment" 269 315 msgstr "Maksutapa: Korttimaksu" 270 316 271 #: visma-pay-embedded-card-payment-gateway.php: 574317 #: visma-pay-embedded-card-payment-gateway.php:605 272 318 msgid "Card payment info: " 273 319 msgstr "Korttimaksun lisätiedot: " 274 320 275 #: visma-pay-embedded-card-payment-gateway.php: 579321 #: visma-pay-embedded-card-payment-gateway.php:610 276 322 msgid "Verified: " 277 323 msgstr "Varmennus: " 278 324 279 #: visma-pay-embedded-card-payment-gateway.php: 582325 #: visma-pay-embedded-card-payment-gateway.php:613 280 326 msgid "Card country: " 281 327 msgstr "Kortin maakoodi: " 282 328 283 #: visma-pay-embedded-card-payment-gateway.php: 583329 #: visma-pay-embedded-card-payment-gateway.php:614 284 330 msgid "Client IP country: " 285 331 msgstr "Asiakkaan IP:n maakoodi: " 286 332 287 #: visma-pay-embedded-card-payment-gateway.php: 588333 #: visma-pay-embedded-card-payment-gateway.php:619 288 334 msgid "Error: " 289 335 msgstr "Virhe: " 290 336 291 #: visma-pay-embedded-card-payment-gateway.php: 593337 #: visma-pay-embedded-card-payment-gateway.php:624 292 338 msgid "Payment method: " 293 339 msgstr "Valittu maksutapa: " 294 340 295 #: visma-pay-embedded-card-payment-gateway.php:6 05296 #: visma-pay-embedded-card-payment-gateway.php: 894341 #: visma-pay-embedded-card-payment-gateway.php:638 342 #: visma-pay-embedded-card-payment-gateway.php:957 297 343 msgid "Payment is authorized. Use settle option to capture funds." 298 344 msgstr "" 299 345 "Maksu varmennettu. Maksu veloitetaan painamalla Veloita maksu -painiketta." 300 346 301 #: visma-pay-embedded-card-payment-gateway.php:6 07302 #: visma-pay-embedded-card-payment-gateway.php: 898347 #: visma-pay-embedded-card-payment-gateway.php:640 348 #: visma-pay-embedded-card-payment-gateway.php:961 303 349 msgid "Payment accepted." 304 msgstr "Maksu hyväksytty "305 306 #: visma-pay-embedded-card-payment-gateway.php:6 18350 msgstr "Maksu hyväksytty." 351 352 #: visma-pay-embedded-card-payment-gateway.php:651 307 353 msgid "Card token: " 308 msgstr "Korttitokeni: "309 310 #: visma-pay-embedded-card-payment-gateway.php:6 19354 msgstr "Korttitokeni: " 355 356 #: visma-pay-embedded-card-payment-gateway.php:652 311 357 msgid "Expiration: " 312 msgstr "Erääntyminen:" 313 314 #: visma-pay-embedded-card-payment-gateway.php:645 358 msgstr "Erääntyminen: " 359 360 #: visma-pay-embedded-card-payment-gateway.php:679 361 msgid "" 362 "Visma Pay (Embedded Card): Succesfully cancelled temporary authorization." 363 msgstr "" 364 "Visma Pay (Upotettu korttimaksaminen): Väliaikainen katevaraus peruttu " 365 "onnistuneesti." 366 367 #: visma-pay-embedded-card-payment-gateway.php:686 368 msgid "" 369 "Visma Pay (Embedded Card): Failed to cancel temporary authorization. You " 370 "should cancel the authorization using Visma Pay merchant portal." 371 msgstr "" 372 "Visma Pay (Upotettu korttimaksaminen): Katevarauksen peruminen epäonnistui. " 373 "Teidän tulisi perua katevaraus Visma Payn kauppiasportaalissa." 374 375 #: visma-pay-embedded-card-payment-gateway.php:708 315 376 msgid "Payment was not accepted." 316 377 msgstr "Maksu epäonnistui tai se keskeytettiin." 317 378 318 #: visma-pay-embedded-card-payment-gateway.php: 653379 #: visma-pay-embedded-card-payment-gateway.php:716 319 380 msgid "" 320 381 "Transaction status could not be updated after customer returned from the web " … … 325 386 "tila." 326 387 327 #: visma-pay-embedded-card-payment-gateway.php: 661388 #: visma-pay-embedded-card-payment-gateway.php:724 328 389 msgid "" 329 390 "Maintenance break. The transaction is not created and the user has been " … … 331 392 msgstr "Huoltotauko. Maksua ei luotu, ja asiakaalle on ilmoitettu asiasta." 332 393 333 #: visma-pay-embedded-card-payment-gateway.php: 691394 #: visma-pay-embedded-card-payment-gateway.php:754 334 395 msgid "Card payment failed. Your card has not been charged." 335 396 msgstr "" … … 337 398 "valitkaa jokin toinen maksutapa." 338 399 339 #: visma-pay-embedded-card-payment-gateway.php: 693400 #: visma-pay-embedded-card-payment-gateway.php:756 340 401 msgid "Payment was canceled or charge was not accepted." 341 402 msgstr "Maksu keskeytettiin tai maksun veloitus epäonnistui." 342 403 343 #: visma-pay-embedded-card-payment-gateway.php:7 22404 #: visma-pay-embedded-card-payment-gateway.php:785 344 405 msgid "The card is reported lost or stolen." 345 406 msgstr "Kortti on ilmoitettu kadonneeksi tai varastetuksi." 346 407 347 #: visma-pay-embedded-card-payment-gateway.php:7 24408 #: visma-pay-embedded-card-payment-gateway.php:787 348 409 msgid "" 349 410 "General decline. The card holder should contact the issuer to find out why " … … 353 414 "selvittääkseen miksi maksu epäonnistui." 354 415 355 #: visma-pay-embedded-card-payment-gateway.php:7 26416 #: visma-pay-embedded-card-payment-gateway.php:789 356 417 msgid "" 357 418 "Insufficient funds. The card holder should verify that there is balance on " … … 361 422 "katetta ja verkkomaksaminen on aktivoitu kortille." 362 423 363 #: visma-pay-embedded-card-payment-gateway.php:7 28424 #: visma-pay-embedded-card-payment-gateway.php:791 364 425 msgid "Expired card." 365 426 msgstr "Vanhentunut kortti." 366 427 367 #: visma-pay-embedded-card-payment-gateway.php:7 30428 #: visma-pay-embedded-card-payment-gateway.php:793 368 429 msgid "Withdrawal amount limit exceeded." 369 430 msgstr "Kortin maksuraja ylittyi." 370 431 371 #: visma-pay-embedded-card-payment-gateway.php:7 32432 #: visma-pay-embedded-card-payment-gateway.php:795 372 433 msgid "" 373 434 "Restricted card. The card holder should verify that the online payments are " … … 377 438 "aktivoitu kortille." 378 439 379 #: visma-pay-embedded-card-payment-gateway.php:7 34440 #: visma-pay-embedded-card-payment-gateway.php:797 380 441 msgid "" 381 442 "Timeout communicating with the acquirer. The payment should be tried again " … … 384 445 "Yhteysongelma korttimaksujen prosessoijaan. Maksua tulisi yrittää uudelleen." 385 446 386 #: visma-pay-embedded-card-payment-gateway.php: 745447 #: visma-pay-embedded-card-payment-gateway.php:808 387 448 msgid "3-D Secure was used." 388 449 msgstr "3-D Secure varmennettu tapahtuma." 389 450 390 #: visma-pay-embedded-card-payment-gateway.php: 747451 #: visma-pay-embedded-card-payment-gateway.php:810 391 452 msgid "3-D Secure was not used." 392 453 msgstr "3-D Secure varmennusta ei käytetty." 393 454 394 #: visma-pay-embedded-card-payment-gateway.php: 749455 #: visma-pay-embedded-card-payment-gateway.php:812 395 456 msgid "" 396 457 "3-D Secure was attempted but not supported by the card issuer or the card " … … 400 461 "käytä varmennusta." 401 462 402 #: visma-pay-embedded-card-payment-gateway.php: 774463 #: visma-pay-embedded-card-payment-gateway.php:837 403 464 msgid "Payment settled." 404 465 msgstr "Maksu veloitettu." 405 466 406 #: visma-pay-embedded-card-payment-gateway.php: 792467 #: visma-pay-embedded-card-payment-gateway.php:855 407 468 msgid "Settle payment" 408 469 msgstr "Veloita maksu" 409 470 410 #: visma-pay-embedded-card-payment-gateway.php:8 16471 #: visma-pay-embedded-card-payment-gateway.php:879 411 472 msgid "Settlement was successful." 412 473 msgstr "Maksu veloitettiin onnistuneesti." 413 474 414 #: visma-pay-embedded-card-payment-gateway.php:8 19475 #: visma-pay-embedded-card-payment-gateway.php:882 415 476 msgid "Settlement failed. Validation failed." 416 477 msgstr "Veloitus epäonnistui. Validointi epäonnistui." 417 478 418 #: visma-pay-embedded-card-payment-gateway.php:8 22479 #: visma-pay-embedded-card-payment-gateway.php:885 419 480 msgid "" 420 481 "Settlement failed. Either the payment has already been settled or the " … … 422 483 msgstr "" 423 484 "Maksua ei voitu veloittaa. Joko maksu on jo veloitettu, tai luottolaitos " 424 "hylkäsi veloituspyynnön "425 426 #: visma-pay-embedded-card-payment-gateway.php:8 25485 "hylkäsi veloituspyynnön." 486 487 #: visma-pay-embedded-card-payment-gateway.php:888 427 488 msgid "Settlement failed. Unknown error." 428 489 msgstr "" … … 430 491 "asiakaspalveluumme." 431 492 432 #: visma-pay-embedded-card-payment-gateway.php:8 32493 #: visma-pay-embedded-card-payment-gateway.php:895 433 494 msgid "Exception, error: " 434 495 msgstr "Exception, virhe: " 435 496 436 #: visma-pay-embedded-card-payment-gateway.php: 894437 #: visma-pay-embedded-card-payment-gateway.php: 898497 #: visma-pay-embedded-card-payment-gateway.php:957 498 #: visma-pay-embedded-card-payment-gateway.php:961 438 499 msgid "Visma Pay (Embedded Card, Subscription) order" 439 500 msgstr "Visma Pay (Upotettu korttimaksaminen, Subscription) tilaus" 440 501 441 #: visma-pay-embedded-card-payment-gateway.php:9 07502 #: visma-pay-embedded-card-payment-gateway.php:970 442 503 msgid "Duplicate order number." 443 msgstr "Duplikaatti tilausnumero "444 445 #: visma-pay-embedded-card-payment-gateway.php:9 11504 msgstr "Duplikaatti tilausnumero." 505 506 #: visma-pay-embedded-card-payment-gateway.php:974 446 507 msgid "Card token not found." 447 508 msgstr "Korttitokenia ei löytynyt." 448 509 449 #: visma-pay-embedded-card-payment-gateway.php:9 36510 #: visma-pay-embedded-card-payment-gateway.php:999 450 511 msgid "Payment failed. The card was not charged. Error: " 451 512 msgstr "Maksu epäonnistui. Korttia ei veloitettu. Virhe: " 452 513 453 #: visma-pay-embedded-card-payment-gateway.php:9 36514 #: visma-pay-embedded-card-payment-gateway.php:999 454 515 msgid "Payment failed. The card was not charged." 455 516 msgstr "Maksu epäonnistui. Korttia ei veloitettu." 456 517 457 #: visma-pay-embedded-card-payment-gateway.php: 945518 #: visma-pay-embedded-card-payment-gateway.php:1008 458 519 msgid "Payment failed. Exception: " 459 520 msgstr "Maksu epäonnistui. Exception: " 460 521 461 #: visma-pay-embedded-card-payment-gateway.php: 983522 #: visma-pay-embedded-card-payment-gateway.php:1046 462 523 msgid "Failed to delete the card token %s. Return code: %s" 463 524 msgstr "Korttitokenin %s poisto epäonnistui. Paluukoodi: %s" 464 525 465 #: visma-pay-embedded-card-payment-gateway.php: 988526 #: visma-pay-embedded-card-payment-gateway.php:1051 466 527 msgid "Failed to delete the card token %s. Exception: %s" 467 528 msgstr "Korttitokenin %s poisto epäonnistui. Exception: %s" -
visma-pay-embedded-card-payment-gateway/trunk/languages/visma-pay-embedded-card-payment-gateway.pot
r2974591 r3253989 1 # Copyright (C) 202 3Visma1 # Copyright (C) 2025 Visma 2 2 # This file is distributed under the same license as the Visma Pay Embedded Card Payment Gateway plugin. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Visma Pay Embedded Card Payment Gateway 1.1. 2\n"5 "Project-Id-Version: Visma Pay Embedded Card Payment Gateway 1.1.6\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/visma-pay-embedded-card-payment-gateway\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 3-10-03T13:10:45+00:00\n"12 "POT-Creation-Date: 2025-03-06T10:35:29+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2. 8.1\n"14 "X-Generator: WP-CLI 2.11.0\n" 15 15 "X-Domain: visma-pay-embedded-card-payment-gateway\n" 16 16 17 17 #. Plugin Name of the plugin 18 #: visma-pay-embedded-card-payment-gateway.php 18 19 msgid "Visma Pay Embedded Card Payment Gateway" 19 20 msgstr "" 20 21 21 22 #. Plugin URI of the plugin 23 #: visma-pay-embedded-card-payment-gateway.php 22 24 msgid "https://www.vismapay.com/docs" 23 25 msgstr "" 24 26 25 27 #. Description of the plugin 28 #: visma-pay-embedded-card-payment-gateway.php 26 29 msgid "Visma Pay Payment Gateway Embedded Card Integration for Woocommerce" 27 30 msgstr "" 28 31 29 32 #. Author of the plugin 33 #: visma-pay-embedded-card-payment-gateway.php 30 34 msgid "Visma" 31 35 msgstr "" 32 36 33 37 #. Author URI of the plugin 38 #: visma-pay-embedded-card-payment-gateway.php 34 39 msgid "https://www.visma.fi/vismapay/" 35 40 msgstr "" 36 41 37 #: visma-pay-embedded-card-payment-gateway.php: 7738 #: visma-pay-embedded-card-payment-gateway.php:17 342 #: visma-pay-embedded-card-payment-gateway.php:80 43 #: visma-pay-embedded-card-payment-gateway.php:177 39 44 msgid "Visma Pay (Embedded Card)" 40 45 msgstr "" 41 46 42 #: visma-pay-embedded-card-payment-gateway.php: 7847 #: visma-pay-embedded-card-payment-gateway.php:81 43 48 msgid "Visma Pay (Embedded Card) w3-API Payment Gateway integration for Woocommerce" 44 49 msgstr "" 45 50 46 #: visma-pay-embedded-card-payment-gateway.php:1 5951 #: visma-pay-embedded-card-payment-gateway.php:163 47 52 msgid "General options" 48 53 msgstr "" 49 54 50 #: visma-pay-embedded-card-payment-gateway.php:16 455 #: visma-pay-embedded-card-payment-gateway.php:168 51 56 msgid "Enable/Disable" 52 57 msgstr "" 53 58 54 #: visma-pay-embedded-card-payment-gateway.php:1 6659 #: visma-pay-embedded-card-payment-gateway.php:170 55 60 msgid "Enable Visma Pay (Embedded Card)" 56 61 msgstr "" 57 62 58 #: visma-pay-embedded-card-payment-gateway.php:17 063 #: visma-pay-embedded-card-payment-gateway.php:174 59 64 msgid "Title" 60 65 msgstr "" 61 66 62 #: visma-pay-embedded-card-payment-gateway.php:17 267 #: visma-pay-embedded-card-payment-gateway.php:176 63 68 msgid "This controls the title which the user sees during checkout." 64 69 msgstr "" 65 70 66 #: visma-pay-embedded-card-payment-gateway.php:1 7671 #: visma-pay-embedded-card-payment-gateway.php:180 67 72 msgid "Private key" 68 73 msgstr "" 69 74 70 #: visma-pay-embedded-card-payment-gateway.php:1 7875 #: visma-pay-embedded-card-payment-gateway.php:182 71 76 msgid "Private key of the sub-merchant" 72 77 msgstr "" 73 78 74 #: visma-pay-embedded-card-payment-gateway.php:18 279 #: visma-pay-embedded-card-payment-gateway.php:186 75 80 msgid "API key" 76 81 msgstr "" 77 82 78 #: visma-pay-embedded-card-payment-gateway.php:18 483 #: visma-pay-embedded-card-payment-gateway.php:188 79 84 msgid "API key of the sub-merchant" 80 85 msgstr "" 81 86 82 #: visma-pay-embedded-card-payment-gateway.php:1 8887 #: visma-pay-embedded-card-payment-gateway.php:192 83 88 msgid "Order number prefix" 84 89 msgstr "" 85 90 86 #: visma-pay-embedded-card-payment-gateway.php:19 091 #: visma-pay-embedded-card-payment-gateway.php:194 87 92 msgid "Prefix to avoid order number duplication" 88 93 msgstr "" 89 94 90 #: visma-pay-embedded-card-payment-gateway.php:19 495 #: visma-pay-embedded-card-payment-gateway.php:198 91 96 msgid "Send products" 92 97 msgstr "" 93 98 94 #: visma-pay-embedded-card-payment-gateway.php: 19699 #: visma-pay-embedded-card-payment-gateway.php:200 95 100 msgid "Send product breakdown to Visma Pay (Embedded Card)." 96 101 msgstr "" 97 102 98 #: visma-pay-embedded-card-payment-gateway.php:20 0103 #: visma-pay-embedded-card-payment-gateway.php:204 99 104 msgid "Send payment confirmation" 100 105 msgstr "" 101 106 102 #: visma-pay-embedded-card-payment-gateway.php:20 2107 #: visma-pay-embedded-card-payment-gateway.php:206 103 108 msgid "Send Visma Pay (Embedded Card)'s payment confirmation email to the customer's billing e-mail." 104 109 msgstr "" 105 110 106 #: visma-pay-embedded-card-payment-gateway.php:2 06111 #: visma-pay-embedded-card-payment-gateway.php:210 107 112 msgid "Only allow payments in EUR" 108 113 msgstr "" 109 114 110 #: visma-pay-embedded-card-payment-gateway.php:2 08115 #: visma-pay-embedded-card-payment-gateway.php:212 111 116 msgid "Enable this option if you want to allow payments only in EUR." 112 117 msgstr "" 113 118 114 #: visma-pay-embedded-card-payment-gateway.php:212 119 #: visma-pay-embedded-card-payment-gateway.php:216 120 msgid "Allow free trial" 121 msgstr "" 122 123 #: visma-pay-embedded-card-payment-gateway.php:218 124 msgid "Enable to allow using free trial on WC Subscription products" 125 msgstr "" 126 127 #: visma-pay-embedded-card-payment-gateway.php:219 128 msgid "When this option is enabled, the plugin will create an authorization of 100 fractional monetary units. The currency depends on your store's settings. The authorization is required to save the payment card. After the order is completed, the authorization will be automatically canceled. For example, when using EUR, the authorization will be 1.00 EUR." 129 msgstr "" 130 131 #: visma-pay-embedded-card-payment-gateway.php:223 115 132 msgid "Cancel Page" 116 133 msgstr "" 117 134 118 #: visma-pay-embedded-card-payment-gateway.php:2 15135 #: visma-pay-embedded-card-payment-gateway.php:226 119 136 msgid "Choose the page where the customer is redirected after a canceled/failed payment." 120 137 msgstr "" 121 138 122 #: visma-pay-embedded-card-payment-gateway.php:2 16139 #: visma-pay-embedded-card-payment-gateway.php:227 123 140 msgid "Order Received: Shows the customer information about their order and a notice that the payment failed. Customer has an opportunity to try payment again." 124 141 msgstr "" 125 142 126 #: visma-pay-embedded-card-payment-gateway.php:2 17143 #: visma-pay-embedded-card-payment-gateway.php:228 127 144 msgid "Pay for Order: Returns user to a page where they can try to pay their unpaid order again. " 128 145 msgstr "" 129 146 130 #: visma-pay-embedded-card-payment-gateway.php:2 18147 #: visma-pay-embedded-card-payment-gateway.php:229 131 148 msgid "Cart: Customer is redirected back to the shopping cart." 132 149 msgstr "" 133 150 134 #: visma-pay-embedded-card-payment-gateway.php:2 19151 #: visma-pay-embedded-card-payment-gateway.php:230 135 152 msgid "Checkout: Customer is redirected back to the checkout." 136 153 msgstr "" 137 154 138 #: visma-pay-embedded-card-payment-gateway.php:2 20155 #: visma-pay-embedded-card-payment-gateway.php:231 139 156 msgid "(When using Cart or Checkout as the return page for failed orders, the customer's cart will not be emptied during checkout.)" 140 157 msgstr "" 141 158 142 #: visma-pay-embedded-card-payment-gateway.php:2 23159 #: visma-pay-embedded-card-payment-gateway.php:234 143 160 msgid "Order Received" 144 161 msgstr "" 145 162 146 #: visma-pay-embedded-card-payment-gateway.php:2 24163 #: visma-pay-embedded-card-payment-gateway.php:235 147 164 msgid "Pay for Order" 148 165 msgstr "" 149 166 150 #: visma-pay-embedded-card-payment-gateway.php:2 25167 #: visma-pay-embedded-card-payment-gateway.php:236 151 168 msgid "Cart" 152 169 msgstr "" 153 170 154 #: visma-pay-embedded-card-payment-gateway.php:2 26171 #: visma-pay-embedded-card-payment-gateway.php:237 155 172 msgid "Checkout" 156 173 msgstr "" 157 174 158 #: visma-pay-embedded-card-payment-gateway.php:2 30175 #: visma-pay-embedded-card-payment-gateway.php:241 159 176 msgid "Display card logos" 160 177 msgstr "" 161 178 162 #: visma-pay-embedded-card-payment-gateway.php:2 35179 #: visma-pay-embedded-card-payment-gateway.php:246 163 180 msgid "Visa" 164 181 msgstr "" 165 182 166 #: visma-pay-embedded-card-payment-gateway.php:2 37183 #: visma-pay-embedded-card-payment-gateway.php:248 167 184 msgid "Display Visa and Verified by Visa logo below the form." 168 185 msgstr "" 169 186 170 #: visma-pay-embedded-card-payment-gateway.php:2 41187 #: visma-pay-embedded-card-payment-gateway.php:252 171 188 msgid "Mastercard" 172 189 msgstr "" 173 190 174 #: visma-pay-embedded-card-payment-gateway.php:2 43191 #: visma-pay-embedded-card-payment-gateway.php:254 175 192 msgid "Display Mastercard and Mastercard SecureCode logo below the form." 176 193 msgstr "" 177 194 178 #: visma-pay-embedded-card-payment-gateway.php:2 47195 #: visma-pay-embedded-card-payment-gateway.php:258 179 196 msgid "American Express" 180 197 msgstr "" 181 198 182 #: visma-pay-embedded-card-payment-gateway.php:2 49199 #: visma-pay-embedded-card-payment-gateway.php:260 183 200 msgid "Display American Express logo below the form." 184 201 msgstr "" 185 202 186 #: visma-pay-embedded-card-payment-gateway.php:2 53203 #: visma-pay-embedded-card-payment-gateway.php:264 187 204 msgid "Diners Club" 188 205 msgstr "" 189 206 190 #: visma-pay-embedded-card-payment-gateway.php:2 55207 #: visma-pay-embedded-card-payment-gateway.php:266 191 208 msgid "Display Diners Club logo below the form." 192 209 msgstr "" 193 210 194 #: visma-pay-embedded-card-payment-gateway.php:2 74211 #: visma-pay-embedded-card-payment-gateway.php:286 195 212 #: build/blocks.js:1 196 213 msgid "Payment card" 197 214 msgstr "" 198 215 199 #: visma-pay-embedded-card-payment-gateway.php:416 200 #: visma-pay-embedded-card-payment-gateway.php:417 201 #: visma-pay-embedded-card-payment-gateway.php:432 216 #: visma-pay-embedded-card-payment-gateway.php:293 217 #: build/blocks.js:1 218 msgid "An authorization of 1 %s will be made on your card to save your card details. The authorization will be automatically cancelled after the order has been accepted." 219 msgstr "" 220 221 #: visma-pay-embedded-card-payment-gateway.php:383 222 msgid "Visma Pay (Embedded Card): Creating a temporary authorization to save card token." 223 msgstr "" 224 225 #: visma-pay-embedded-card-payment-gateway.php:448 226 #: visma-pay-embedded-card-payment-gateway.php:449 227 #: visma-pay-embedded-card-payment-gateway.php:464 202 228 msgid "Visma Pay: No payment methods available for the currency: " 203 229 msgstr "" 204 230 205 #: visma-pay-embedded-card-payment-gateway.php:4 30231 #: visma-pay-embedded-card-payment-gateway.php:462 206 232 msgid "Visma Pay: \"Only allow payments in EUR\" is enabled and currency was not EUR for order: " 207 233 msgstr "" 208 234 209 #: visma-pay-embedded-card-payment-gateway.php:443 235 #: visma-pay-embedded-card-payment-gateway.php:475 236 #: visma-pay-embedded-card-payment-gateway.php:638 237 #: visma-pay-embedded-card-payment-gateway.php:640 238 msgid "Visma Pay (Embedded Card) order" 239 msgstr "" 240 241 #: visma-pay-embedded-card-payment-gateway.php:475 242 msgid "Payment pending. Waiting for result." 243 msgstr "" 244 245 #: visma-pay-embedded-card-payment-gateway.php:497 246 msgid "Visma Pay (Embedded Card) system is currently in maintenance. Please try again in a few minutes." 247 msgstr "" 248 249 #: visma-pay-embedded-card-payment-gateway.php:503 250 #: visma-pay-embedded-card-payment-gateway.php:517 251 msgid "Payment failed due to an error." 252 msgstr "" 253 254 #: visma-pay-embedded-card-payment-gateway.php:604 255 msgid "Payment method: Card payment" 256 msgstr "" 257 210 258 #: visma-pay-embedded-card-payment-gateway.php:605 211 #: visma-pay-embedded-card-payment-gateway.php:607212 msgid "Visma Pay (Embedded Card) order"213 msgstr ""214 215 #: visma-pay-embedded-card-payment-gateway.php:443216 msgid "Payment pending. Waiting for result."217 msgstr ""218 219 #: visma-pay-embedded-card-payment-gateway.php:465220 msgid "Visma Pay (Embedded Card) system is currently in maintenance. Please try again in a few minutes."221 msgstr ""222 223 #: visma-pay-embedded-card-payment-gateway.php:471224 #: visma-pay-embedded-card-payment-gateway.php:485225 msgid "Payment failed due to an error."226 msgstr ""227 228 #: visma-pay-embedded-card-payment-gateway.php:573229 msgid "Payment method: Card payment"230 msgstr ""231 232 #: visma-pay-embedded-card-payment-gateway.php:574233 259 msgid "Card payment info: " 234 260 msgstr "" 235 261 236 #: visma-pay-embedded-card-payment-gateway.php: 579262 #: visma-pay-embedded-card-payment-gateway.php:610 237 263 msgid "Verified: " 238 264 msgstr "" 239 265 240 #: visma-pay-embedded-card-payment-gateway.php: 582266 #: visma-pay-embedded-card-payment-gateway.php:613 241 267 msgid "Card country: " 242 268 msgstr "" 243 269 244 #: visma-pay-embedded-card-payment-gateway.php: 583270 #: visma-pay-embedded-card-payment-gateway.php:614 245 271 msgid "Client IP country: " 246 272 msgstr "" 247 273 248 #: visma-pay-embedded-card-payment-gateway.php: 588274 #: visma-pay-embedded-card-payment-gateway.php:619 249 275 msgid "Error: " 250 276 msgstr "" 251 277 252 #: visma-pay-embedded-card-payment-gateway.php: 593278 #: visma-pay-embedded-card-payment-gateway.php:624 253 279 msgid "Payment method: " 254 280 msgstr "" 255 281 256 #: visma-pay-embedded-card-payment-gateway.php:6 05257 #: visma-pay-embedded-card-payment-gateway.php: 894282 #: visma-pay-embedded-card-payment-gateway.php:638 283 #: visma-pay-embedded-card-payment-gateway.php:957 258 284 msgid "Payment is authorized. Use settle option to capture funds." 259 285 msgstr "" 260 286 261 #: visma-pay-embedded-card-payment-gateway.php:6 07262 #: visma-pay-embedded-card-payment-gateway.php: 898287 #: visma-pay-embedded-card-payment-gateway.php:640 288 #: visma-pay-embedded-card-payment-gateway.php:961 263 289 msgid "Payment accepted." 264 290 msgstr "" 265 291 266 #: visma-pay-embedded-card-payment-gateway.php:6 18292 #: visma-pay-embedded-card-payment-gateway.php:651 267 293 msgid "Card token: " 268 294 msgstr "" 269 295 270 #: visma-pay-embedded-card-payment-gateway.php:6 19296 #: visma-pay-embedded-card-payment-gateway.php:652 271 297 msgid "Expiration: " 272 298 msgstr "" 273 299 274 #: visma-pay-embedded-card-payment-gateway.php:645 300 #: visma-pay-embedded-card-payment-gateway.php:679 301 msgid "Visma Pay (Embedded Card): Succesfully cancelled temporary authorization." 302 msgstr "" 303 304 #: visma-pay-embedded-card-payment-gateway.php:686 305 msgid "Visma Pay (Embedded Card): Failed to cancel temporary authorization. You should cancel the authorization using Visma Pay merchant portal." 306 msgstr "" 307 308 #: visma-pay-embedded-card-payment-gateway.php:708 275 309 msgid "Payment was not accepted." 276 310 msgstr "" 277 311 278 #: visma-pay-embedded-card-payment-gateway.php: 653312 #: visma-pay-embedded-card-payment-gateway.php:716 279 313 msgid "Transaction status could not be updated after customer returned from the web page of a bank. Please use the merchant UI to resolve the payment status." 280 314 msgstr "" 281 315 282 #: visma-pay-embedded-card-payment-gateway.php: 661316 #: visma-pay-embedded-card-payment-gateway.php:724 283 317 msgid "Maintenance break. The transaction is not created and the user has been notified and transferred back to the cancel address." 284 318 msgstr "" 285 319 286 #: visma-pay-embedded-card-payment-gateway.php: 691320 #: visma-pay-embedded-card-payment-gateway.php:754 287 321 msgid "Card payment failed. Your card has not been charged." 288 322 msgstr "" 289 323 290 #: visma-pay-embedded-card-payment-gateway.php: 693324 #: visma-pay-embedded-card-payment-gateway.php:756 291 325 msgid "Payment was canceled or charge was not accepted." 292 326 msgstr "" 293 327 294 #: visma-pay-embedded-card-payment-gateway.php:7 22328 #: visma-pay-embedded-card-payment-gateway.php:785 295 329 msgid "The card is reported lost or stolen." 296 330 msgstr "" 297 331 298 #: visma-pay-embedded-card-payment-gateway.php:7 24332 #: visma-pay-embedded-card-payment-gateway.php:787 299 333 msgid "General decline. The card holder should contact the issuer to find out why the payment failed." 300 334 msgstr "" 301 335 302 #: visma-pay-embedded-card-payment-gateway.php:7 26336 #: visma-pay-embedded-card-payment-gateway.php:789 303 337 msgid "Insufficient funds. The card holder should verify that there is balance on the account and the online payments are actived." 304 338 msgstr "" 305 339 306 #: visma-pay-embedded-card-payment-gateway.php:7 28340 #: visma-pay-embedded-card-payment-gateway.php:791 307 341 msgid "Expired card." 308 342 msgstr "" 309 343 310 #: visma-pay-embedded-card-payment-gateway.php:7 30344 #: visma-pay-embedded-card-payment-gateway.php:793 311 345 msgid "Withdrawal amount limit exceeded." 312 346 msgstr "" 313 347 314 #: visma-pay-embedded-card-payment-gateway.php:7 32348 #: visma-pay-embedded-card-payment-gateway.php:795 315 349 msgid "Restricted card. The card holder should verify that the online payments are actived." 316 350 msgstr "" 317 351 318 #: visma-pay-embedded-card-payment-gateway.php:7 34352 #: visma-pay-embedded-card-payment-gateway.php:797 319 353 msgid "Timeout communicating with the acquirer. The payment should be tried again later." 320 354 msgstr "" 321 355 322 #: visma-pay-embedded-card-payment-gateway.php: 745356 #: visma-pay-embedded-card-payment-gateway.php:808 323 357 msgid "3-D Secure was used." 324 358 msgstr "" 325 359 326 #: visma-pay-embedded-card-payment-gateway.php: 747360 #: visma-pay-embedded-card-payment-gateway.php:810 327 361 msgid "3-D Secure was not used." 328 362 msgstr "" 329 363 330 #: visma-pay-embedded-card-payment-gateway.php: 749364 #: visma-pay-embedded-card-payment-gateway.php:812 331 365 msgid "3-D Secure was attempted but not supported by the card issuer or the card holder is not participating." 332 366 msgstr "" 333 367 334 #: visma-pay-embedded-card-payment-gateway.php: 774368 #: visma-pay-embedded-card-payment-gateway.php:837 335 369 msgid "Payment settled." 336 370 msgstr "" 337 371 338 #: visma-pay-embedded-card-payment-gateway.php: 792372 #: visma-pay-embedded-card-payment-gateway.php:855 339 373 msgid "Settle payment" 340 374 msgstr "" 341 375 342 #: visma-pay-embedded-card-payment-gateway.php:8 16376 #: visma-pay-embedded-card-payment-gateway.php:879 343 377 msgid "Settlement was successful." 344 378 msgstr "" 345 379 346 #: visma-pay-embedded-card-payment-gateway.php:8 19380 #: visma-pay-embedded-card-payment-gateway.php:882 347 381 msgid "Settlement failed. Validation failed." 348 382 msgstr "" 349 383 350 #: visma-pay-embedded-card-payment-gateway.php:8 22384 #: visma-pay-embedded-card-payment-gateway.php:885 351 385 msgid "Settlement failed. Either the payment has already been settled or the payment gateway refused to settle payment for given transaction." 352 386 msgstr "" 353 387 354 #: visma-pay-embedded-card-payment-gateway.php:8 25388 #: visma-pay-embedded-card-payment-gateway.php:888 355 389 msgid "Settlement failed. Unknown error." 356 390 msgstr "" 357 391 358 #: visma-pay-embedded-card-payment-gateway.php:8 32392 #: visma-pay-embedded-card-payment-gateway.php:895 359 393 msgid "Exception, error: " 360 394 msgstr "" 361 395 362 #: visma-pay-embedded-card-payment-gateway.php: 894363 #: visma-pay-embedded-card-payment-gateway.php: 898396 #: visma-pay-embedded-card-payment-gateway.php:957 397 #: visma-pay-embedded-card-payment-gateway.php:961 364 398 msgid "Visma Pay (Embedded Card, Subscription) order" 365 399 msgstr "" 366 400 367 #: visma-pay-embedded-card-payment-gateway.php:9 07401 #: visma-pay-embedded-card-payment-gateway.php:970 368 402 msgid "Duplicate order number." 369 403 msgstr "" 370 404 371 #: visma-pay-embedded-card-payment-gateway.php:9 11405 #: visma-pay-embedded-card-payment-gateway.php:974 372 406 msgid "Card token not found." 373 407 msgstr "" 374 408 375 #: visma-pay-embedded-card-payment-gateway.php:9 36409 #: visma-pay-embedded-card-payment-gateway.php:999 376 410 msgid "Payment failed. The card was not charged. Error: " 377 411 msgstr "" 378 412 379 #: visma-pay-embedded-card-payment-gateway.php:9 36413 #: visma-pay-embedded-card-payment-gateway.php:999 380 414 msgid "Payment failed. The card was not charged." 381 415 msgstr "" 382 416 383 #: visma-pay-embedded-card-payment-gateway.php: 945417 #: visma-pay-embedded-card-payment-gateway.php:1008 384 418 msgid "Payment failed. Exception: " 385 419 msgstr "" 386 420 387 #: visma-pay-embedded-card-payment-gateway.php: 983421 #: visma-pay-embedded-card-payment-gateway.php:1046 388 422 msgid "Failed to delete the card token %s. Return code: %s" 389 423 msgstr "" 390 424 391 #: visma-pay-embedded-card-payment-gateway.php: 988425 #: visma-pay-embedded-card-payment-gateway.php:1051 392 426 msgid "Failed to delete the card token %s. Exception: %s" 393 427 msgstr "" -
visma-pay-embedded-card-payment-gateway/trunk/readme.txt
r3149117 r3253989 4 4 Tags: payment gateway, visma, pay, verkkomaksut, korttimaksut, vismapay 5 5 Requires at least: 3.3 6 Tested up to: 6. 6.16 Tested up to: 6.7.2 7 7 Stable tag: trunk 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 10 WC requires at least: 3.0.0 11 WC tested up to: 9. 1.411 WC tested up to: 9.7.1 12 12 13 13 Visma Pay plugin for Woocommerce. … … 41 41 42 42 == Changelog == 43 44 = 1.1.6 = 45 * Added support for free trial on subscription products 46 * Updated 'tested up to' versions. 43 47 44 48 = 1.1.5 = -
visma-pay-embedded-card-payment-gateway/trunk/visma-pay-embedded-card-payment-gateway.php
r3149117 r3253989 4 4 * Plugin URI: https://www.vismapay.com/docs 5 5 * Description: Visma Pay Payment Gateway Embedded Card Integration for Woocommerce 6 * Version: 1.1. 56 * Version: 1.1.6 7 7 * Author: Visma 8 8 * Author URI: https://www.visma.fi/vismapay/ … … 10 10 * Domain Path: /languages 11 11 * WC requires at least: 3.0.0 12 * WC tested up to: 9. 1.412 * WC tested up to: 9.7.1 13 13 */ 14 14 … … 57 57 class WC_Gateway_visma_pay_embedded_card extends WC_Payment_Gateway 58 58 { 59 const VP_FREE_TRIAL_AMOUNT = 100; 60 59 61 protected $api_key; 60 62 protected $private_key; 61 63 protected $ordernumber_prefix; 62 64 protected $send_items; 65 protected $allow_free_trial; 63 66 protected $send_receipt; 64 67 protected $cancel_url; … … 104 107 $this->send_items = $this->get_option('send_items'); 105 108 $this->send_receipt = $this->get_option('send_receipt'); 109 $this->allow_free_trial = $this->get_option('allow_free_trial'); 106 110 107 111 $this->cancel_url = $this->get_option('cancel_url'); … … 209 213 'default' => 'yes', 210 214 ), 215 'allow_free_trial' => array( 216 'title' => __( 'Allow free trial', 'visma-pay-embedded-card-payment-gateway' ), 217 'type' => 'checkbox', 218 'label' => __( 'Enable to allow using free trial on WC Subscription products', 'visma-pay-embedded-card-payment-gateway' ), 219 'description' => __( 'When this option is enabled, the plugin will create an authorization of 100 fractional monetary units. The currency depends on your store\'s settings. The authorization is required to save the payment card. After the order is completed, the authorization will be automatically canceled. For example, when using EUR, the authorization will be 1.00 EUR.', 'visma-pay-embedded-card-payment-gateway' ), 220 'default' => 'no' 221 ), 211 222 'cancel_url' => array( 212 223 'title' => __( 'Cancel Page', 'visma-pay-embedded-card-payment-gateway' ), … … 263 274 if(!(is_checkout() || $this->is_available())) 264 275 return; 276 265 277 wp_enqueue_style( 'woocommerce_visma_pay_embedded_card', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) . '/assets/css/vismapay-embedded.css', '', '', 'all'); 266 278 wp_enqueue_script( 'woocommerce_visma_pay_embedded_card', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) . '/assets/js/vismapay-embedded.js', array( 'jquery' ), '', true ); … … 272 284 $clear_both = '<div style="display: block; clear: both;"></div>'; 273 285 274 echo '<div id="visma-pay-embedded-card-payment-content">'.wpautop(wptexturize(__( 'Payment card', 'visma-pay-embedded-card-payment-gateway' ))) . "<div id='pf-cc-form'><iframe frameBorder='0' scrolling='no' id='pf-cc-iframe' class='intrinsic-ignore' height='220px' style='width:100%' src='https://www.vismapay.com/e-payments/embedded_card_form?lang=".$this->get_lang()."'></iframe></div>" . $clear_both; 286 echo '<div id="visma-pay-embedded-card-payment-content">'.wpautop(wptexturize(esc_html__( 'Payment card', 'visma-pay-embedded-card-payment-gateway' ))); 287 288 289 if($this->visma_pay_cart_has_free_trial()) 290 { 291 $currency = get_woocommerce_currency(); 292 293 echo '<div class="woocommerce-info">' . sprintf(esc_html__('An authorization of 1 %s will be made on your card to save your card details. The authorization will be automatically cancelled after the order has been accepted.', 'visma-pay-embedded-card-payment-gateway'), $currency) . '</div>'; 294 } 295 296 echo "<div id='pf-cc-form'><iframe frameBorder='0' scrolling='no' id='pf-cc-iframe' class='intrinsic-ignore' height='220px' style='width:100%' src='https://www.vismapay.com/e-payments/embedded_card_form?lang=".$this->get_lang()."'></iframe></div>" . $clear_both; 275 297 276 298 if($this->visa_logo === 'yes' || $this->mc_logo === 'yes' || $this->amex_logo === 'yes' || $this->diners_logo === 'yes') … … 325 347 326 348 $order = new WC_Order($order_id); 327 $wc_order_id = $order->get_id();328 349 $wc_order_total = $order->get_total(); 329 350 … … 335 356 $return_url = add_query_arg( array('wc-api' => get_class( $this ) ,'order_id' => $order_id), $redirect_url ); 336 357 337 $amount = (int)(round($wc_order_total*100, 0)); 358 $amount = (int)(round($wc_order_total*100, 0)); 359 $override_auto_settlement = 0; 360 $register_card_token = 0; 338 361 339 362 $order->update_meta_data('visma_pay_embedded_card_is_settled', 99); 340 363 $order->update_meta_data('visma_pay_embedded_card_return_code', 99); 364 $order->update_meta_data('visma_pay_embedded_card_return_code', 99); 365 $order->update_meta_data('_visma_pay_embedded_card_only_save_token', 0); 341 366 $order->save(); 342 367 … … 349 374 else 350 375 $receipt_mail = ''; 376 377 if($this->visma_pay_order_related_to_subscription($order)) 378 { 379 $register_card_token = 1; 380 381 if($this->visma_pay_only_authorize($order)) 382 { 383 $order->add_order_note(__('Visma Pay (Embedded Card): Creating a temporary authorization to save card token.', 'visma-pay-embedded-card-payment-gateway')); 384 $order->update_meta_data('_visma_pay_embedded_card_only_save_token', 1); 385 $order->save(); 386 387 $override_auto_settlement = 1; 388 $amount = self::VP_FREE_TRIAL_AMOUNT; 389 $receipt_mail = ''; 390 } 391 } 351 392 352 393 $payment->addCharge( … … 366 407 } 367 408 368 $register_card_token = 0;369 370 if(function_exists('wcs_order_contains_subscription'))371 {372 if(wcs_order_contains_subscription($order) || wcs_order_contains_renewal($order) || wcs_is_subscription($order))373 {374 $register_card_token = 1;375 }376 }377 378 409 $payment->addPaymentMethod( 379 410 array( … … 383 414 'lang' => $lang, 384 415 'token_valid_until' => strtotime('+1 hour'), 385 'register_card_token' => $register_card_token 416 'register_card_token' => $register_card_token, 417 'override_auto_settlement' => $override_auto_settlement, 386 418 ) 387 419 ); … … 554 586 $this->visma_pay_embedded_die("Order not found."); 555 587 556 $wc_order_id = $order->get_id();557 588 $wc_order_status = $order->get_status(); 558 589 … … 602 633 { 603 634 case 0: 604 if($settled == 0) 635 $should_cancel = $order->get_meta('_visma_pay_embedded_card_only_save_token', true, 'edit'); 636 637 if($settled == 0 && $should_cancel == 0) 605 638 $pbw_note = __('Visma Pay (Embedded Card) order', 'visma-pay-embedded-card-payment-gateway') . ' ' . $order_number . "<br>-<br>" . __('Payment is authorized. Use settle option to capture funds.', 'visma-pay-embedded-card-payment-gateway') . "<br>"; 606 639 else … … 633 666 $subscription->add_order_note($pbw_note . $pbw_extra_info); 634 667 $subscription->save(); 668 } 669 670 $wc_order_total = $order->get_total(); 671 $amount = (int)(round($wc_order_total*100, 0)); 672 673 if($should_cancel == 1 && $amount === 0) 674 { 675 $cancel_result = $payment->cancelPayment($order_number); 676 677 if($cancel_result->result == 0) 678 { 679 $order->add_order_note(__( 680 'Visma Pay (Embedded Card): Succesfully cancelled temporary authorization.', 681 'visma-pay-embedded-card-payment-gateway' 682 )); 683 } 684 else 685 { 686 $order->add_order_note(__( 687 'Visma Pay (Embedded Card): Failed to cancel temporary authorization. You should cancel the authorization using Visma Pay merchant portal.', 688 'visma-pay-embedded-card-payment-gateway' 689 )); 690 691 $this->logger->error( 692 'Visma Pay Embedded - Failed to cancel temporary authorization. You should cancel the authorization using Visma Pay merchant portal. Order: ' . $order->id, 693 $this->logcontext 694 ); 695 } 696 697 $order->update_meta_data('visma_pay_embedded_card_is_settled', 1); 635 698 } 636 699 } … … 992 1055 protected function add_products_to_payment($payment, $order, $amount) 993 1056 { 1057 $only_tokenize = $order->get_meta('_visma_pay_embedded_card_only_save_token', true, 'edit'); 1058 1059 if($only_tokenize == 1) 1060 { 1061 return $this->visma_pay_add_dummy_product_to_payment($payment); 1062 } 1063 994 1064 $products = array(); 995 1065 $total_amount = 0; … … 1138 1208 return $actions; 1139 1209 } 1210 1211 protected function visma_pay_order_has_free_trial($order) 1212 { 1213 $subscriptions = wcs_get_subscriptions_for_order($order); 1214 1215 foreach ($subscriptions as $subscription) 1216 { 1217 1218 $trial_length = wcs_estimate_periods_between( 1219 $subscription->get_time('start'), 1220 $subscription->get_time('trial_end'), 1221 $subscription->get_trial_period() 1222 ); 1223 1224 if ($trial_length > 0) 1225 return true; 1226 } 1227 1228 return false; 1229 } 1230 1231 protected function visma_pay_only_authorize($order) 1232 { 1233 $wc_order_total = $order->get_total(); 1234 $amount = (int)(round($wc_order_total*100, 0)); 1235 1236 $has_free_trial = $this->visma_pay_order_has_free_trial($order); 1237 1238 if($this->allow_free_trial == 'yes' && $amount === 0 && $has_free_trial) 1239 { 1240 return true; 1241 } 1242 1243 return false; 1244 } 1245 1246 protected function visma_pay_add_dummy_product_to_payment($payment) 1247 { 1248 $payment->addProduct( 1249 array( 1250 'id' => '1', 1251 'title' => 'register_card_token', 1252 'count' => 1, 1253 'pretax_price' => self::VP_FREE_TRIAL_AMOUNT, 1254 'tax' => 0, 1255 'price' => self::VP_FREE_TRIAL_AMOUNT, 1256 'type' => 1, 1257 ) 1258 ); 1259 1260 return $payment; 1261 } 1262 1263 protected function visma_pay_order_related_to_subscription($order) 1264 { 1265 if (!function_exists('wcs_order_contains_subscription')) 1266 return false; 1267 1268 $contains_subs = wcs_order_contains_subscription($order); 1269 $contains_renew = wcs_order_contains_renewal($order); 1270 $is_subs = wcs_is_subscription($order); 1271 1272 if ($contains_subs || $contains_renew || $is_subs) 1273 return true; 1274 1275 return false; 1276 } 1277 1278 // Called from WC_Gateway_Visma_Pay_Blocks_Support 1279 function visma_pay_cart_has_free_trial() 1280 { 1281 $cart = WC()->cart; 1282 1283 if (!$cart || $this->allow_free_trial != 'yes' || !class_exists('WC_Subscriptions_Product')) 1284 return false; 1285 1286 $wc_cart_total = WC()->cart->total; 1287 $cart_total = (int)(round($wc_cart_total*100, 0)); 1288 1289 foreach ($cart->get_cart() as $cart_item) 1290 { 1291 $product_id = $cart_item['product_id']; 1292 $trial_length = WC_Subscriptions_Product::get_trial_length($product_id); 1293 1294 if ($trial_length > 0 && $cart_total === 0) 1295 return true; 1296 } 1297 1298 return false; 1299 } 1140 1300 } 1141 1301 }
Note: See TracChangeset
for help on using the changeset viewer.