From 4d8036f523edd1e53df7e06db1e291fb50ec0fa3 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 17 Sep 2014 17:06:01 +0200 Subject: [PATCH] Added support for paid subscriptions --- com.woltlab.wcf/acpMenu.xml | 23 ++ com.woltlab.wcf/dashboardBox.xml | 10 + com.woltlab.wcf/objectType.xml | 18 + com.woltlab.wcf/objectTypeDefinition.xml | 10 + com.woltlab.wcf/option.xml | 20 ++ .../dashboardBoxPaidSubscriptions.tpl | 22 ++ .../dashboardBoxPaidSubscriptionsSidebar.tpl | 16 + .../templates/paidSubscriptionList.tpl | 102 ++++++ com.woltlab.wcf/userGroupOption.xml | 9 + com.woltlab.wcf/userMenu.xml | 6 + .../acp/templates/paidSubscriptionAdd.tpl | 200 +++++++++++ .../acp/templates/paidSubscriptionList.tpl | 86 +++++ .../paidSubscriptionTransactionLog.tpl | 69 ++++ .../paidSubscriptionTransactionLogList.tpl | 133 ++++++++ .../acp/templates/paidSubscriptionUserAdd.tpl | 82 +++++ .../templates/paidSubscriptionUserList.tpl | 85 +++++ .../paymentMethodSelectOptionType.tpl | 3 + .../form/PaidSubscriptionAddForm.class.php | 323 ++++++++++++++++++ .../form/PaidSubscriptionEditForm.class.php | 166 +++++++++ .../PaidSubscriptionUserAddForm.class.php | 181 ++++++++++ .../page/PaidSubscriptionListPage.class.php | 40 +++ ...bscriptionTransactionLogListPage.class.php | 112 ++++++ ...idSubscriptionTransactionLogPage.class.php | 53 +++ .../PaidSubscriptionUserListPage.class.php | 52 +++ .../lib/action/PaypalCallbackAction.class.php | 89 +++++ .../subscription/PaidSubscription.class.php | 59 ++++ .../PaidSubscriptionAction.class.php | 77 +++++ .../PaidSubscriptionEditor.class.php | 66 ++++ .../PaidSubscriptionList.class.php | 15 + .../PaidSubscriptionTransactionLog.class.php | 108 ++++++ ...SubscriptionTransactionLogAction.class.php | 15 + ...SubscriptionTransactionLogEditor.class.php | 20 ++ ...idSubscriptionTransactionLogList.class.php | 15 + .../user/PaidSubscriptionUser.class.php | 77 +++++ .../user/PaidSubscriptionUserAction.class.php | 236 +++++++++++++ .../user/PaidSubscriptionUserEditor.class.php | 20 ++ .../user/PaidSubscriptionUserList.class.php | 15 + .../page/PaidSubscriptionListPage.class.php | 92 +++++ .../page/PaidSubscriptionReturnPage.class.php | 31 ++ .../PaidSubscriptionCacheBuilder.class.php | 27 ++ .../cronjob/HourlyCleanUpCronjob.class.php | 22 +- .../PaidSubscriptionsDashboardBox.class.php | 75 ++++ ...SubscriptionsSidebarDashboardBox.class.php | 75 ++++ .../PaymentMethodSelectOptionType.class.php | 55 +++ .../method/AbstractPaymentMethod.class.php | 21 ++ .../payment/method/IPaymentMethod.class.php | 45 +++ .../method/PaymentMethodHandler.class.php | 65 ++++ .../method/PaypalPaymentMethod.class.php | 109 ++++++ .../SofortUeberweisungPaymentMethod.class.php | 30 ++ .../type/AbstractPaymentType.class.php | 14 + .../payment/type/IPaymentType.class.php | 27 ++ .../PaidSubscriptionPaymentType.class.php | 125 +++++++ wcfsetup/install/files/style/user.less | 21 ++ wcfsetup/install/lang/de.xml | 65 ++++ wcfsetup/install/lang/en.xml | 65 ++++ wcfsetup/setup/db/install.sql | 50 +++ 56 files changed, 3646 insertions(+), 1 deletion(-) create mode 100644 com.woltlab.wcf/templates/dashboardBoxPaidSubscriptions.tpl create mode 100644 com.woltlab.wcf/templates/dashboardBoxPaidSubscriptionsSidebar.tpl create mode 100644 com.woltlab.wcf/templates/paidSubscriptionList.tpl create mode 100644 wcfsetup/install/files/acp/templates/paidSubscriptionAdd.tpl create mode 100644 wcfsetup/install/files/acp/templates/paidSubscriptionList.tpl create mode 100644 wcfsetup/install/files/acp/templates/paidSubscriptionTransactionLog.tpl create mode 100644 wcfsetup/install/files/acp/templates/paidSubscriptionTransactionLogList.tpl create mode 100644 wcfsetup/install/files/acp/templates/paidSubscriptionUserAdd.tpl create mode 100644 wcfsetup/install/files/acp/templates/paidSubscriptionUserList.tpl create mode 100644 wcfsetup/install/files/acp/templates/paymentMethodSelectOptionType.tpl create mode 100644 wcfsetup/install/files/lib/acp/form/PaidSubscriptionAddForm.class.php create mode 100644 wcfsetup/install/files/lib/acp/form/PaidSubscriptionEditForm.class.php create mode 100644 wcfsetup/install/files/lib/acp/form/PaidSubscriptionUserAddForm.class.php create mode 100644 wcfsetup/install/files/lib/acp/page/PaidSubscriptionListPage.class.php create mode 100644 wcfsetup/install/files/lib/acp/page/PaidSubscriptionTransactionLogListPage.class.php create mode 100644 wcfsetup/install/files/lib/acp/page/PaidSubscriptionTransactionLogPage.class.php create mode 100644 wcfsetup/install/files/lib/acp/page/PaidSubscriptionUserListPage.class.php create mode 100644 wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php create mode 100644 wcfsetup/install/files/lib/data/paid/subscription/PaidSubscription.class.php create mode 100644 wcfsetup/install/files/lib/data/paid/subscription/PaidSubscriptionAction.class.php create mode 100644 wcfsetup/install/files/lib/data/paid/subscription/PaidSubscriptionEditor.class.php create mode 100644 wcfsetup/install/files/lib/data/paid/subscription/PaidSubscriptionList.class.php create mode 100644 wcfsetup/install/files/lib/data/paid/subscription/transaction/log/PaidSubscriptionTransactionLog.class.php create mode 100644 wcfsetup/install/files/lib/data/paid/subscription/transaction/log/PaidSubscriptionTransactionLogAction.class.php create mode 100644 wcfsetup/install/files/lib/data/paid/subscription/transaction/log/PaidSubscriptionTransactionLogEditor.class.php create mode 100644 wcfsetup/install/files/lib/data/paid/subscription/transaction/log/PaidSubscriptionTransactionLogList.class.php create mode 100644 wcfsetup/install/files/lib/data/paid/subscription/user/PaidSubscriptionUser.class.php create mode 100644 wcfsetup/install/files/lib/data/paid/subscription/user/PaidSubscriptionUserAction.class.php create mode 100644 wcfsetup/install/files/lib/data/paid/subscription/user/PaidSubscriptionUserEditor.class.php create mode 100644 wcfsetup/install/files/lib/data/paid/subscription/user/PaidSubscriptionUserList.class.php create mode 100644 wcfsetup/install/files/lib/page/PaidSubscriptionListPage.class.php create mode 100644 wcfsetup/install/files/lib/page/PaidSubscriptionReturnPage.class.php create mode 100644 wcfsetup/install/files/lib/system/cache/builder/PaidSubscriptionCacheBuilder.class.php create mode 100644 wcfsetup/install/files/lib/system/dashboard/box/PaidSubscriptionsDashboardBox.class.php create mode 100644 wcfsetup/install/files/lib/system/dashboard/box/PaidSubscriptionsSidebarDashboardBox.class.php create mode 100644 wcfsetup/install/files/lib/system/option/PaymentMethodSelectOptionType.class.php create mode 100644 wcfsetup/install/files/lib/system/payment/method/AbstractPaymentMethod.class.php create mode 100644 wcfsetup/install/files/lib/system/payment/method/IPaymentMethod.class.php create mode 100644 wcfsetup/install/files/lib/system/payment/method/PaymentMethodHandler.class.php create mode 100644 wcfsetup/install/files/lib/system/payment/method/PaypalPaymentMethod.class.php create mode 100644 wcfsetup/install/files/lib/system/payment/method/SofortUeberweisungPaymentMethod.class.php create mode 100644 wcfsetup/install/files/lib/system/payment/type/AbstractPaymentType.class.php create mode 100644 wcfsetup/install/files/lib/system/payment/type/IPaymentType.class.php create mode 100644 wcfsetup/install/files/lib/system/payment/type/PaidSubscriptionPaymentType.class.php diff --git a/com.woltlab.wcf/acpMenu.xml b/com.woltlab.wcf/acpMenu.xml index 69229f1cbe..b46620fc29 100644 --- a/com.woltlab.wcf/acpMenu.xml +++ b/com.woltlab.wcf/acpMenu.xml @@ -307,6 +307,29 @@ admin.notice.canManageNotice + + wcf.acp.menu.link.user + 6 + + + + wcf.acp.menu.link.paidSubscription + admin.paidSubscription.canManageSubscription + module_paid_subscription + + + + wcf.acp.menu.link.paidSubscription + admin.paidSubscription.canManageSubscription + module_paid_subscription + + + + wcf.acp.menu.link.paidSubscription + admin.paidSubscription.canManageSubscription + module_paid_subscription + + 3 diff --git a/com.woltlab.wcf/dashboardBox.xml b/com.woltlab.wcf/dashboardBox.xml index fede92f786..f4ce0c6f46 100644 --- a/com.woltlab.wcf/dashboardBox.xml +++ b/com.woltlab.wcf/dashboardBox.xml @@ -6,6 +6,11 @@ content + + + content + + sidebar @@ -65,5 +70,10 @@ sidebar + + + + sidebar + diff --git a/com.woltlab.wcf/objectType.xml b/com.woltlab.wcf/objectType.xml index 59665ac26d..0d875b4723 100644 --- a/com.woltlab.wcf/objectType.xml +++ b/com.woltlab.wcf/objectType.xml @@ -951,5 +951,23 @@ + + + com.woltlab.wcf.payment.method.paypal + com.woltlab.wcf.payment.method + + + + + + + com.woltlab.wcf.payment.type.paidSubscription + com.woltlab.wcf.payment.type + + diff --git a/com.woltlab.wcf/objectTypeDefinition.xml b/com.woltlab.wcf/objectTypeDefinition.xml index 256f3c9856..4f9ddc2ba0 100644 --- a/com.woltlab.wcf/objectTypeDefinition.xml +++ b/com.woltlab.wcf/objectTypeDefinition.xml @@ -190,5 +190,15 @@ com.woltlab.wcf.message + + + com.woltlab.wcf.payment.method + + + + + com.woltlab.wcf.payment.type + + diff --git a/com.woltlab.wcf/option.xml b/com.woltlab.wcf/option.xml index a119536fff..9e839e62b1 100644 --- a/com.woltlab.wcf/option.xml +++ b/com.woltlab.wcf/option.xml @@ -81,6 +81,9 @@ general.cache + + general + @@ -816,6 +819,23 @@ no:!cache_source_memcached_host]]> + + + + + + + + + +