.. _administation: Administration ============== For administration, log in from the root url ``/`` in the stripe checkout server. Credentials are available in Lastpass. The following pages are available when logged in: .. _django-admin: Django Admin portal (Admin) --------------------------- .. _manage-users: Manage Users ############ You can add new users that can login and manage certain aspects of the website. Based on what the user should be able to do, they need the following permissions: * Log in: Staff status (Basically every user should have this) * Access to django admin: Superuser status * Manage visitors: ``stripe_checkout | order | Manage visitors`` * Download Stripe Report: ``stripe_checkout | report | Can view report`` .. _adding-product-info: Adding new products or price information to the database ######################################################## Log in to the django admin console and add or update a ``PricedItem``. There are two different kinds of ``PricedItem``: ``Registration Type`` and ``Extra`` ``Registration Type`` items are used to link a visitor's ``registrationType.id`` to a Stripe product id. Required fields are * ``Stripe Product id``: The stripe product for this item. Stripe product ids start with ``prod_`` * ``Visit registration id``: The visit ``registrationType.id`` for this registration type. See also "New registration types" below ``Extra`` items are tied to specific questions and answers in the Visit. A visitor may opt in (purchase) zero or more extras during their registration, and possibly after. Every extra requires: * ``Visit checkout question id`` and ``Visit checkout answer id``: a combination of a question and answer in visit that indicates that the visitor wants to purchase this extra. * ``Visit paid question id`` and ``Visit paid answer id``: a combination of a question and answer in visit to indicdate that the visitor has paid for this extra. Upon receiving confirmation of payment, stripe checkout will set this combination in the visitor's profile. Aside from the fields described above, the following fields are required for all ``PricedItem`` objects: * ``Name``: a snake case name that helps with idenfication. This name is not shown to visitors * ``Display Name``: a user friendly name. This name is shown to visitors in their checkout page and should match the user facing name in Visit and Stripe * ``Kind``: See above Migrate price information between deployments ############################################# With the correct enviroment settings setup, it is possble to dump the latest price information by running from the source database:: django-admin dumpdata stripe_checkout.PricedItem | json_pp > prices.json To load price information into the target database, change your database settings and run:: django-admin loaddata prices.json GBP Vat ####### GBP VAT rates are stored in the Exchange rates section. This is done automatically by the :ref:`getexchangerate` management command that is run periodically. .. _manage_visitors: Manage Visitors --------------- A special page is made to quickly manage visitors (``/visitors``). Here it is possible to change what a Visitor has checked out and paid for. it is also possible to clear any ``Order``\s that have been created for the visitor. This is useful during development and testing, but should not be used in production. Due to limitations of the Visit API, this page only shows the first 100 registered visitors. .. warning:: Be careful, it is very easy to accidentally make a mistake when editing data through the ``/visitors`` endpoint. This may cause visitors to be registered incorrectly and to have an incorrect payment status .. _download_stripe_report: Download Stripe Report ---------------------- Finance has requested a (periodic) report of all invoices and credit notes in Stripe. Stripe does not offer a reporting functionality sufficient for Finance, so every day a report is generated in a csv format using the ``generatereport`` management command.