Python SDK for FasterPay
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
build
fasterpay
.gitignore
CHANGES.txt
LICENSE
MANIFEST.in
README.md
setup.py

README.md

Welcome to FasterPay Python SDK

FasterPay Python SDK enables you to integrate the FasterPay's Checkout Page seamlessly without having the hassle of integrating everything from Scratch. Once your customer is ready to pay, FasterPay will take care of the payment, notify your system about the payment and return the customer back to your Thank You page.

Downloading the FasterPay Python SDK

$ git clone https://github.com/FasterPay/fasterpay-python.git

Installing the FasterPay Python SDK.

$ cd fasterpay-Python
$ sudo python setup.py install

Initiating Payment Request using Python SDK

from fasterpay.gateway import Gateway

if __name__ == "__main__":

  gateway = Gateway("<your private key>", "<your public key>")

  payload = {
      "description": "Golden Ticket",
      "amount": "0.01",
      "currency": "EUR",
      "merchant_order_id": "xxxxx",
      "success_url": "https://yourcompanywebsite.com/success"
  }

paymentForm = gateway.payment_form().build_form(payload)

print paymentForm

For more information on the API Parameters, refer to our entire API Documentation here

Handling FasterPay Pingbacks

from flask import request
from fasterpay.gateway import FP_Gateway
gateway = Gateway("<your private key>", "<your public key>")
if gateway.pingback().validate({"apiKey": request.headers.get("X-ApiKey")}) is True:
  print "OK"
else:
  print "NOK"

FasterPay Test Mode

FasterPay has a Sandbox environment called Test Mode. Test Mode is a virtual testing environment which is an exact replica of the live FasterPay environment. This allows businesses to integrate and test the payment flow without being in the live environment. Businesses can create a FasterPay account, turn on the Test Mode and begin to integrate the widget using the test integration keys.

Initiating FasterPay Gateway in Test-Mode

from fasterpay.gateway import Gateway
gateway = Gateway("<your private key>", "<your public key>", "https://pay.sandbox.faterpay.com")

Questions?