diff --git a/CHANGELOG.md b/CHANGELOG.md index f92f1a3..74fca5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] - Added ability to set language of created payments according to frontoffice language +- Performance optimization of payment creation. +- Bugfix of subscriptions not being available in block layout. ## [1.0.34] - 2023-08-16 - Restructured the settings page into sevaral sections diff --git a/assets/js/blocks.js b/assets/js/blocks.js index c406eab..9ade939 100644 --- a/assets/js/blocks.js +++ b/assets/js/blocks.js @@ -51,7 +51,10 @@ function registerMethod(method) { content: Object(element.createElement)(content, null), edit: element.createElement('div', {}, method.description), canMakePayment: () => true, - ariaLabel: method.id + ariaLabel: method.id, + supports: { + features: method.supports, + } }; // Register method diff --git a/classes/abstract-gateway.php b/classes/abstract-gateway.php index fe30102..1ce3c77 100644 --- a/classes/abstract-gateway.php +++ b/classes/abstract-gateway.php @@ -2,7 +2,7 @@ /** * MIT License * - * Copyright (c) 2019 OnPay.io + * Copyright (c) 2023 OnPay.io * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -24,17 +24,13 @@ */ abstract class wc_onpay_gateway_abstract extends WC_Payment_Gateway { - private $apiAuthorized; - public function admin_options() { // Redirect to general plugin settings page wp_redirect(wc_onpay_query_helper::generate_url(['page' => 'wc-settings','tab' => WC_OnPay::WC_ONPAY_ID, 'section' => 'methods'])); exit; } - public function __construct() { - add_action('woocommerce_receipt_' . $this->id, [$this, 'checkout']); - } + public function __construct() {} public function getMethodTitle() { if (is_admin()) { @@ -49,33 +45,42 @@ public function getMethodTitle() { return $this->method_title; } - public function process_payment($order_id) { - $order = new WC_Order($order_id); - $redirectUrl = $order->get_checkout_payment_url(true); - if (class_exists('WC_Subscriptions_Change_Payment_Gateway') && WC_Subscriptions_Change_Payment_Gateway::$is_request_to_change_payment) { - $redirectUrl = add_query_arg('update_method', true, $redirectUrl); - } - return [ - 'result' => 'success', - 'redirect' => $redirectUrl - ]; - } - /** * Gets payment link and redirects browser to newly created payment */ - public function checkout($order_id) { + public function process_payment($order_id) { $order = new WC_Order($order_id); - $updateMethod = wc_onpay_query_helper::get_query_value('update_method') !== null ? true : false; + $updateMethod = class_exists('WC_Subscriptions_Change_Payment_Gateway') && WC_Subscriptions_Change_Payment_Gateway::$is_request_to_change_payment; + $error = ''; + try { $paymentWindow = self::get_payment_window($order, $updateMethod); - wp_redirect(self::getPaymentLink($paymentWindow)); - exit; + $redirect = self::getPaymentLink($paymentWindow); + + if ($updateMethod) { + // If we're doing an update of method, do a manual redirect. + wp_redirect($redirect); + exit; + } + + return [ + 'result' => 'success', + 'redirect' => $redirect + ]; } catch (InvalidArgumentException $e) { - echo 'Invalid data provided(' . $e->getMessage() . '). Unable to create OnPay payment.'; + $error = __('Invalid data provided. Unable to create OnPay payment', 'wc-onpay') . ' (' . $e->getMessage() . ')'; } catch (WoocommerceOnpay\OnPay\API\Exception\TokenException $e) { - echo 'Authorized connection to OnPay failed.'; + $error = __('Authorized connection to OnPay failed', 'wc-onpay'); } + + if ($updateMethod) { + // If we're doing an update of method, manually echo error. + echo $error; + exit; + } + + wc_add_notice($error, 'error'); + return []; } /** @@ -369,28 +374,12 @@ protected function getLanguage() { // WooCommerce function indicating available state of method. public function is_available() { - if ($this->enabled === 'yes' && $this->isApiAuthorized()) { + if ($this->enabled === 'yes') { return true; } return false; } - // Function that checks if connection to OnPay APi is authorized. Caches result by default. - private function isApiAuthorized($refresh = false) { - if(isset($this->isApiAuthorized) && !$refresh) { - return $this->isApiAuthorized; - } - $onpayApi = $this->getOnPayClient(); - try { - $this->isApiAuthorized = $onpayApi->isAuthorized(); - } catch (OnPay\API\Exception\ConnectionException $e) { - $this->isApiAuthorized = false; - } catch (OnPay\API\Exception\TokenException $e) { - $this->isApiAuthorized = false; - } - return $this->isApiAuthorized; - } - private function sanitizeFieldValue($value) { $value = strval($value); $value = htmlspecialchars($value, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401, 'UTF-8'); diff --git a/classes/blocks/abstract-gateway-block.php b/classes/blocks/abstract-gateway-block.php index 3a14789..3ff02cd 100644 --- a/classes/blocks/abstract-gateway-block.php +++ b/classes/blocks/abstract-gateway-block.php @@ -33,7 +33,7 @@ abstract class wc_onpay_abstract_gateway_block extends AbstractPaymentMethodType protected $hasRegisteredJs = false; public function is_active() { - return $this->gateway->is_available(); + return $this->gateway->enabled; } public function get_payment_method_script_handles() { @@ -43,6 +43,7 @@ public function get_payment_method_script_handles() { 'description' => $this->gateway->description, 'icon' => $this->gateway->icon, 'logos' => $this->gateway->getMethodLogos(), + 'supports' => $this->gateway->supports ]; if (false === $this->hasRegisteredJs) { diff --git a/languages/wc-onpay-da_DK.mo b/languages/wc-onpay-da_DK.mo index 3bd1c12..1ba0c22 100644 Binary files a/languages/wc-onpay-da_DK.mo and b/languages/wc-onpay-da_DK.mo differ diff --git a/languages/wc-onpay-da_DK.po b/languages/wc-onpay-da_DK.po index d86b459..f46d3e9 100644 --- a/languages/wc-onpay-da_DK.po +++ b/languages/wc-onpay-da_DK.po @@ -3,8 +3,8 @@ msgstr "" "Project-Id-Version: OnPay.io for WooCommerce\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-05-15 09:32+0000\n" -"PO-Revision-Date: 2023-04-14 12:19+0000\n" -"Language-Team: Dansk\n" +"PO-Revision-Date: 2023-09-05 09:43+0000\n" +"Language-Team: Danish\n" "Language: da_DK\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "MIME-Version: 1.0\n" @@ -13,64 +13,72 @@ msgstr "" "Last-Translator: \n" "X-Generator: Loco https://localise.biz/" -#: woocommerce-onpay.php:789 +#: woocommerce-onpay.php:878 msgid "Action" msgstr "Handling" -#: woocommerce-onpay.php:1121 +#: woocommerce-onpay.php:1214 msgid "American Express/AMEX" msgstr "American Express/AMEX" -#: woocommerce-onpay.php:779 woocommerce-onpay.php:790 +#: woocommerce-onpay.php:868 woocommerce-onpay.php:879 msgid "Amount" msgstr "Beløb" -#: woocommerce-onpay.php:709 +#: woocommerce-onpay.php:798 msgid "Amount automatically refunded on transaction in OnPay." msgstr "Beløbet blev automatisk hævet på transaktion i OnPay" -#: woocommerce-onpay.php:668 woocommerce-onpay.php:669 +#: woocommerce-onpay.php:757 woocommerce-onpay.php:758 msgid "Amount captured on transaction in OnPay." msgstr "Beløbet blev hævet på transaktionen i OnPay" -#: woocommerce-onpay.php:675 woocommerce-onpay.php:676 -#: woocommerce-onpay.php:710 +#: woocommerce-onpay.php:764 woocommerce-onpay.php:765 +#: woocommerce-onpay.php:799 msgid "Amount refunded on transaction in OnPay." msgstr "Beløbet blev refunderet på transaktionen i OnPay" -#: woocommerce-onpay.php:913 +#: woocommerce-onpay.php:992 msgid "An error occured cancelling subscription in OnPay." msgstr "Der opstod en fejl under opsigelse af abonnement i OnPay." -#: woocommerce-onpay.php:439 classes/gateway-anyday.php:38 +#: woocommerce-onpay.php:601 classes/gateway-anyday.php:38 msgid "Anyday" msgstr "Anyday" -#: woocommerce-onpay.php:403 classes/gateway-applepay.php:38 +#: woocommerce-onpay.php:565 classes/gateway-applepay.php:38 msgid "Apple Pay" msgstr "Apple Pay" -#: woocommerce-onpay.php:560 +#: woocommerce-onpay.php:657 msgid "Are you sure you want to logout from Onpay?" msgstr "Er du sikker på at du ønsker at logge ud fra OnPay?" -#: woocommerce-onpay.php:561 +#: woocommerce-onpay.php:658 msgid "Are you sure you want to refresh gateway ID and secret?" msgstr "Er du sikker på at du ønsker at genopfriske gateway ID og secret?" -#: woocommerce-onpay.php:883 woocommerce-onpay.php:884 +#: classes/abstract-gateway.php:73 +msgid "Authorized connection to OnPay failed" +msgstr "Forbindelse til OnPay fejlede under autorisering." + +#: woocommerce-onpay.php:972 woocommerce-onpay.php:973 msgid "Authorizing new transaction failed." msgstr "Autorisering af en ny betaling fejlede." -#: woocommerce-onpay.php:483 +#: woocommerce-onpay.php:521 msgid "Automatic capture" msgstr "Automatisk hævning" -#: woocommerce-onpay.php:484 +#: woocommerce-onpay.php:522 msgid "Automatic capture of transactions on status completed" msgstr "Automatisk hævning af transaktioner ved gennemført" -#: woocommerce-onpay.php:485 +#: woocommerce-onpay.php:622 +msgid "Automatic payment window language" +msgstr "Automatisk betalingsvindue sprog" + +#: woocommerce-onpay.php:523 msgid "" "Automatically capture remaining amounts on transactions, when orders are " "marked with status completed" @@ -78,40 +86,36 @@ msgstr "" "Automatisk hævning af det resterende beløb på transaktioner, når en ordre " "markeres med status gennemført." -#: woocommerce-onpay.php:480 -msgid "Backoffice settings" -msgstr "Backoffice indstillinger" - -#: woocommerce-onpay.php:834 woocommerce-onpay.php:844 -#: woocommerce-onpay.php:853 +#: woocommerce-onpay.php:923 woocommerce-onpay.php:933 +#: woocommerce-onpay.php:942 msgid "Cancel" msgstr "Annuller " -#: woocommerce-onpay.php:823 woocommerce-onpay.php:852 +#: woocommerce-onpay.php:912 woocommerce-onpay.php:941 msgid "Cancel transaction" msgstr "Annuller transaktion" -#: woocommerce-onpay.php:813 woocommerce-onpay.php:833 +#: woocommerce-onpay.php:902 woocommerce-onpay.php:922 msgid "Capture" msgstr "Hæv" -#: woocommerce-onpay.php:391 +#: woocommerce-onpay.php:541 msgid "Card" msgstr "Kort" -#: woocommerce-onpay.php:466 +#: woocommerce-onpay.php:547 msgid "Card logos" msgstr "Kort logoer" -#: woocommerce-onpay.php:468 +#: woocommerce-onpay.php:549 msgid "Card logos shown for the Card payment method." msgstr "Kort logoer som vises på kreditkort betalingsmuligheden" -#: woocommerce-onpay.php:776 +#: woocommerce-onpay.php:865 msgid "Card type" msgstr "Kort type" -#: woocommerce-onpay.php:780 +#: woocommerce-onpay.php:869 msgid "Charged" msgstr "Hævet" @@ -119,31 +123,31 @@ msgstr "Hævet" msgid "Credit card" msgstr "Kreditkort" -#: woocommerce-onpay.php:1101 +#: woocommerce-onpay.php:1194 msgid "Danish" msgstr "Dansk" -#: woocommerce-onpay.php:1122 +#: woocommerce-onpay.php:1215 msgid "Dankort" msgstr "Dankort" -#: woocommerce-onpay.php:788 +#: woocommerce-onpay.php:877 msgid "Date & Time" msgstr "Tid og dato" -#: woocommerce-onpay.php:1085 +#: woocommerce-onpay.php:1178 msgid "Default design" msgstr "Standard design" -#: woocommerce-onpay.php:1123 +#: woocommerce-onpay.php:1216 msgid "Diners" msgstr "Diners" -#: woocommerce-onpay.php:1124 +#: woocommerce-onpay.php:1217 msgid "Discover" msgstr "Discover" -#: woocommerce-onpay.php:1170 +#: woocommerce-onpay.php:1263 msgid "" "Don't have an OnPay account yet? Order one through DanDomain from DKK 0,- " "per month." @@ -151,15 +155,15 @@ msgstr "" "Har du endnu ikke en OnPay konto? Gå til DanDomain for at oprette en nu fra " "kr. 0,- /mdr." -#: woocommerce-onpay.php:1102 +#: woocommerce-onpay.php:1195 msgid "Dutch" msgstr "Hollandsk" -#: woocommerce-onpay.php:440 +#: woocommerce-onpay.php:602 msgid "Enable Anyday as payment method" msgstr "Aktivér Anyday som betalingsmulighed" -#: woocommerce-onpay.php:404 +#: woocommerce-onpay.php:566 msgid "" "Enable Apple Pay as payment method (Only shown if customer browser supports " "method)" @@ -167,11 +171,11 @@ msgstr "" "Aktivér Apple Pay som betalingsmulighed (Kun vist hvis kundens browser " "understøtter metoden)" -#: woocommerce-onpay.php:392 +#: woocommerce-onpay.php:542 msgid "Enable card as payment method" msgstr "Aktivér kort som betalingsmulighed" -#: woocommerce-onpay.php:410 +#: woocommerce-onpay.php:572 msgid "" "Enable Google Pay as payment method (Only shown if customer browser supports " "method)" @@ -179,71 +183,75 @@ msgstr "" "Aktivér Google Pay som betalingsmulighed (Kun vist hvis kundens browser " "understøtter metoden)" -#: woocommerce-onpay.php:398 +#: woocommerce-onpay.php:560 msgid "Enable MobilePay Online as payment method" msgstr "Aktivér MobilePay Online som betalingsmulighed" -#: woocommerce-onpay.php:416 +#: woocommerce-onpay.php:578 msgid "Enable PayPal as payment method" msgstr "Aktivér PayPal som betalingsmulighed" -#: woocommerce-onpay.php:428 +#: woocommerce-onpay.php:590 msgid "Enable Swish as payment method" msgstr "Aktivér Swish som betalingsmulighed" -#: woocommerce-onpay.php:434 +#: woocommerce-onpay.php:596 msgid "Enable ViaBill as payment method" msgstr "Aktivér ViaBill som betalingsmulighed" -#: woocommerce-onpay.php:422 +#: woocommerce-onpay.php:584 msgid "Enable Vipps as payment method" msgstr "Aktivér Vipps som betalingsmulighed" -#: woocommerce-onpay.php:1100 +#: woocommerce-onpay.php:1193 msgid "English" msgstr "Engelsk" -#: woocommerce-onpay.php:745 +#: woocommerce-onpay.php:834 msgid "Error: " msgstr "Fejl: " -#: woocommerce-onpay.php:1103 +#: woocommerce-onpay.php:1196 msgid "Faroese" msgstr "Færøsk" -#: woocommerce-onpay.php:823 woocommerce-onpay.php:852 +#: woocommerce-onpay.php:912 woocommerce-onpay.php:941 msgid "Finish transaction" msgstr "Fuldfør transaktion" -#: woocommerce-onpay.php:1125 +#: woocommerce-onpay.php:1218 msgid "Forbrugsforeningen" msgstr "Forbrugsforeningen" -#: woocommerce-onpay.php:1104 +#: woocommerce-onpay.php:1197 msgid "French" msgstr "Fransk" -#: woocommerce-onpay.php:543 +#: woocommerce-onpay.php:641 msgid "Gateway ID" msgstr "Gateway ID" -#: woocommerce-onpay.php:1059 +#: woocommerce-onpay.php:1152 msgid "Gateway ID and secret was refreshed" msgstr "Gateway ID og secret blev genopfrisket" -#: woocommerce-onpay.php:539 +#: woocommerce-onpay.php:637 msgid "Gateway information" msgstr "Gateway information" -#: woocommerce-onpay.php:1105 +#: woocommerce-onpay.php:470 +msgid "General settings" +msgstr "Generelle indstillinger" + +#: woocommerce-onpay.php:1198 msgid "German" msgstr "Tysk" -#: woocommerce-onpay.php:1172 +#: woocommerce-onpay.php:1265 msgid "Get OnPay now" msgstr "Bestil OnPay her" -#: woocommerce-onpay.php:409 classes/gateway-googlepay.php:38 +#: woocommerce-onpay.php:571 classes/gateway-googlepay.php:38 msgid "Google Pay" msgstr "Google Pay" @@ -251,39 +259,43 @@ msgstr "Google Pay" msgid "https://onpay.io/" msgstr "https://onpay.io/" -#: woocommerce-onpay.php:491 +#: woocommerce-onpay.php:529 msgid "Integrate with refund feature" msgstr "Integrér med refunderings-funktion" -#: woocommerce-onpay.php:492 +#: woocommerce-onpay.php:530 msgid "Integrate with the built in refund feature in WooCommerce" msgstr "Integrér med den indbyggede refunderings-funktion i WooCommerce" -#: woocommerce-onpay.php:642 woocommerce-onpay.php:731 +#: classes/abstract-gateway.php:71 +msgid "Invalid data provided. Unable to create OnPay payment" +msgstr "Ugyldig data. Betaling i OnPay kunne ikke oprettes" + +#: woocommerce-onpay.php:731 woocommerce-onpay.php:820 msgid "Invalid OnPay token, please login on settings page" msgstr "Ugyldig OnPay token, log ind igen under plugin indstillinger" -#: woocommerce-onpay.php:792 +#: woocommerce-onpay.php:881 msgid "IP" msgstr "IP" -#: woocommerce-onpay.php:1106 +#: woocommerce-onpay.php:1199 msgid "Italian" msgstr "Italiensk" -#: woocommerce-onpay.php:1126 +#: woocommerce-onpay.php:1219 msgid "JCB" msgstr "JCB" -#: woocommerce-onpay.php:522 +#: woocommerce-onpay.php:429 msgid "Log in with OnPay account" msgstr "Log ind med OnPay konto" -#: woocommerce-onpay.php:554 +#: woocommerce-onpay.php:652 msgid "Log out from OnPay" msgstr "Log ud fra OnPay" -#: woocommerce-onpay.php:1127 +#: woocommerce-onpay.php:1220 msgid "Mastercard/Maestro" msgstr "Mastercard/Maestro" @@ -291,31 +303,31 @@ msgstr "Mastercard/Maestro" msgid "MobilePay" msgstr "MobilePay" -#: woocommerce-onpay.php:397 +#: woocommerce-onpay.php:559 msgid "MobilePay Online" msgstr "MobilePay Online" -#: woocommerce-onpay.php:516 woocommerce-onpay.php:640 -#: woocommerce-onpay.php:728 +#: woocommerce-onpay.php:422 woocommerce-onpay.php:729 +#: woocommerce-onpay.php:817 msgid "No connection to OnPay" msgstr "Ingen forbindelse til OnPay" -#: woocommerce-onpay.php:1107 +#: woocommerce-onpay.php:1200 msgid "Norwegian" msgstr "Norsk" -#: woocommerce-onpay.php:684 +#: woocommerce-onpay.php:773 msgid "OnPay error: " msgstr "OnPay fejl:" -#: woocommerce-onpay.php:1174 +#: woocommerce-onpay.php:1267 msgid "OnPay sellers" msgstr "OnPay-forhandlere" #. Author of the plugin -#: woocommerce-onpay.php:112 woocommerce-onpay.php:507 -#: woocommerce-onpay.php:617 classes/abstract-gateway.php:44 -#: classes/abstract-gateway.php:47 +#: woocommerce-onpay.php:114 woocommerce-onpay.php:414 +#: woocommerce-onpay.php:706 classes/abstract-gateway.php:40 +#: classes/abstract-gateway.php:43 msgid "OnPay.io" msgstr "OnPay.io" @@ -327,7 +339,12 @@ msgstr "OnPay.io til WooCommerce" msgid "OnPay.io payment plugin for WooCommerce" msgstr "OnPay.io betalings-plugin for WooCommerce" -#: woocommerce-onpay.php:387 +#: woocommerce-onpay.php:625 +msgid "Overrides language chosen above, and instead use frontoffice language" +msgstr "" +"Overskriver sproget valgt ovenfor, og bruger frontoffice sproget i stedet" + +#: woocommerce-onpay.php:471 msgid "Payment methods" msgstr "Betalingsmetoder" @@ -367,75 +384,75 @@ msgstr "Betaling Google Pay" msgid "Payment using MobilePay" msgstr "Betaling med MobilePay" -#: woocommerce-onpay.php:447 +#: woocommerce-onpay.php:472 msgid "Payment window" msgstr "Betalingsvindue" -#: woocommerce-onpay.php:450 +#: woocommerce-onpay.php:612 msgid "Payment window design" msgstr "Betalingsvindue design" -#: woocommerce-onpay.php:455 +#: woocommerce-onpay.php:617 msgid "Payment window language" msgstr "Betalingsvindue sprog" -#: woocommerce-onpay.php:415 classes/gateway-paypal.php:38 +#: woocommerce-onpay.php:577 classes/gateway-paypal.php:38 msgid "PayPal" msgstr "PayPal" -#: woocommerce-onpay.php:740 +#: woocommerce-onpay.php:829 msgid "Pending payment" msgstr "Afventende betaling" -#: woocommerce-onpay.php:830 +#: woocommerce-onpay.php:919 msgid "Please enter amount to capture" msgstr "Indtast beløb der skal hæves" -#: woocommerce-onpay.php:840 +#: woocommerce-onpay.php:929 msgid "Please enter amount to refund" msgstr "Indtast beløb der skal refunderes" -#: woocommerce-onpay.php:1108 +#: woocommerce-onpay.php:1201 msgid "Polish" msgstr "Polsk" -#: woocommerce-onpay.php:114 woocommerce-onpay.php:508 +#: woocommerce-onpay.php:116 msgid "Receive payments with cards and more through OnPay.io" msgstr "Modtag betalinger med kreditkort mm. igennem OnPay.io" -#: woocommerce-onpay.php:554 +#: woocommerce-onpay.php:652 msgid "Refresh" msgstr "Genopfrisk" -#: woocommerce-onpay.php:818 woocommerce-onpay.php:843 +#: woocommerce-onpay.php:907 woocommerce-onpay.php:932 msgid "Refund" msgstr "Refunder" -#: woocommerce-onpay.php:781 +#: woocommerce-onpay.php:870 msgid "Refunded" msgstr "Refunderet" -#: woocommerce-onpay.php:548 +#: woocommerce-onpay.php:646 msgid "Secret" msgstr "Secret" -#: woocommerce-onpay.php:472 +#: woocommerce-onpay.php:553 msgid "Select logos" msgstr "Vælg logoer" -#: woocommerce-onpay.php:1210 +#: woocommerce-onpay.php:1351 msgid "Settings" msgstr "Indstillinger" -#: woocommerce-onpay.php:1109 +#: woocommerce-onpay.php:1202 msgid "Spanish" msgstr "Spansk" -#: woocommerce-onpay.php:769 +#: woocommerce-onpay.php:858 msgid "Status" msgstr "Status" -#: woocommerce-onpay.php:637 +#: woocommerce-onpay.php:726 msgid "" "Status changed to completed. Amount was automatically captured on " "transaction in OnPay." @@ -443,13 +460,13 @@ msgstr "" "Status ændret til gennemført. Beløb blev automatisk hævet på transaktion i " "OnPay." -#: woocommerce-onpay.php:355 +#: woocommerce-onpay.php:379 msgid "" "Subscription added, please continue with payment for the rest of the order." msgstr "" "Abonnement blev oprettet, fortsæt venligst med betaling af resten af ordren." -#: woocommerce-onpay.php:362 +#: woocommerce-onpay.php:386 msgid "" "Subscription added, please continue with the rest of the order from the list " "below." @@ -457,91 +474,91 @@ msgstr "" "Abonnement blev oprettet, fortsæt venligst med resten af ordren fra listen " "nedenfor." -#: woocommerce-onpay.php:233 +#: woocommerce-onpay.php:238 msgid "Subscription authorized in OnPay." msgstr "Abonnement autoriseret i OnPay." -#: woocommerce-onpay.php:915 +#: woocommerce-onpay.php:994 msgid "Subscription cancelled in OnPay." msgstr "Abonnement opsagt i OnPay." -#: woocommerce-onpay.php:876 +#: woocommerce-onpay.php:965 msgid "Subscription no longer active in OnPay." msgstr "Abonnement er ikke længere aktiv i OnPay." -#: woocommerce-onpay.php:264 +#: woocommerce-onpay.php:288 msgid "Subscription updated with new payment info in OnPay." msgstr "Abonnementet blev opdateret med nye betalingsoplysninger i OnPay." -#: woocommerce-onpay.php:1110 +#: woocommerce-onpay.php:1203 msgid "Swedish" msgstr "Svensk" -#: woocommerce-onpay.php:427 classes/gateway-swish.php:38 +#: woocommerce-onpay.php:589 classes/gateway-swish.php:38 msgid "Swish" msgstr "Swish" -#: woocommerce-onpay.php:460 +#: woocommerce-onpay.php:628 msgid "Test Mode" msgstr "Test-tilstand" -#: woocommerce-onpay.php:376 +#: woocommerce-onpay.php:400 msgid "The payment failed. Please try again." msgstr "Betalingen blev ikke gennemført. Prøv venligst igen." -#: woocommerce-onpay.php:760 +#: woocommerce-onpay.php:849 msgid "This transaction was performed in testmode." msgstr "Denne transaktion blev gennemført i test-tilstand" -#: woocommerce-onpay.php:254 woocommerce-onpay.php:891 +#: woocommerce-onpay.php:260 woocommerce-onpay.php:980 msgid "Transaction authorized in OnPay. Remember to capture amount." msgstr "Transaktion autoriseret i Onpay. Husk at hæve beløb." -#: woocommerce-onpay.php:767 +#: woocommerce-onpay.php:856 msgid "Transaction details" msgstr "Transaktion detaljer" -#: woocommerce-onpay.php:680 woocommerce-onpay.php:681 +#: woocommerce-onpay.php:769 woocommerce-onpay.php:770 msgid "Transaction finished/cancelled in OnPay." msgstr "Transaktion afsluttet/annulleret i OnPay" -#: woocommerce-onpay.php:786 +#: woocommerce-onpay.php:875 msgid "Transaction history" msgstr "Transaktion historik" -#: woocommerce-onpay.php:778 +#: woocommerce-onpay.php:867 msgid "Transaction number" msgstr "Transaktionsnummer" -#: woocommerce-onpay.php:712 +#: woocommerce-onpay.php:801 msgid "Unable to automatically refund on transaction in OnPay." msgstr "En fejl opstod under automatisk refundering på transaktion i OnPay." -#: woocommerce-onpay.php:713 +#: woocommerce-onpay.php:802 msgid "Unable to refund on transaction in OnPay." msgstr "En fejl opstod under hævning af transaktion i OnPay." -#: woocommerce-onpay.php:1128 +#: woocommerce-onpay.php:1221 msgid "UnionPay" msgstr "UnionPay" -#: woocommerce-onpay.php:791 +#: woocommerce-onpay.php:880 msgid "User" msgstr "Bruger" -#: woocommerce-onpay.php:433 classes/gateway-viabill.php:38 +#: woocommerce-onpay.php:595 classes/gateway-viabill.php:38 msgid "ViaBill" msgstr "ViaBill" -#: woocommerce-onpay.php:421 classes/gateway-vipps.php:38 +#: woocommerce-onpay.php:583 classes/gateway-vipps.php:38 msgid "Vipps" msgstr "Vipps" -#: woocommerce-onpay.php:1129 +#: woocommerce-onpay.php:1222 msgid "Visa/VPay/Visa Electron " msgstr "Visa/VPay/Visa Electron" -#: woocommerce-onpay.php:850 +#: woocommerce-onpay.php:939 msgid "" "When finishing or cancelling a transaction, no further capturing of amount " "will be possible on transaction." diff --git a/languages/wc-onpay.pot b/languages/wc-onpay.pot index f2e40ff..474322e 100644 --- a/languages/wc-onpay.pot +++ b/languages/wc-onpay.pot @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: OnPay.io for WooCommerce\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-04-14 12:17+0000\n" +"POT-Creation-Date: 2023-09-05 08:50+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Language-Team: \n" "Language: \n" @@ -13,103 +13,107 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Loco https://localise.biz/" -#: woocommerce-onpay.php:789 +#: woocommerce-onpay.php:878 msgid "Action" msgstr "" -#: woocommerce-onpay.php:1121 +#: woocommerce-onpay.php:1214 msgid "American Express/AMEX" msgstr "" -#: woocommerce-onpay.php:779 woocommerce-onpay.php:790 +#: woocommerce-onpay.php:868 woocommerce-onpay.php:879 msgid "Amount" msgstr "" -#: woocommerce-onpay.php:709 +#: woocommerce-onpay.php:798 msgid "Amount automatically refunded on transaction in OnPay." msgstr "" -#: woocommerce-onpay.php:668 woocommerce-onpay.php:669 +#: woocommerce-onpay.php:757 woocommerce-onpay.php:758 msgid "Amount captured on transaction in OnPay." msgstr "" -#: woocommerce-onpay.php:675 woocommerce-onpay.php:676 -#: woocommerce-onpay.php:710 +#: woocommerce-onpay.php:764 woocommerce-onpay.php:765 +#: woocommerce-onpay.php:799 msgid "Amount refunded on transaction in OnPay." msgstr "" -#: woocommerce-onpay.php:913 +#: woocommerce-onpay.php:992 msgid "An error occured cancelling subscription in OnPay." msgstr "" -#: woocommerce-onpay.php:439 classes/gateway-anyday.php:38 +#: woocommerce-onpay.php:601 classes/gateway-anyday.php:38 msgid "Anyday" msgstr "" -#: woocommerce-onpay.php:403 classes/gateway-applepay.php:38 +#: woocommerce-onpay.php:565 classes/gateway-applepay.php:38 msgid "Apple Pay" msgstr "" -#: woocommerce-onpay.php:560 +#: woocommerce-onpay.php:657 msgid "Are you sure you want to logout from Onpay?" msgstr "" -#: woocommerce-onpay.php:561 +#: woocommerce-onpay.php:658 msgid "Are you sure you want to refresh gateway ID and secret?" msgstr "" -#: woocommerce-onpay.php:883 woocommerce-onpay.php:884 +#: classes/abstract-gateway.php:73 +msgid "Authorized connection to OnPay failed" +msgstr "" + +#: woocommerce-onpay.php:972 woocommerce-onpay.php:973 msgid "Authorizing new transaction failed." msgstr "" -#: woocommerce-onpay.php:483 +#: woocommerce-onpay.php:521 msgid "Automatic capture" msgstr "" -#: woocommerce-onpay.php:484 +#: woocommerce-onpay.php:522 msgid "Automatic capture of transactions on status completed" msgstr "" -#: woocommerce-onpay.php:485 +#: woocommerce-onpay.php:622 +msgid "Automatic payment window language" +msgstr "" + +#: woocommerce-onpay.php:523 msgid "" "Automatically capture remaining amounts on transactions, when orders are " "marked with status completed" msgstr "" -#: woocommerce-onpay.php:480 -msgid "Backoffice settings" -msgstr "" - -#: woocommerce-onpay.php:834 woocommerce-onpay.php:844 -#: woocommerce-onpay.php:853 +#: woocommerce-onpay.php:923 woocommerce-onpay.php:933 +#: woocommerce-onpay.php:942 msgid "Cancel" msgstr "" -#: woocommerce-onpay.php:823 woocommerce-onpay.php:852 +#: woocommerce-onpay.php:912 woocommerce-onpay.php:941 msgid "Cancel transaction" msgstr "" -#: woocommerce-onpay.php:813 woocommerce-onpay.php:833 +#: woocommerce-onpay.php:902 woocommerce-onpay.php:922 msgid "Capture" msgstr "" -#: woocommerce-onpay.php:391 +#: woocommerce-onpay.php:541 msgid "Card" msgstr "" -#: woocommerce-onpay.php:466 +#: woocommerce-onpay.php:547 msgid "Card logos" msgstr "" -#: woocommerce-onpay.php:468 +#: woocommerce-onpay.php:549 msgid "Card logos shown for the Card payment method." msgstr "" -#: woocommerce-onpay.php:776 +#: woocommerce-onpay.php:865 msgid "Card type" msgstr "" -#: woocommerce-onpay.php:780 +#: woocommerce-onpay.php:869 msgid "Charged" msgstr "" @@ -117,125 +121,129 @@ msgstr "" msgid "Credit card" msgstr "" -#: woocommerce-onpay.php:1101 +#: woocommerce-onpay.php:1194 msgid "Danish" msgstr "" -#: woocommerce-onpay.php:1122 +#: woocommerce-onpay.php:1215 msgid "Dankort" msgstr "" -#: woocommerce-onpay.php:788 +#: woocommerce-onpay.php:877 msgid "Date & Time" msgstr "" -#: woocommerce-onpay.php:1085 +#: woocommerce-onpay.php:1178 msgid "Default design" msgstr "" -#: woocommerce-onpay.php:1123 +#: woocommerce-onpay.php:1216 msgid "Diners" msgstr "" -#: woocommerce-onpay.php:1124 +#: woocommerce-onpay.php:1217 msgid "Discover" msgstr "" -#: woocommerce-onpay.php:1170 +#: woocommerce-onpay.php:1263 msgid "" "Don't have an OnPay account yet? Order one through DanDomain from DKK 0,- " "per month." msgstr "" -#: woocommerce-onpay.php:1102 +#: woocommerce-onpay.php:1195 msgid "Dutch" msgstr "" -#: woocommerce-onpay.php:440 +#: woocommerce-onpay.php:602 msgid "Enable Anyday as payment method" msgstr "" -#: woocommerce-onpay.php:404 +#: woocommerce-onpay.php:566 msgid "" "Enable Apple Pay as payment method (Only shown if customer browser supports " "method)" msgstr "" -#: woocommerce-onpay.php:392 +#: woocommerce-onpay.php:542 msgid "Enable card as payment method" msgstr "" -#: woocommerce-onpay.php:410 +#: woocommerce-onpay.php:572 msgid "" "Enable Google Pay as payment method (Only shown if customer browser supports " "method)" msgstr "" -#: woocommerce-onpay.php:398 +#: woocommerce-onpay.php:560 msgid "Enable MobilePay Online as payment method" msgstr "" -#: woocommerce-onpay.php:416 +#: woocommerce-onpay.php:578 msgid "Enable PayPal as payment method" msgstr "" -#: woocommerce-onpay.php:428 +#: woocommerce-onpay.php:590 msgid "Enable Swish as payment method" msgstr "" -#: woocommerce-onpay.php:434 +#: woocommerce-onpay.php:596 msgid "Enable ViaBill as payment method" msgstr "" -#: woocommerce-onpay.php:422 +#: woocommerce-onpay.php:584 msgid "Enable Vipps as payment method" msgstr "" -#: woocommerce-onpay.php:1100 +#: woocommerce-onpay.php:1193 msgid "English" msgstr "" -#: woocommerce-onpay.php:745 +#: woocommerce-onpay.php:834 msgid "Error: " msgstr "" -#: woocommerce-onpay.php:1103 +#: woocommerce-onpay.php:1196 msgid "Faroese" msgstr "" -#: woocommerce-onpay.php:823 woocommerce-onpay.php:852 +#: woocommerce-onpay.php:912 woocommerce-onpay.php:941 msgid "Finish transaction" msgstr "" -#: woocommerce-onpay.php:1125 +#: woocommerce-onpay.php:1218 msgid "Forbrugsforeningen" msgstr "" -#: woocommerce-onpay.php:1104 +#: woocommerce-onpay.php:1197 msgid "French" msgstr "" -#: woocommerce-onpay.php:543 +#: woocommerce-onpay.php:641 msgid "Gateway ID" msgstr "" -#: woocommerce-onpay.php:1059 +#: woocommerce-onpay.php:1152 msgid "Gateway ID and secret was refreshed" msgstr "" -#: woocommerce-onpay.php:539 +#: woocommerce-onpay.php:637 msgid "Gateway information" msgstr "" -#: woocommerce-onpay.php:1105 +#: woocommerce-onpay.php:470 +msgid "General settings" +msgstr "" + +#: woocommerce-onpay.php:1198 msgid "German" msgstr "" -#: woocommerce-onpay.php:1172 +#: woocommerce-onpay.php:1265 msgid "Get OnPay now" msgstr "" -#: woocommerce-onpay.php:409 classes/gateway-googlepay.php:38 +#: woocommerce-onpay.php:571 classes/gateway-googlepay.php:38 msgid "Google Pay" msgstr "" @@ -243,39 +251,43 @@ msgstr "" msgid "https://onpay.io/" msgstr "" -#: woocommerce-onpay.php:491 +#: woocommerce-onpay.php:529 msgid "Integrate with refund feature" msgstr "" -#: woocommerce-onpay.php:492 +#: woocommerce-onpay.php:530 msgid "Integrate with the built in refund feature in WooCommerce" msgstr "" -#: woocommerce-onpay.php:642 woocommerce-onpay.php:731 +#: classes/abstract-gateway.php:71 +msgid "Invalid data provided. Unable to create OnPay payment" +msgstr "" + +#: woocommerce-onpay.php:731 woocommerce-onpay.php:820 msgid "Invalid OnPay token, please login on settings page" msgstr "" -#: woocommerce-onpay.php:792 +#: woocommerce-onpay.php:881 msgid "IP" msgstr "" -#: woocommerce-onpay.php:1106 +#: woocommerce-onpay.php:1199 msgid "Italian" msgstr "" -#: woocommerce-onpay.php:1126 +#: woocommerce-onpay.php:1219 msgid "JCB" msgstr "" -#: woocommerce-onpay.php:522 +#: woocommerce-onpay.php:429 msgid "Log in with OnPay account" msgstr "" -#: woocommerce-onpay.php:554 +#: woocommerce-onpay.php:652 msgid "Log out from OnPay" msgstr "" -#: woocommerce-onpay.php:1127 +#: woocommerce-onpay.php:1220 msgid "Mastercard/Maestro" msgstr "" @@ -283,31 +295,31 @@ msgstr "" msgid "MobilePay" msgstr "" -#: woocommerce-onpay.php:397 +#: woocommerce-onpay.php:559 msgid "MobilePay Online" msgstr "" -#: woocommerce-onpay.php:516 woocommerce-onpay.php:640 -#: woocommerce-onpay.php:728 +#: woocommerce-onpay.php:422 woocommerce-onpay.php:729 +#: woocommerce-onpay.php:817 msgid "No connection to OnPay" msgstr "" -#: woocommerce-onpay.php:1107 +#: woocommerce-onpay.php:1200 msgid "Norwegian" msgstr "" -#: woocommerce-onpay.php:684 +#: woocommerce-onpay.php:773 msgid "OnPay error: " msgstr "" -#: woocommerce-onpay.php:1174 +#: woocommerce-onpay.php:1267 msgid "OnPay sellers" msgstr "" #. Author of the plugin -#: woocommerce-onpay.php:112 woocommerce-onpay.php:507 -#: woocommerce-onpay.php:617 classes/abstract-gateway.php:44 -#: classes/abstract-gateway.php:47 +#: woocommerce-onpay.php:114 woocommerce-onpay.php:414 +#: woocommerce-onpay.php:706 classes/abstract-gateway.php:40 +#: classes/abstract-gateway.php:43 msgid "OnPay.io" msgstr "" @@ -319,7 +331,11 @@ msgstr "" msgid "OnPay.io payment plugin for WooCommerce" msgstr "" -#: woocommerce-onpay.php:387 +#: woocommerce-onpay.php:625 +msgid "Overrides language chosen above, and instead use frontoffice language" +msgstr "" + +#: woocommerce-onpay.php:471 msgid "Payment methods" msgstr "" @@ -359,176 +375,176 @@ msgstr "" msgid "Payment using MobilePay" msgstr "" -#: woocommerce-onpay.php:447 +#: woocommerce-onpay.php:472 msgid "Payment window" msgstr "" -#: woocommerce-onpay.php:450 +#: woocommerce-onpay.php:612 msgid "Payment window design" msgstr "" -#: woocommerce-onpay.php:455 +#: woocommerce-onpay.php:617 msgid "Payment window language" msgstr "" -#: woocommerce-onpay.php:415 classes/gateway-paypal.php:38 +#: woocommerce-onpay.php:577 classes/gateway-paypal.php:38 msgid "PayPal" msgstr "" -#: woocommerce-onpay.php:740 +#: woocommerce-onpay.php:829 msgid "Pending payment" msgstr "" -#: woocommerce-onpay.php:830 +#: woocommerce-onpay.php:919 msgid "Please enter amount to capture" msgstr "" -#: woocommerce-onpay.php:840 +#: woocommerce-onpay.php:929 msgid "Please enter amount to refund" msgstr "" -#: woocommerce-onpay.php:1108 +#: woocommerce-onpay.php:1201 msgid "Polish" msgstr "" -#: woocommerce-onpay.php:114 woocommerce-onpay.php:508 +#: woocommerce-onpay.php:116 msgid "Receive payments with cards and more through OnPay.io" msgstr "" -#: woocommerce-onpay.php:554 +#: woocommerce-onpay.php:652 msgid "Refresh" msgstr "" -#: woocommerce-onpay.php:818 woocommerce-onpay.php:843 +#: woocommerce-onpay.php:907 woocommerce-onpay.php:932 msgid "Refund" msgstr "" -#: woocommerce-onpay.php:781 +#: woocommerce-onpay.php:870 msgid "Refunded" msgstr "" -#: woocommerce-onpay.php:548 +#: woocommerce-onpay.php:646 msgid "Secret" msgstr "" -#: woocommerce-onpay.php:472 +#: woocommerce-onpay.php:553 msgid "Select logos" msgstr "" -#: woocommerce-onpay.php:1210 +#: woocommerce-onpay.php:1351 msgid "Settings" msgstr "" -#: woocommerce-onpay.php:1109 +#: woocommerce-onpay.php:1202 msgid "Spanish" msgstr "" -#: woocommerce-onpay.php:769 +#: woocommerce-onpay.php:858 msgid "Status" msgstr "" -#: woocommerce-onpay.php:637 +#: woocommerce-onpay.php:726 msgid "" "Status changed to completed. Amount was automatically captured on " "transaction in OnPay." msgstr "" -#: woocommerce-onpay.php:355 +#: woocommerce-onpay.php:379 msgid "" "Subscription added, please continue with payment for the rest of the order." msgstr "" -#: woocommerce-onpay.php:362 +#: woocommerce-onpay.php:386 msgid "" "Subscription added, please continue with the rest of the order from the list " "below." msgstr "" -#: woocommerce-onpay.php:233 +#: woocommerce-onpay.php:238 msgid "Subscription authorized in OnPay." msgstr "" -#: woocommerce-onpay.php:915 +#: woocommerce-onpay.php:994 msgid "Subscription cancelled in OnPay." msgstr "" -#: woocommerce-onpay.php:876 +#: woocommerce-onpay.php:965 msgid "Subscription no longer active in OnPay." msgstr "" -#: woocommerce-onpay.php:264 +#: woocommerce-onpay.php:288 msgid "Subscription updated with new payment info in OnPay." msgstr "" -#: woocommerce-onpay.php:1110 +#: woocommerce-onpay.php:1203 msgid "Swedish" msgstr "" -#: woocommerce-onpay.php:427 classes/gateway-swish.php:38 +#: woocommerce-onpay.php:589 classes/gateway-swish.php:38 msgid "Swish" msgstr "" -#: woocommerce-onpay.php:460 +#: woocommerce-onpay.php:628 msgid "Test Mode" msgstr "" -#: woocommerce-onpay.php:376 +#: woocommerce-onpay.php:400 msgid "The payment failed. Please try again." msgstr "" -#: woocommerce-onpay.php:760 +#: woocommerce-onpay.php:849 msgid "This transaction was performed in testmode." msgstr "" -#: woocommerce-onpay.php:254 woocommerce-onpay.php:891 +#: woocommerce-onpay.php:260 woocommerce-onpay.php:980 msgid "Transaction authorized in OnPay. Remember to capture amount." msgstr "" -#: woocommerce-onpay.php:767 +#: woocommerce-onpay.php:856 msgid "Transaction details" msgstr "" -#: woocommerce-onpay.php:680 woocommerce-onpay.php:681 +#: woocommerce-onpay.php:769 woocommerce-onpay.php:770 msgid "Transaction finished/cancelled in OnPay." msgstr "" -#: woocommerce-onpay.php:786 +#: woocommerce-onpay.php:875 msgid "Transaction history" msgstr "" -#: woocommerce-onpay.php:778 +#: woocommerce-onpay.php:867 msgid "Transaction number" msgstr "" -#: woocommerce-onpay.php:712 +#: woocommerce-onpay.php:801 msgid "Unable to automatically refund on transaction in OnPay." msgstr "" -#: woocommerce-onpay.php:713 +#: woocommerce-onpay.php:802 msgid "Unable to refund on transaction in OnPay." msgstr "" -#: woocommerce-onpay.php:1128 +#: woocommerce-onpay.php:1221 msgid "UnionPay" msgstr "" -#: woocommerce-onpay.php:791 +#: woocommerce-onpay.php:880 msgid "User" msgstr "" -#: woocommerce-onpay.php:433 classes/gateway-viabill.php:38 +#: woocommerce-onpay.php:595 classes/gateway-viabill.php:38 msgid "ViaBill" msgstr "" -#: woocommerce-onpay.php:421 classes/gateway-vipps.php:38 +#: woocommerce-onpay.php:583 classes/gateway-vipps.php:38 msgid "Vipps" msgstr "" -#: woocommerce-onpay.php:1129 +#: woocommerce-onpay.php:1222 msgid "Visa/VPay/Visa Electron " msgstr "" -#: woocommerce-onpay.php:850 +#: woocommerce-onpay.php:939 msgid "" "When finishing or cancelling a transaction, no further capturing of amount " "will be possible on transaction."