diff --git a/appinfo/info.xml b/appinfo/info.xml
index 862a815d7d915cb8cea063b4e0fc21dd7eddb522..15e14c15b0e7a6e0f12b659a4fb851c0aa1c49f6 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -10,7 +10,7 @@
- 2.3.4
+ 2.4.0agplAkhil PotukuchiEcloudAccounts
diff --git a/appinfo/routes.php b/appinfo/routes.php
index db6f2a5a33a19e2a4f771d7b14cb93621fc4aee9..b4eb6822029af966b5d3137f84643d5332a14de5 100644
--- a/appinfo/routes.php
+++ b/appinfo/routes.php
@@ -7,6 +7,7 @@ return ['routes' => [
['name' => 'shop_account#set_shop_email_post_delete', 'url' => '/shop-accounts/set_shop_email_post_delete', 'verb' => 'POST' ],
['name' => 'shop_account#set_shop_delete_preference', 'url' => '/shop-accounts/set_shop_delete_preference', 'verb' => 'POST' ],
['name' => 'shop_account#get_order_info', 'url' => '/shop-accounts/order_info', 'verb' => 'GET'],
+ ['name' => 'shop_account#get_subscription_info', 'url' => '/shop-accounts/subscription_info', 'verb' => 'GET'],
['name' => 'shop_account#get_shop_user', 'url' => '/shop-accounts/user', 'verb' => 'GET'],
['name' => 'shop_account#check_shop_email_post_delete', 'url' => '/shop-accounts/check_shop_email_post_delete', 'verb' => 'GET'],
[
diff --git a/l10n/de.js b/l10n/de.js
index 17cc4feb1003039ced73f9bac10fb575f1543900..d6e8e0518469951bd63dd2ae8a1ef74ee85fb424 100644
--- a/l10n/de.js
+++ b/l10n/de.js
@@ -3,8 +3,9 @@ OC.L10N.register(
{
"Email Address": "E-Mail Adresse",
"Options": "Optionen",
- "We are going to proceed with your cloud account suppression. Check the box below if you also want to delete the associated shop account.": "Wir werden mit der Löschung Ihres Cloud-Kontos fortfahren. Markieren Sie das Kästchen unten, wenn Sie auch das zugehörige Shop-Konto löschen möchten.",
- "For your information you have %d order(s) in your account.": "Zu Ihrer Information: Sie haben %d Auftrag(e) in Ihrem Konto.",
+ "We are going to proceed with your cloud account suppression.": "Wir werden mit der Löschung Ihres Cloud-Kontos fortfahren.",
+ "Check the box below if you also want to delete the associated shop account.": "Markieren Sie das Kästchen unten, wenn Sie auch das zugehörige Shop-Konto löschen möchten.",
+ "For your information you have %d order(s) in your account.": "Zu Ihrer Information: Sie haben %d Auftrag(e) in Ihrem Konto.",
"I also want to delete my shop account": "Ich möchte auch mein Shop-Konto löschen",
"If you want to keep your shop account please validate or modify the email address below. This email address will become your new login to the shop. ": "Wenn Sie Ihr Shop-Konto behalten möchten, bestätigen oder ändern Sie bitte die E-Mail-Adresse unten. Diese E-Mail-Adresse wird Ihr neues Login für den Shop sein. ",
"Error while setting shop delete preference": "Fehler beim Einstellen der Shop-Löschpräferenz",
@@ -33,6 +34,9 @@ OC.L10N.register(
"Experimental": "Experimentelle",
"Title is mandatory.": "Der Titel ist obligatorisch.",
"Description is mandatory.": "Die Beschreibung ist obligatorisch.",
- "Here is the list of currently available beta features:": "Hier ist die Liste der derzeit verfügbaren Beta-Funktionen:"
+ "Here is the list of currently available beta features:": "Hier ist die Liste der derzeit verfügbaren Beta-Funktionen:",
+ "A subscription is active in this account. Please cancel it or let it expire before deleting your account.": "Für dieses Konto ist ein Abonnement aktiv. Bitte kündigen Sie es oder lassen Sie es auslaufen, bevor Sie Ihr Konto löschen.",
+ "Loading...": "Laden...",
+ "Temporary error contacting murena.com; please try again later!": "Vorübergehender Fehler bei der Kontaktaufnahme mit murena.com; bitte versuchen Sie es später noch einmal!"
},
"nplurals=2; plural=(n != 1);");
diff --git a/l10n/de.json b/l10n/de.json
index a0cf4e193345ce461f5ae18b37d7e8551fe5775e..f83d494937b378c68e37474ff8001f7b1074e996 100644
--- a/l10n/de.json
+++ b/l10n/de.json
@@ -2,8 +2,9 @@
"translations": {
"Email Address": "E-Mail Adresse",
"Options": "Optionen",
- "We are going to proceed with your cloud account suppression. Check the box below if you also want to delete the associated shop account.": "Wir werden mit der Löschung Ihres Cloud-Kontos fortfahren. Markieren Sie das Kästchen unten, wenn Sie auch das zugehörige Shop-Konto löschen möchten.",
- "For your information you have %d order(s) in your account.": "Zu Ihrer Information: Sie haben %d Auftrag(e) in Ihrem Konto.",
+ "We are going to proceed with your cloud account suppression.": "Wir werden mit der Löschung Ihres Cloud-Kontos fortfahren.",
+ "Check the box below if you also want to delete the associated shop account.": "Markieren Sie das Kästchen unten, wenn Sie auch das zugehörige Shop-Konto löschen möchten.",
+ "For your information you have %d order(s) in your account.": "Zu Ihrer Information: Sie haben %d Auftrag(e) in Ihrem Konto.",
"I also want to delete my shop account": "Ich möchte auch mein Shop-Konto löschen",
"If you want to keep your shop account please validate or modify the email address below. This email address will become your new login to the shop. ": "Wenn Sie Ihr Shop-Konto behalten möchten, bestätigen oder ändern Sie bitte die E-Mail-Adresse unten. Diese E-Mail-Adresse wird Ihr neues Login für den Shop sein. ",
"Error while setting shop delete preference": "Fehler beim Einstellen der Shop-Löschpräferenz",
@@ -32,7 +33,10 @@
"Experimental": "Experimentelle",
"Title is mandatory.": "Der Titel ist obligatorisch.",
"Description is mandatory.": "Die Beschreibung ist obligatorisch.",
- "Here is the list of currently available beta features:": "Hier ist die Liste der derzeit verfügbaren Beta-Funktionen:"
+ "Here is the list of currently available beta features:": "Hier ist die Liste der derzeit verfügbaren Beta-Funktionen:",
+ "A subscription is active in this account. Please cancel it or let it expire before deleting your account.": "Für dieses Konto ist ein Abonnement aktiv. Bitte kündigen Sie es oder lassen Sie es auslaufen, bevor Sie Ihr Konto löschen.",
+ "Loading...": "Laden...",
+ "Temporary error contacting murena.com; please try again later!": "Vorübergehender Fehler bei der Kontaktaufnahme mit murena.com; bitte versuchen Sie es später noch einmal!"
},
"pluralForm": "nplurals=2; plural=(n != 1);"
}
diff --git a/l10n/en.js b/l10n/en.js
index 323d5a0d428d9555977331e1f839a5d599d8141a..af35aee28d564748292cd9697ace472d49435fe5 100644
--- a/l10n/en.js
+++ b/l10n/en.js
@@ -3,8 +3,9 @@ OC.L10N.register(
{
"Email Address": "Email Address",
"Options": "Options",
- "We are going to proceed with your cloud account suppression. Check the box below if you also want to delete the associated shop account.": "We are going to proceed with your cloud account suppression. Check the box below if you also want to delete the associated shop account.",
- "For your information you have %d order(s) in your account.": "For your information you have %d order(s) in your account.",
+ "We are going to proceed with your cloud account suppression.": "We are going to proceed with your cloud account suppression.",
+ "Check the box below if you also want to delete the associated shop account.": "Check the box below if you also want to delete the associated shop account.",
+ "For your information you have %d order(s) in your account.": "For your information you have %d order(s) in your account.",
"I also want to delete my shop account": "I also want to delete my shop account",
"If you want to keep your shop account please validate or modify the email address below. This email address will become your new login to the shop. ": "If you want to keep your shop account please validate or modify the email address below. This email address will become your new login to the shop. ",
"Error while setting shop delete preference": "Error while setting shop delete preference",
@@ -33,6 +34,9 @@ OC.L10N.register(
"Experimental": "Experimental",
"Title is mandatory.": "Title is mandatory.",
"Description is mandatory.": "Description is mandatory.",
- "Here is the list of currently available beta features:": "Here is the list of currently available beta features:"
+ "Here is the list of currently available beta features:": "Here is the list of currently available beta features:",
+ "A subscription is active in this account. Please cancel it or let it expire before deleting your account.": "A subscription is active in this account. Please cancel it or let it expire before deleting your account.",
+ "Loading...": "Loading...",
+ "Temporary error contacting murena.com; please try again later!": "Temporary error contacting murena.com; please try again later!"
},
"nplurals=2; plural=(n != 1);");
diff --git a/l10n/en.json b/l10n/en.json
index f4232e511ca84b42af496d444bd89d17e45932ba..ea45c32612cfcc89d904aae4ef6440b74c397cd2 100644
--- a/l10n/en.json
+++ b/l10n/en.json
@@ -2,8 +2,9 @@
"translations": {
"Email Address": "Email Address",
"Options": "Options",
- "We are going to proceed with your cloud account suppression. Check the box below if you also want to delete the associated shop account.": "We are going to proceed with your cloud account suppression. Check the box below if you also want to delete the associated shop account.",
- "For your information you have %d order(s) in your account.": "For your information you have %d order(s) in your account.",
+ "We are going to proceed with your cloud account suppression.": "We are going to proceed with your cloud account suppression.",
+ "Check the box below if you also want to delete the associated shop account.": "Check the box below if you also want to delete the associated shop account.",
+ "For your information you have %d order(s) in your account.": "For your information you have %d order(s) in your account.",
"I also want to delete my shop account": "I also want to delete my shop account",
"If you want to keep your shop account please validate or modify the email address below. This email address will become your new login to the shop. ": "If you want to keep your shop account please validate or modify the email address below. This email address will become your new login to the shop. ",
"Error while setting shop delete preference": "Error while setting shop delete preference",
@@ -32,7 +33,10 @@
"Experimental": "Experimental",
"Title is mandatory.": "Title is mandatory.",
"Description is mandatory.": "Description is mandatory.",
- "Here is the list of currently available beta features:": "Here is the list of currently available beta features:"
+ "Here is the list of currently available beta features:": "Here is the list of currently available beta features:",
+ "A subscription is active in this account. Please cancel it or let it expire before deleting your account.": "A subscription is active in this account. Please cancel it or let it expire before deleting your account.",
+ "Loading...": "Loading...",
+ "Temporary error contacting murena.com; please try again later!": "Temporary error contacting murena.com; please try again later!"
},
"pluralForm": "nplurals=2; plural=(n != 1);"
}
diff --git a/l10n/es.js b/l10n/es.js
index 56a8a041757f186d8c7fa73678365cce4da4f485..e241ca0be7d4b9af6191a2f13d38b70fe9be3990 100644
--- a/l10n/es.js
+++ b/l10n/es.js
@@ -3,8 +3,9 @@ OC.L10N.register(
{
"Email Address": "Correo electrónico",
"Options": "Opciones",
- "We are going to proceed with your cloud account suppression. Check the box below if you also want to delete the associated shop account.": "Vamos a proceder a la supresión de su cuenta en la nube. Marca la casilla de abajo si también quieres eliminar la cuenta de la tienda asociada.",
- "For your information you have %d order(s) in your account.": "Para su información tiene %d orden(es) en su cuenta.",
+ "We are going to proceed with your cloud account suppression.": "Vamos a proceder a la supresión de su cuenta en la nube.",
+ "Check the box below if you also want to delete the associated shop account.": "Marca la casilla de abajo si también quieres eliminar la cuenta de la tienda asociada.",
+ "For your information you have %d order(s) in your account.": "Para su información tiene %d orden(es) en su cuenta.",
"I also want to delete my shop account": "También quiero borrar mi cuenta de la tienda",
"If you want to keep your shop account please validate or modify the email address below. This email address will become your new login to the shop. ": "Si quieres mantener tu cuenta de la tienda, valida o modifica la dirección de correo electrónico que aparece a continuación. Esta dirección de correo electrónico se convertirá en su nuevo acceso a la tienda. ",
"Error while setting shop delete preference": "Error al configurar la preferencia de eliminación de la tienda",
@@ -34,6 +35,9 @@ OC.L10N.register(
"Experimental": "Experimento",
"Title is mandatory.": "El título es obligatorio.",
"Description is mandatory.": "La descripción es obligatoria.",
- "Here is the list of currently available beta features:": "Esta es la lista de funciones de la versión beta disponibles actualmente:"
+ "Here is the list of currently available beta features:": "Esta es la lista de funciones de la versión beta disponibles actualmente:",
+ "A subscription is active in this account. Please cancel it or let it expire before deleting your account.": "Hay una suscripción activa en esta cuenta. Por favor, cancélala o deja que expire antes de eliminar tu cuenta.",
+ "Loading...": "Cargando...",
+ "Temporary error contacting murena.com; please try again later!": "Error temporal al contactar con murena.com; ¡por favor, inténtalo más tarde!"
},
"nplurals=2; plural=(n != 1);");
diff --git a/l10n/es.json b/l10n/es.json
index 4db89166c3f5a533825dc0d2d45006ce0f7a4775..b92ea24464341cd72c6ae781ea756a4fa681bee8 100644
--- a/l10n/es.json
+++ b/l10n/es.json
@@ -2,8 +2,9 @@
"translations": {
"Email Address": "Correo electrónico",
"Options": "Opciones",
- "We are going to proceed with your cloud account suppression. Check the box below if you also want to delete the associated shop account.": "Vamos a proceder a la supresión de su cuenta en la nube. Marca la casilla de abajo si también quieres eliminar la cuenta de la tienda asociada.",
- "For your information you have %d order(s) in your account.": "Para su información tiene %d orden(es) en su cuenta.",
+ "We are going to proceed with your cloud account suppression.": "Vamos a proceder a la supresión de su cuenta en la nube. ",
+ "Check the box below if you also want to delete the associated shop account.": "Marca la casilla de abajo si también quieres eliminar la cuenta de la tienda asociada.",
+ "For your information you have %d order(s) in your account.": "Para su información tiene %d orden(es) en su cuenta.",
"I also want to delete my shop account": "También quiero borrar mi cuenta de la tienda",
"If you want to keep your shop account please validate or modify the email address below. This email address will become your new login to the shop. ": "Si quieres mantener tu cuenta de la tienda, valida o modifica la dirección de correo electrónico que aparece a continuación. Esta dirección de correo electrónico se convertirá en su nuevo acceso a la tienda. ",
"Error while setting shop delete preference": "Error al configurar la preferencia de eliminación de la tienda",
@@ -32,7 +33,10 @@
"Experimental": "Experimento",
"Title is mandatory.": "El título es obligatorio.",
"Description is mandatory.": "La descripción es obligatoria.",
- "Here is the list of currently available beta features:": "Esta es la lista de funciones de la versión beta disponibles actualmente:"
+ "Here is the list of currently available beta features:": "Esta es la lista de funciones de la versión beta disponibles actualmente:",
+ "A subscription is active in this account. Please cancel it or let it expire before deleting your account.": "Hay una suscripción activa en esta cuenta. Por favor, cancélala o deja que expire antes de eliminar tu cuenta.",
+ "Loading...": "Cargando...",
+ "Temporary error contacting murena.com; please try again later!": "Error temporal al contactar con murena.com; ¡por favor, inténtalo más tarde!"
},
"pluralForm": "nplurals=2; plural=(n != 1);"
}
diff --git a/l10n/fr.js b/l10n/fr.js
index 6cbd03937bb190bcce3181020c83916dbb272770..16ef52565fd21640309734e860ce54f409ad8a80 100644
--- a/l10n/fr.js
+++ b/l10n/fr.js
@@ -3,8 +3,9 @@ OC.L10N.register(
{
"Email Address": "Adresse e-mail",
"Options": "Options",
- "We are going to proceed with your cloud account suppression. Check the box below if you also want to delete the associated shop account.": "Nous allons procéder à la suppression de votre compte cloud. Cochez la case ci-dessous si vous souhaitez également supprimer le compte boutique associé.",
- "For your information you have %d order(s) in your account.": "Pour votre information, vous avez %d ordre(s) en votre compte.",
+ "We are going to proceed with your cloud account suppression.": "Nous allons procéder à la suppression de votre compte cloud.",
+ "Check the box below if you also want to delete the associated shop account.": "Cochez la case ci-dessous si vous souhaitez également supprimer le compte boutique associé.",
+ "For your information you have %d order(s) in your account.": "Pour votre information, vous avez %d ordre(s) en votre compte.",
"I also want to delete my shop account": "I also want to delete my shop account",
"If you want to keep your shop account please validate or modify the email address below. This email address will become your new login to the shop. ": "Si vous souhaitez conserver votre compte boutique, veuillez valider ou modifier l'adresse e-mail ci-dessous. Cette adresse email deviendra votre nouveau login pour la boutique. ",
"Error while setting shop delete preference": "Erreur lors de la configuration de la préférence de suppression de boutique",
@@ -33,6 +34,9 @@ OC.L10N.register(
"Experimental": "Expérimental",
"Title is mandatory.": "Le titre est obligatoire.",
"Description is mandatory.": "La description est obligatoire.",
- "Here is the list of currently available beta features:": "Voici la liste des fonctionnalités de la version bêta actuellement disponibles :"
+ "Here is the list of currently available beta features:": "Voici la liste des fonctionnalités de la version bêta actuellement disponibles :",
+ "A subscription is active in this account. Please cancel it or let it expire before deleting your account.": "Un abonnement est actif dans ce compte. Veuillez l'annuler ou le laisser expirer avant de supprimer votre compte.",
+ "Loading...": "Chargement...",
+ "Temporary error contacting murena.com; please try again later!": "Erreur temporaire en contactant murena.com ; veuillez réessayer plus tard !"
},
"nplurals=2; plural=(n != 1);");
diff --git a/l10n/fr.json b/l10n/fr.json
index a91d2a2dd2fa7dc7cf94124880d76999f4069b2c..963b412caf5612d39c86c2b4a4b1847fc470dec5 100644
--- a/l10n/fr.json
+++ b/l10n/fr.json
@@ -2,8 +2,9 @@
"translations": {
"Email Address": "Adresse e-mail",
"Options": "Options",
- "We are going to proceed with your cloud account suppression. Check the box below if you also want to delete the associated shop account.": "Nous allons procéder à la suppression de votre compte cloud. Cochez la case ci-dessous si vous souhaitez également supprimer le compte boutique associé.",
- "For your information you have %d order(s) in your account.": "Pour votre information, vous avez %d ordre(s) en votre compte.",
+ "We are going to proceed with your cloud account suppression.": "Nous allons procéder à la suppression de votre compte cloud.",
+ "Check the box below if you also want to delete the associated shop account.": "Cochez la case ci-dessous si vous souhaitez également supprimer le compte boutique associé.",
+ "For your information you have %d order(s) in your account.": "Pour votre information, vous avez %d ordre(s) en votre compte.",
"I also want to delete my shop account": "I also want to delete my shop account",
"If you want to keep your shop account please validate or modify the email address below. This email address will become your new login to the shop. ": "Si vous souhaitez conserver votre compte boutique, veuillez valider ou modifier l'adresse e-mail ci-dessous. Cette adresse email deviendra votre nouveau login pour la boutique. ",
"Error while setting shop delete preference": "Erreur lors de la configuration de la préférence de suppression de boutique",
@@ -32,7 +33,10 @@
"Experimental": "Expérimental",
"Title is mandatory.": "Le titre est obligatoire.",
"Description is mandatory.": "La description est obligatoire.",
- "Here is the list of currently available beta features:": "Voici la liste des fonctionnalités de la version bêta actuellement disponibles :"
+ "Here is the list of currently available beta features:": "Voici la liste des fonctionnalités de la version bêta actuellement disponibles :",
+ "A subscription is active in this account. Please cancel it or let it expire before deleting your account.": "Un abonnement est actif dans ce compte. Veuillez l'annuler ou le laisser expirer avant de supprimer votre compte.",
+ "Loading...": "Chargement...",
+ "Temporary error contacting murena.com; please try again later!": "Erreur temporaire en contactant murena.com ; veuillez réessayer plus tard !"
},
"pluralForm": "nplurals=2; plural=(n != 1);"
}
diff --git a/l10n/it.js b/l10n/it.js
index 8a53507aa0982658107e36aa50edab4ea95ba65c..209b447a58840acd6cfb24da05c5a2fbdada93be 100644
--- a/l10n/it.js
+++ b/l10n/it.js
@@ -3,8 +3,9 @@ OC.L10N.register(
{
"Email Address": "Indirizzo e-mail",
"Options": "Opzioni",
- "We are going to proceed with your cloud account suppression. Check the box below if you also want to delete the associated shop account.": "Procederemo con la soppressione dell'account cloud. Selezionare la casella sottostante se si desidera eliminare anche l'account del negozio associato.",
- "For your information you have %d order(s) in your account.": "Per vostra informazione, avete %d ordini in il tuo account.",
+ "We are going to proceed with your cloud account suppression.": "Procederemo con la soppressione dell'account cloud.",
+ "Check the box below if you also want to delete the associated shop account.": "Selezionare la casella sottostante se si desidera eliminare anche l'account del negozio associato.",
+ "For your information you have %d order(s) in your account.": "Per vostra informazione, avete %d ordini in il tuo account.",
"I also want to delete my shop account": "Voglio anche cancellare il mio account del negozio",
"If you want to keep your shop account please validate or modify the email address below. This email address will become your new login to the shop. ": "Se volete mantenere il vostro account del negozio, convalidate o modificate l'indirizzo e-mail qui sotto. Questo indirizzo e-mail diventerà il vostro nuovo login al negozio. ",
"Error while setting shop delete preference": "Errore durante l'impostazione della preferenza di cancellazione del negozio",
@@ -33,6 +34,9 @@ OC.L10N.register(
"Experimental": "Sperimentale",
"Title is mandatory.": "Il titolo è obbligatorio.",
"Description is mandatory.": "La descrizione è obbligatoria.",
- "Here is the list of currently available beta features:": "Ecco l'elenco delle funzioni beta attualmente disponibili:"
+ "Here is the list of currently available beta features:": "Ecco l'elenco delle funzioni beta attualmente disponibili:",
+ "A subscription is active in this account. Please cancel it or let it expire before deleting your account.": "In questo account è attivo un abbonamento. Si prega di annullarlo o di lasciarlo scadere prima di cancellare l'account.",
+ "Loading...": "Caricamento...",
+ "Temporary error contacting murena.com; please try again later!": "Errore temporaneo nel contattare murena.com; riprova più tardi!"
},
"nplurals=2; plural=(n != 1);");
diff --git a/l10n/it.json b/l10n/it.json
index 257703bc9c17eb41f644bc33f30027455e1eda77..c5af4a7b30032ea8146fc320ea966ddf7fac36ea 100644
--- a/l10n/it.json
+++ b/l10n/it.json
@@ -2,8 +2,9 @@
"translations": {
"Email Address": "Indirizzo e-mail",
"Options": "Opzioni",
- "We are going to proceed with your cloud account suppression. Check the box below if you also want to delete the associated shop account.": "Procederemo con la soppressione dell'account cloud. Selezionare la casella sottostante se si desidera eliminare anche l'account del negozio associato.",
- "For your information you have %d order(s) in your account.": "Per vostra informazione, avete %d ordini in il tuo account.",
+ "We are going to proceed with your cloud account suppression.": "Procederemo con la soppressione dell'account cloud. ",
+ "Check the box below if you also want to delete the associated shop account.": "Selezionare la casella sottostante se si desidera eliminare anche l'account del negozio associato.",
+ "For your information you have %d order(s) in your account.": "Per vostra informazione, avete %d ordini in il tuo account.",
"I also want to delete my shop account": "Voglio anche cancellare il mio account del negozio",
"If you want to keep your shop account please validate or modify the email address below. This email address will become your new login to the shop. ": "Se volete mantenere il vostro account del negozio, convalidate o modificate l'indirizzo e-mail qui sotto. Questo indirizzo e-mail diventerà il vostro nuovo login al negozio. ",
"Error while setting shop delete preference": "Errore durante l'impostazione della preferenza di cancellazione del negozio",
@@ -32,7 +33,10 @@
"Experimental": "Sperimentale",
"Title is mandatory.": "Il titolo è obbligatorio.",
"Description is mandatory.": "La descrizione è obbligatoria.",
- "Here is the list of currently available beta features:": "Ecco l'elenco delle funzioni beta attualmente disponibili:"
+ "Here is the list of currently available beta features:": "Ecco l'elenco delle funzioni beta attualmente disponibili:",
+ "A subscription is active in this account. Please cancel it or let it expire before deleting your account.": "In questo account è attivo un abbonamento. Si prega di annullarlo o di lasciarlo scadere prima di cancellare l'account.",
+ "Loading...": "Caricamento...",
+ "Temporary error contacting murena.com; please try again later!": "Errore temporaneo nel contattare murena.com; riprova più tardi!"
},
"pluralForm": "nplurals=2; plural=(n != 1);"
}
diff --git a/lib/Controller/ShopAccountController.php b/lib/Controller/ShopAccountController.php
index 78779a4baa34671b783f843d94c026d2d0d9c96b..9aaf62e457e348f3f344829e53a2c0e311aec61a 100644
--- a/lib/Controller/ShopAccountController.php
+++ b/lib/Controller/ShopAccountController.php
@@ -10,15 +10,26 @@ use OCP\IUserSession;
use OCP\IRequest;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\DataResponse;
+use OCP\AppFramework\Http;
+use OCP\ILogger;
class ShopAccountController extends Controller {
private $shopAccountService;
private $userSession;
- public function __construct($appName, IRequest $request, IUserSession $userSession, ShopAccountService $shopAccountService) {
+ private $logger;
+ private const SUBSCRIPTION_STATUS_LIST = [
+ 'pending',
+ 'active',
+ 'on-hold',
+ 'pending-cancel'
+ ];
+
+ public function __construct($appName, IRequest $request, IUserSession $userSession, ShopAccountService $shopAccountService, ILogger $logger) {
parent::__construct($appName, $request);
$this->shopAccountService = $shopAccountService;
$this->userSession = $userSession;
+ $this->logger = $logger;
}
/**
@@ -72,16 +83,48 @@ class ShopAccountController extends Controller {
* @NoAdminRequired
*/
public function getOrderInfo(int $userId) {
- $response = new DataResponse();
- $data = ['count' => 0, 'my_orders_url' => $this->shopAccountService->getShopUrl() . '/my-account/orders'];
- $orders = $this->shopAccountService->getOrders($userId);
-
- if ($orders) {
- $data['count'] = count($orders);
+ try {
+ if (!$userId) {
+ throw new Exception("Invalid user id");
+ }
+ $data = ['order_count' => 0, 'my_orders_url' => $this->shopAccountService->getShopUrl() . '/my-account/orders'];
+ $orders = $this->shopAccountService->getOrders($userId);
+ $data['order_count'] = count($orders);
+ $response = new DataResponse();
+ $response->setData($data);
+ return $response;
+ } catch (Exception $e) {
+ $this->logger->error('There was an issue querying order for user : ' . strval($userId));
+ $this->logger->logException($e, ['app' => Application::APP_ID]);
+ return new DataResponse([], Http::STATUS_BAD_REQUEST);
}
+ }
- $response->setData($data);
- return $response;
+ /**
+ * @NoAdminRequired
+ */
+ public function getSubscriptionInfo(int $userId) {
+ try {
+ if (!$userId) {
+ throw new Exception("Invalid user id");
+ }
+ $data = ['subscription_count' => 0];
+ $subscriptions = $this->shopAccountService->getSubscriptions($userId, 'any');
+ $total_subscriptions = 0;
+ foreach ($subscriptions as $subscription) {
+ if (in_array($subscription['status'], self::SUBSCRIPTION_STATUS_LIST)) {
+ $total_subscriptions++;
+ }
+ }
+ $data['subscription_count'] = $total_subscriptions;
+ $response = new DataResponse();
+ $response->setData($data);
+ return $response;
+ } catch (Exception $e) {
+ $this->logger->error('There was an issue querying subscription for user : ' . strval($userId));
+ $this->logger->logException($e, ['app' => Application::APP_ID]);
+ return new DataResponse([], Http::STATUS_BAD_REQUEST);
+ }
}
/**
diff --git a/lib/Service/ShopAccountService.php b/lib/Service/ShopAccountService.php
index cb2984a28c843f0e17916f31d778e8ed95fc4306..113109b87ce7c76dd0fbc3fa672f235d7b304feb 100644
--- a/lib/Service/ShopAccountService.php
+++ b/lib/Service/ShopAccountService.php
@@ -26,6 +26,7 @@ class ShopAccountService {
$this->shopUserUrl = $this->shopUrl . "/wp-json/wp/v2/users";
$this->shopOrdersUrl = $this->shopUrl . "/wp-json/wc/v3/orders";
+ $this->subscriptionUrl = $this->shopUrl . "/wp-json/wc/v3/subscriptions";
$this->shopCredentials = base64_encode($shopUsername . ":" . $shopPassword);
$this->curl = $curlService;
$this->logger = $logger;
@@ -70,13 +71,7 @@ class ShopAccountService {
}
public function getOrders(int $userId): ?array {
- try {
- return $this->callShopAPI($this->shopOrdersUrl, 'GET', ['customer' => $userId]);
- } catch (Exception $e) {
- $this->logger->error('There was an issue querying shop for orders for user ' . strval($userId));
- $this->logger->logException($e, ['app' => Application::APP_ID]);
- }
- return null;
+ return $this->callShopAPI($this->shopOrdersUrl, 'GET', ['customer' => $userId]);
}
public function getUsers(string $searchTerm): ?array {
@@ -86,7 +81,6 @@ class ShopAccountService {
$this->logger->error('There was an issue querying shop for users');
$this->logger->logException($e, ['app' => Application::APP_ID]);
}
- return null;
}
public function getUser(string $email) : ?array {
@@ -169,4 +163,8 @@ class ShopAccountService {
public function isUserOIDC(array $user) {
return !empty($user['openid-connect-generic-last-user-claim']);
}
+
+ public function getSubscriptions(int $userId, string $status): ?array {
+ return $this->callShopAPI($this->subscriptionUrl, 'GET', ['customer' => $userId , 'status' => $status]);
+ }
}
diff --git a/package-lock.json b/package-lock.json
index 19a1b4b854801c868cf2276639830c15a9f5620c..1a810bbe1b06ee810d96a84abba31de1fb01832e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "ecloud-accounts",
- "version": "2.2.0",
+ "version": "2.4.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "ecloud-accounts",
- "version": "2.2.0",
+ "version": "2.4.0",
"dependencies": {
"@nextcloud/axios": "^2.1.0",
"@nextcloud/dialogs": "^3.2.0",
diff --git a/package.json b/package.json
index 8d9a0b4ca5501a83cff962fe066304a9e518e3a0..587947c1a1bbdaa3a9a204395b0e4c0e92ab21df 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "ecloud-accounts",
- "version": "2.2.0",
+ "version": "2.4.0",
"description": "App for ecloud account management.",
"repository": {
"type": "git",
diff --git a/src/PersonalSettings.vue b/src/PersonalSettings.vue
index ba18881799d5123c864dfed0003e75d3b3e60ace..549e949c56145a35992c7cd07379219f2a89af7c 100644
--- a/src/PersonalSettings.vue
+++ b/src/PersonalSettings.vue
@@ -1,62 +1,77 @@
-
+
{{
- t('ecloud-accounts', 'We are going to proceed with your cloud account suppression. Check the box below if you also want to delete the associated shop account.')
+ t('ecloud-accounts', 'Loading...')
}}
-