PayPal's Payflow Pro Python Client
python-payflowpro
(or simply payflowpro
within the Python environment)provides an interface to the PayPal Payflow Pro API (HTTPS Interface) making iteasy for you to collect and manage payments within your python-basedapplications.
This project is a fork of James Murty &John D'Agostino's python-payflowpro project hostedon Google Code and is nowconsidered the most current and active.
Specifically, It allows you to:
- Submit Sales Transactions
- Submit Authorization & Delayed Capture Transactions
- Security Code (CVV, CVC2, CVV2) & Address Verification (RequiresVerification module. Additional costs apply.)
- Create Recurring Billing Profiles (Requires Recurring Billing module.Additional costs apply.)
- Modify & Reactivate Recurring Billing Profiles
- Display payment history of a Recurring Billing Profile
- Cancel A Recurring Billing Profile (aka 'Freezing')
- Inquiry Transactions (One-time & Recurring Billing Profile)
Payment Methods Supported (TENDER_TYPES)
- Automated clearinghouse
- Credit card
- Pinless debit
- Telecheck
- PayPal
Transactions Types Supported (TRANSACTION_TYPES)
- Sale transaction
- Credit
- Authorization
- Delayed Capture
- Void
- Voice Authorization
- Inquiry
- Duplicate transaction
- Recurring (Optional. Requires Recurring Billing module.Additional costs apply.)
Requirements
- Python 2.5+
- PayPal "Payflow" Services Account onPayPal.com
The recurring billing functionality of this library requires the PayflowProaccount to have the Recurring Billing module activated (additional costsapply). Likewise with the Security Code & Address Verification module. Unlessyou have the appropriate modules enabled within your Paypal Payflow ProAccount (This is set via the Paypal Manager),passing Street Addresses and Security Codes will not be ran throughverification.
Installation
You can install python-payflowpro one of three ways:
- run
python setup.py install
within thepython-payflowpro
directory ln -s /path/to/python-payflowpro/payflowpro /path/to/site-packages/
pip install -e git://github.com/bkeating/python-payflowpro.git#egg=python_payflowpro
Each approach gives you the same result. You can test your installation bystarting an interactive prompt:
$ python>>> import payflowpro>>> payflowpro.VERSION(0, 3, 'pre')
Usage
Refer to the client.py
file in the tests
subdirectory for example usageof the client.
To run the tests you will have to edit the file and set the following variableswith a valid Payflow Pro Account.
PARTNER_ID
VENDOR_ID
USERNAME
PASSWORD