Skip to main content

A client to submit payment orders to the Redsys service.

Project description

Redsys client
~~~~~~~~~~~~~

A python client for sending payment orders to the Redsys service.

Requirements
------------

* Python 2.5, 2.6 or 2.7

Installation
------------

Through pip:
pip install redsys
or easy_install:
easy_install redsys
or download the source, un-tar/un-zip it, cd into redsys, and:
python setup.py install

Quick Start
-----------

from redsys import Client

SANDBOX = True
REDSYS_MERCHANT_URL = 'http://www.zikzakmedia.com'
REDSYS_MERCHANT_NAME = "Zikzakmedia SL"
REDSYS_MERCHANT_CODE = '000000000'
REDSYS_SECRET_KEY = '123456'
REDSYS_TERMINAL = 1
REDSYS_CURRENCY = 978
REDSYS_TRANS_TYPE = 0

values = {
'Ds_Merchant_Amount': 10.0,
'Ds_Merchant_Currency': 978,
'Ds_Merchant_Order': 'SO001',
'Ds_Merchant_ProductDescription': 'ZZSaas services',
'Ds_Merchant_Titular': REDSYS_MERCHANT_NAME,
'Ds_Merchant_MerchantCode': REDSYS_MERCHANT_CODE,
'Ds_Merchant_MerchantURL': REDSYS_MERCHANT_URL,
'Ds_Merchant_UrlOK': 'http://www.zzsaas.com/redsys/confirm',
'Ds_Merchant_UrlKO': 'http://www.zzsaas.com/redsys/cancel',
'Ds_Merchant_MerchantName': REDSYS_MERCHANT_NAME,
'Ds_Merchant_Terminal': REDSYS_TERMINAL,
'Ds_Merchant_SumTotal': 10.0,
'Ds_Merchant_TransactionType': REDSYS_TRANS_TYPE,
}

redsyspayment = Client(business_code=REDSYS_MERCHANT_CODE, priv_key=REDSYS_SECRET_KEY, sandbox=SANDBOX)
redsys_form = redsyspayment.get_pay_form_data(values)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

redsys-0.1.2.tar.gz (2.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page