Metadata-Version: 1.0
Name: collective.pfg.payment
Version: 0.1.0
Summary: Extends PloneFormGen to payment form.
Home-page: http://svn.plone.org/svn/collective/
Author: UNKNOWN
Author-email: UNKNOWN
License: GPL
Description: Introduction
        ============
        This package is inteded to integrate html payment form which happens outside of Plone
        as easy as possible by using forms and adapters generated by PloneFormGen.
        
        Currently tested with
        ---------------------
        
        * Plone-3.3.5
        
        * Plone-4.1b2
        
        * Products.PloneFormGen-1.6.0
        
        Example use case
        --------------------
        
        1. On Plone site, input some price amount on form.
        
        2. Confirm the amount and go to payment page outside of Plone.
        
        3. Process the payment.
        
        4. Go back to Plone site.
        
        General Setup
        -------------
        
        Once the package is quickinstalled, you need to configure  authentication code calculation::
        
            Site Setup >> Payment Config
        
        MAC Code::
        
            This code is provided by payment provider.
        
        Fields::
        
            Input field names which will be used for the calculation line by line.
        
        Separator::
        
            Input separator between field values if necessary.
        
        Capital::
        
            Check this if calculated authentication code need to be upper cases.
        
        
        
        Tested HTML Interfaces and their configurations
        ===============================================
        
        Verkkomakust S1 (Finland)
        -------------------------
        
        Payment Config for testing.
        ---------------------------
        
        
        MAC Code::
        
            6pKF4jkv97zmqBJ3ZL8gUw5DfT2NMQ
        
        Fields::
        
            MERCHANT_ID
            AMOUNT
            ORDER_NUMBER
            REFERENCE_NUMBER
            ORDER_DESCRIPTION
            CURRENCY
            RETURN_ADDRESS
            CANCEL_ADDRESS
            PENDING_ADDRESS
            NOTIFY_ADDRESS
            TYPE
            CULTURE
            PRESELECTED_METHOD
            MODE
            VISIBLE_METHODS
            GROUP
        
        Separator::
        
            |
        
        Capital::
        
            Checked
        
        Example use case
        ----------------
        
        1. Create Form where payment process starts: FormFolder1
        
        Edit >> Overrides >> Custom Success Action::
        
            traverse_to:string:formfolder2
        
        * formfolder2 is the next form where the confirmation happens.
        
        2. Add Decimal Number Field with id named AMOUNT.
        
        * Plone automatically set id from title, but with lower cases. To set id upper cases, you may need to change it, for example from Contents tab.
        
        * Optionally if you want to send email or show results after the successful payment, add Custom Script Adapter here and describe to script body something like::
        
            items = dict(
                AMOUNT=request.form["AMOUNT"],
                topic=request.form["topic"]
            )
            request.SESSION.set("collective.pfg.payment", items)
        
        This means that AMOUNT and topic fields are stored in session and can be displayed after the successful payment.
        
        3. Create another Form: FormFolder2
        
        Edit >> Overrides >> Custom Form Action::
        
            https://payment.verkkomaksut.fi/
        
        View >> Actions >> Make Order Number Aware::
        
            Change the numbering behavior if necessary.
        
        4. Add the next fields with String Field.::
        
            MERCHANT_ID
            AMOUNT
            ORDER_NUMBER
            REFERENCE_NUMBER
            ORDER_DESCRIPTION
            CURRENCY
            RETURN_ADDRESS
            CANCEL_ADDRESS
            PENDING_ADDRESS
            NOTIFY_ADDRESS
            TYPE
            CULTURE
            PRESELECTED_METHOD
            MODE
            VISIBLE_METHODS
            GROUP
            AUTHCODE
        
        * The field ids must be upper cases.
        
        * These fields below needs to be configured::
        
            MERCHANT_ID
            ORDER_NUMBER
            CURRENCY
            RETURN_ADDRESS
            CANCEL_ADDRESS
            NOTIFY_ADDRESS
            TYPE
            CULTURE
            MODE
            AUTHCODE
        
            MERCHANT_ID
                Edit >> Default
                    13466
        
            ORDER_NUMBER
                Edit >> Overrides >> Default Expression
                    python:here.restrictedTraverse('number')()
        
            CURRENCY
                Edit >> Default
                    EUR
        
            RETURN_ADDRESS
                Edit >> Overrides >> Default Expression
                    string:${portal_url}/formfolder3/thank-you/@@payment-succeeded
        
            * Assuming that FormFolder3 will be created under plone root.
            * If field values are not necessary to be sent by e-mail or displayed after successful payment, you can give different address here and FormFolder3 is not necessary.
        
            CANCEL_ADDRESS
                Edit >> Overrides >> Default Expression
                    string:${portal_url}/formfolder1
        
        * Assuming that FormFolder1 is created under plone root.
        
            NOTIFY_ADDRESS
                Edit >> Overrides >> Default Expression
                    string:${portal_url}
        
            TYPE
                Edit >> Default
                    S1
        
            CULTURE
                Edit >> Default
                    fi_FI
        
            MODE
                Edit >> Default
                    1
        
            AUTHCODE
                Edit >> Overrides >> Default Expression
                    python:here.restrictedTraverse('auth-code')
        
        3. Create another Form: FormFolder3
        
        * In case e-mails need to be sent and field values displayed after the successful payment.
        
            To show the field values, you need to add or copy the original field to this FormFolder.
        
            * The type of field need to be the same as the original one.
            * In this case String Field with id topic and Decimal Number Field with id AMOUNT need to be added.
        
        Changelog
        =========
        
        0.1.0 (2011-04-15)
        ------------------
        
        - Initial release
        
        Installation
        ============
        
        Use zc.buildout and the plone.recipe.zope2instance
        recipe to manage packages:
        
        * Add ``collective.pfg.payment`` to the list of eggs to install, e.g.::
        
            [buildout]
            ...
            eggs =
                ...
                collective.pfg.payment
        
        * Re-run buildout, e.g. with::
        
            $ ./bin/buildout
        
        Credits
        =========
        * Pekka Saari from the Finnish Association for Nature Conservation (Suomen Luonnonsuojeluliitto) who uses this package in their site: http://www.sll.fi
        
Platform: UNKNOWN
Classifier: Framework :: Plone
Classifier: Programming Language :: Python
