项目作者: ramon

项目描述 :
A Python Getnet Santander SDK
高级语言: Python
项目地址: git://github.com/ramon/getnet-py.git
创建时间: 2019-08-07T18:38:02Z
项目社区:https://github.com/ramon/getnet-py

开源协议:MIT License

下载


getnet-py Build Status Coverage Status

This project provider a SDK to handler with Santander Getnet API.

Installation

To install getnet-py you can use pip:

  1. $ pip install getnet-py

or pipenv:

  1. $ pipenv install getnet-py

Usage

For use this library the following information is needed:

  • Seller ID
  • Client ID
  • Client Secret

The following environments are supported:

  • Staging
  • Homolog
  • Production

Instancing the client

  1. from getnet import Environment, Client
  2. client = Client("seller_id", "client_id", "client_secret", Environment.SANDBOX)
  3. client.auth() # Optional, will be executed if needed

Using the Services

With client instanced, the services can be accessed in two ways:

Using the client shotcuts:

  1. service = client.token_service()
  2. service.generate(...)

or instancing the services and passing the client as the first param:

  1. from getnet.services.token import Service
  2. service = Service(client)
  3. service.generate(...)

At moment, we have support to the following services:

  • Token
  • Cards (Cofre)
  • Payments
    • Credit Card
    • Boleto
  • Subscriptions
    • Customers
    • Plans
    • Charges

Author

Ramon Soares contact@ramon.dev.br