Skip to main content

A client to submit payment orders to the Redsys service.

Project description

Credit payments to the Redsys service.

Requirements

  • Python 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 = u’1’ REDSYS_CURRENCY = u’978’ REDSYS_TRANS_TYPE = u’0’

values = {

‘Ds_Merchant_Amount’: 10.0, ‘Ds_Merchant_Currency’: u’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, secret_key=REDSYS_SECRET_KEY, sandbox=SANDBOX) redsys_form = redsyspayment.redsys_generate_request(values)

Thanks

Thanks Álvaro Vélez and Jordi Colell to develop new signature Redsys HMAC-256 (Django-sermepa).

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.2.0.tar.gz (3.4 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