• This repository has been archived on 10/Jun/2018
  • Stars
    star
    152
  • Rank 244,685 (Top 5 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 14 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Unofficial implementation of the now-old PayPal NVP APIs in Python

PayPal-Python

Author: Pat Collins
Maintainer:Greg Taylor
License:Apache v2
Status: Stable
Maintained:Quasi-maintained, looking for new maintainer (file issue if interested)

This package implements Paypal's Website Payments Pro NVP API in Python. This currently includes Direct Payments (Credit card payments without a PayPal Account) and PayPal Express Checkout (Payment via a PayPal account).

This module is best used in conjunction with the official PayPal documentation. The stuff under "Website Payments Pro and Express Checkout API Operations". in particular.

paypal-python does no real validation, doesn't hold hands, and is generally only going to handle authentication, http-level stuff, and serializing a list of keyword arguments passed to the API methods. You'll need to read the official PayPal documentation for what key/values to pass.

NOTE: This module is not created by, endorsed by, or in any way affiliated with PayPal.

Requirements

  • Python 2.6 or 2.7

Installation

Through pip:

pip install paypal

or easy_install:

easy_install paypal

or download the source, un-tar/un-zip it, cd into paypal-python, and:

python setup.py install

Quick Start

To run test suite, do from within the paypal-python directory:

pip install nose
nosetests tests/

The meat is in paypal.interface. The docs are in the docstrings and tests.

  • Create a paypal.interface.PayPalInterface object
  • Pass it configuration kwargs (See tests.interface_factory.get_interface_obj for a good example of how this works).
  • That interface is how you access PayPal. Take a look at the currently implemented methods in paypal.interface.

Support/Help

If you have any problems, questions, or ideas, feel free to post on our issue tracker.

Addendum A

Instructions for setting up a Sandbox Website Payments Pro account. More detailed instructions can be found at [x.com](http://x.com) but this is what worked for me.

  1. Create Sandbox account. Don't use your live PayPal account email address.
  2. Login to Sandbox
  3. Test Accounts -> "Preconfigured" -- the manual process sucks.
  4. Make a "Seller" account
  5. Don't change "login email" at all -- it seems to truncate to 6 characters.
  6. I took the numeric password they gave as default and copy/pasted it into a plain text document so I could use it later to make all my test account passwords the same.
  7. I chose Visa as the credit card.
  8. Bank Account = "Yes" -- This is needed for a Verified account, which is needed for Website Payments Pro.
  9. Put $1,000 of fake $$ into the account. At one point I tried $5,000 but the test account I created wasn't Verified automatically? Not sure if the two are related.
  10. No notes.
  11. "Create Account"
  12. When it takes you back to the "Test Accounts" screen, it should say "Business" and "Verified"
  13. When you click on "API Credentials" you should see API credentials for the corresponding test account you just created. I copy/pasted them into the same text file used above.

The next step was the tricky part, at least for me. I was getting 10501 errors which means the billing agreement wasn't agreed to. Apparently you need to accept the fake billing agreement that comes along with the fake account you just created, which semi-conveniently has come packaged with an automatically created and verified fake bank account and business account "verified" status. Why couldn't the billing agreement be automatically "agreed to" as well?

Back on the "Test Accounts" page, choose the account you just created and click "Enter Sandbox Test Site." It should populate the fake email address, which should be [email protected]. Use the copy/pasted password from step #6 and paste it into the password field and login.

Now go under Merchant Services -> Website Payments Pro. In the right column there should be a link to "agree" to the billing agreement. Click this link and agree to the agreement. Now your API calls will work as expected.

LICENSE

Copyright 2009 Pat Collins <[email protected]>
Copyright 2012 DUO Interactive, LLC <[email protected]>
Copyright 2014 Greg Taylor

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

More Repositories

1

python-colormath

A python module that abstracts common color math operations. For example, converting from CIE L*a*b to XYZ, or from RGB to CMYK
Python
456
star
2

django-dynamodb-sessions

A Django session backend for Amazon's DynamoDB
Python
92
star
3

django-athumb

A Django thumbnailer specifically optimized for S3.
Python
55
star
4

EVE-Market-Data-Relay

An EVE Online market data processor and relay. [ARCHIVED]
Python
51
star
5

python-route53

A simple Python 2.7/3.x compatible Route53 module. [UNMAINTAINED]
Python
40
star
6

django-eve-db

Importers and ORM models for CCP's EVE Online data dump.
Python
29
star
7

python-gotalk

A Gotalk implementation in Python.
Python
20
star
8

EVE-Market-Data-Uploader

A bare bones, cross-platform, console based EVE Online market data uploader.
Python
20
star
9

factorio-rcon

RCON package that deals with some Factorio-specific behaviors
Go
14
star
10

helm-charts

Muh stuff
Smarty
14
star
11

django-eve-proxy

An EVE API proxy Django app
Python
13
star
12

petfinder-api

A Python Petfinder API client.
Python
11
star
13

dott

A space-themed MUD that I tinker on when I get bored.
Python
10
star
14

EVE-Market-Data-Structures

EVE Market Data Structures and serializers
Python
9
star
15

dockerized-image-crawler

An example image crawler app using fig+Docker, Twisted, Redis, and ZeroMQ networked together
Python
9
star
16

kubeconfig-python

A Python API for manipulating kubeconfig files
Python
7
star
17

drone-charts

WIP Drone charts repository
Go
5
star
18

emdr-relay-go

An EMDR relay written in Go.
Go
5
star
19

btmux

BTMux tinkerings
C
5
star
20

txWS-example-project

Example project using txWS
Python
5
star
21

http_dumper

A quick-and-dirty HTTP detail dumper.
Python
4
star
22

winrandom-ctypes

A ctypes implementation of the winrandom Python module
Python
4
star
23

evennia-game-index

Evennia game tracking web app
Python
3
star
24

evennia-docker

Dockerized Evennia
Shell
3
star
25

nginx-for-drone

nginx + Lets Encrypt specifically for Drone
Shell
3
star
26

btmux_battlesnake

A BattletechMUX bot that supplements/replaces in-game softcode
Python
2
star
27

django-mcauth

Django auth backend that authenticates against Minecraft.net auth server. (DEFUNCT)
Python
2
star
28

evarify

Python module for validating and transforming environment variables.
Python
2
star
29

creeperslament

Website for creepersremorse.com Minecraft server.
JavaScript
2
star
30

btmux_maplib

Python BattletechMUX Map Library
Python
1
star
31

btmux_template_io

BTMux template parsing/representation
Python
1
star
32

zombiepygman

Python+Twisted Minecraft server wrapper.
Python
1
star
33

sos_units

Sands of Solaris unit templates
1
star
34

scrapenstein

Scraaaape
Go
1
star
35

drone-python-plugin-template

A template Python plugin for Drone CI
Python
1
star