The PayPal REST SDK provides Python APIs to create, process and manage payment
Project description
The PayPal REST SDK provides Python APIs to create, process and manage payment.
https://github.com/paypal/rest-api-sdk-python/ - README and Samples
https://developer.paypal.com/webapps/developer/docs/api/ - API Reference
Create Payment Example
import paypalrestsdk import logging logging.basicConfig(level=logging.INFO) paypalrestsdk.set_config( mode="sandbox", # sandbox or live client_id="EBWKjlELKMYqRNQ6sYvFo64FtaRLRR5BdHEESmha49TM", client_secret="EO422dn3gQLgDbuwqTjzrFgFtaRLRR5BdHEESmha49TM") payment = paypalrestsdk.Payment({ "intent": "sale", "payer": { "payment_method": "credit_card", "funding_instruments": [{ "credit_card": { "type": "visa", "number": "4417119669820331", "expire_month": "11", "expire_year": "2018", "cvv2": "874", "first_name": "Joe", "last_name": "Shopper" }}]}, "transactions": [{ "amount": { "total": "1.00", "currency": "USD" }, "description": "This is the payment transaction description." }]}) if payment.create(): print("Payment created successfully") else: print(payment.error)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
paypalrestsdk-0.5.1.tar.gz
(8.2 kB
view hashes)