Package: kiwitcms-github-marketplace
IntroductionThis package provides the marketplace/payment integration for theKiwi TCMS multi-tenant SaaS.
Everyting that we do is open and that’s why this piece of code is
open source as well. You don’t need this add-on in order to run Kiwi TCMS!Installationpip install kiwitcms-github-marketplaceConfigurationRequired settings:KIWI_GITHUB_MARKETPLACE_SECRET- binary stringKIWI_FASTSPRING_SECRET- binary stringQUAY_IO_TOKEN- stringMAILCHIMP_USERNAME- stringMAILCHIMP_SECRET- stringProduct configurationSubscriptions on FastSpring use the SKU field to define access to private
docker repositories. The format isrepo_name1+repo_name2, wherehttps://quay.io/kiwitcms/<repo_name>existsFastSpring SKUs starting with “x-” are considered special and we don’t
treat them as docker repository namesPlans on GitHub Marketplace use one of their bullet items to define access
to private docker repositories. Format isDocker repositories:quay.io/kiwitcms/<repo1>,quay.io/kiwitcms/<repo2>Changelogv2.4.0 (13 Jan 2024)Build and test with Python 3.11 & fix an import errorUpdate key name for error responses from Quay.ioStart testing with upstream Postgres container image, v16 currently.
Note that installingbtree_ginextension is commented out insidetcms_github_marketplace/migrations/0001_initial.pyv2.3.8 (24 Aug 2023)Fix a potential crash inside the Subscriptions pagev2.3.7 (23 Jun 2023)Update mailchimp3 from 3.0.18 to 3.0.21v2.3.6 (23 May 2023)Try harder not to crash when handling non-recurring events from FastSpringForceNonevalue for SKU to be evaluated as empty stringv2.3.3 (21 May 2023)Handle expiration of unpaid requests for add-on servicesUnpin version for requests library to avoid potential conflicts
with other add-onsv2.3.2 (28 Apr 2023)Update requests from 2.28.2 to 2.29.0Don’t fail when trying to delete user after subscription has been cancelledv2.3.1 (17 Apr 2023)Discover billing cycle info from FastSpring subscription dataUpdate mailchimp3 from 3.0.17 to 3.0.18v2.3.0 (14 Apr 2023)Add Admin interface so we can ‘Approve’ manual purchasesDisplay both monthly & yearly price columns in admin panelRefactor by using a generic purchase notification handling workflow classAdd preliminary support for yearly subscriptions on FastSpring by removing
hard-coded valuesAdd more testsv2.2.0 (07 Apr 2023)Fix fallback typo for FastSpring SKUsAdjust the fallback match string for Kiwi TCMS Enterprise on FastSpringUpdate requests from 2.28.1 to 2.28.2Adjust callbacks for newer PyGithubReformat files with BlackDon’t raise general exceptionsv2.1.0 (15 Aug 2022)Send an exit poll after a subscription has been cancelledAdd filters to Purchase admin pageMatch username with email address for GitHub hooks tooAdd Purchase.subscription fieldRecord subscription ID and search FastSpring tenants across
all possible billing emailsv2.0.5 (04 Aug 2022)Fix a 500 error because of missing prism.jsUpdate requests from 2.27.1 to 2.28.1Bump versions for the rest of eslint pluginsAdjust pylint options b/c of newer versionReport test results to Kiwi TCMSv2.0.4 (19 Apr 2022)Add more tests related to tenant groupsRequire kiwitcms-tenants>=2.0Update GitHub actions & pre-commit hook versionsv2.0.3 (02 Mar 2022)Fallback to searching by name instead of SKU for FastSpring because
the SKU field isn’t reliably sent for existing subscribers.v2.0.2 (24 Feb 2022)Add help block pointing to instructions for private containers
at the bottom of the Docker credentials cardv2.0.1 (23 Feb 2022)Add 2 new fields toPurchasemodel in database to hold information
about enabled product featuresAutomatically configure product access via FastSpring SKUs or GitHub
Marketplace bullet itemsProperly handle cancelled and deactivated subscriptions, removing user
accounts when neededAutomatically handle docker accounts on Quay.io when a subscriotion is made
and display them on the subscription pageDisplay the 2 new fields in Purchase adminAsk subscribers to opt-in for newsletterAdd more automated tests & CI toolsv1.7.0 (30 Sep 2021)Search tenants either by owner email or username. Fixes an issue where
some tenant owners use the billing email as their username, while
changing the contact email in the Kiwi TCMS databaseAdjust for backwards incompatible changes in PyGithub 1.55Use f-stringsv1.6.0 (29 Aug 2021)Fix a bug which allowed users to create multiple tenantsFixSentry #KIWI-TCMS-H2Fix issues discovered by newest pylintDon’t allow user to create multiple tenants if they refresh the page, e.g.
after a 504 response. Instead redirect them to previously existing tenantMigrate from Travis CI to GitHub ActionsImprovements of tests & CIv1.5.0 (11 Jul 2021)Test with Kiwi TCMS v10.1 or laterRequire kiwitcms-tenants>=1.5 in order to support public read-only tenantsMigrate to Python 3.8Internal refactoringv1.4.0 (03 Mar 2021)Don’t delete users upon cancellation via GitHubv1.3.4 (18 Feb 2021)Show new column in purchase adminStop advertising GitHub Marketplace subscriptionsv1.3.3 (25 Jan 2021)Allow POST request (web hooks) without CSRF tokenv1.3.2 (26 Dec 2020)Don’t fail when cancelling GitHub FREE subscriptions for senders which
don’t existv1.3.1 (09 Dec 2020)Fix traceback when trying to create tenant and user is not logged inv1.3 (13 Sep 2020)Tested with Kiwi TCMS > 8.6Refactor deprecation warnings with Django 3.1Start using the new standard models.JSONField()Removetcms_settings_dir/marketplace.pyb/csettings.PUBLIC_VIEWShas been removedv1.2 (06 Aug 2020)Require kiwitcms-tenants>=1.1Subscribe button is now a drop-down listing all platforms oferring a
Private Tenant subscriptionv1.1 (24 Apr 2020)Bug fix: display form errors when creating new tenantUpdate template stringsv1.0 (17 Mar 2020)Turn into proper Kiwi TCMS plugin and install settings overrides undertcms_settings_dir/(compatible with Kiwi TCMS v8.2 or later):does not needMENU_ITEMSandPUBLIC_VIEWSoverride anymoredoes not need to loadtcms_github_marketplaceinINSTALLED_APPSmanuallyJump overtcms_tenants.views.NewTenantViewb/c it requirestcms_tenants.add_tenantpermission and here we don’t need thatExclude public tenant from recurring purchase hooksDo not attempt delete for superuser cancelling their tenant purchasesv0.8.1 (15 Jan 2020)Replaceugettext_lazywithgettext_lazyfor Django 3.0v0.8 (07 Jan 2020)Compatible with PyGithub v1.45+ which will be used in the upcoming
Kiwi TCMS v7.3v0.7.4 (08 Dec 2019)utils.verify_signature()moved totcms.utils.githubas of
Kiwi TCMS v7.2flake8 & pylint fixesv0.7.3 (02 Nov 2019)Fix a bug in reading pricing info when renewing subscriptions
via FastSpringv0.7.2 (29 May 2019)Show vendor specific cancel URLDon’t crash when revoking GitHub tokensUpdate subscription link via FastSpringv0.7.1 (25 May 2019)Handle purchases from FastSpringPurchase.senderis now anEmailFieldv0.6.0 (16 May 2019)Handle purchases for organizationsDo no usenext_billing_dateand useeffective_datewhen calculatingpaid_untilv0.5.1 (16 May 2019)Use the newdelete_user()function when cancelling subscriptionsExtend UI card in subscription page to 6 columns b/c long URLv0.5.0 (15 May 2019)Handle recurring purchasesDon’t crash if visiting Create Tenant without a purchaseShow tenants which user can access and which they ownShow purchase history with Buy/Cancel buttonsUseprism.jsfor syntax highlightingAdd translation filesv0.4.1 (08 May 2019)Don’t crash if install URL is visited without purchaseAdd Purchase admin, accessible only to superuser[db] Renamemarketplace_purchasefield topayloadand
addvendorfield toPurchasemodelAdd a view which overrides tenant creation with information
from the latest purchase. This is what users will see when creating
their private tenantsWhen creating Private Tenant try to correctly setpaid_untildate
based onnext_billing_dateorbilling_cyclefields in the payload
sent to us by GitHubv0.3.1 (03 May 2019)Fix index name in models to be the same as in migrationsv0.3.0 (27 April 2019)Handle Marketplace plan cancellationsv0.2.1 (27 April 2019)Refactor how hooks and installation is handled. Now purchase info
is stored in database and we search for it during installationIntroduces database migrationsFree plan purchases from Marketplace still redirect to Public Tenantv0.1.1 (25 April 2019)Handle GitHub hook pingsv0.1.0 (24 April 2019) - initial releaseFree plan purchases from Marketplace redirect to Public Tenant