django-fac

django-fac is a Django app to conduct that is used to integrate with First Atlantic Commerce payment gateway


License
MIT
Install
pip install django-fac==0.1.dev1

Documentation

Django FAC

django-fac is a python package that helps to simplify the integration with First Atlantic Commerce payment gateway.

PyPi Package: https://pypi.org/project/django-fac/

Detailed documentation is in the "docs" directory.

Table of contents


 

Installation

  1. First we need to install the django-fac:
pip install django-fac

 

Configurations

  1. Add django_fac to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [
    ...
    'django_fac',
]
  1. Setting up the package config variables. It is recommemded to store the values in environment variables. Add the following variables to your settings.py file
FAC_ID = "..."
FAC_PASSWORD = "..."
FAC_DEFAULT_CURRENCY = "..."
FAC_BASE_URL = "https://..."

 

Usage

This is an example of how the authorization process works

Example

from django_fac.core import payment
from django_fac.entities import TransactionDetail, CardDetail

transaction_detail = TransactionDetail(
    order_id="1234567",
    amount=2000
)

card_detail = CardDetail(
    card_number="0000-0000-0000-000", 
    cvv2="123", 
    exp_date="09/28", # MM/YY
    cardholder_name="John Doe"
)

# This URL will receive the status of the transaction after authorization
redirect_url = "https://your-domain.com/webhook/payment"

response = payment.authorize(transaction_detail, card_detail, redirect_url)

# TODO: add remaining logic

 

Tests

....

 

Local Development

If you are interested in contributing to the project then the following instructions will apply to you.

 

API Reference

  • Payment - Read more about how the Payments API can be used.
  • Entities - Read more about how the entities can be used.