acarmisc / pylemonway

Python wrapper for Lemonway DIRECTKITJSON2
Apache License 2.0
2 stars 2 forks source link

PyLemonway

Description

Lemonway wrapper for DIRECTKITJSON2 implementation.

Usage

Library should be used importing it as:

from pylemonway.pylemonway import Lemonway

Next you can setup your client as:

client = Lemonway(login, password, customer, sandbox=True)

pyLemonway API client accept many parameters, but on top of them:

Methods explanation to be done.

Example:

from pylemonway.pylemonway import Lemonway

l = Lemonway("login", "password", "customer", sandbox=True)

# registering wallet
wallet_data = dict(clientMail='frank@music.com',
                   clientFirstName='Frank', clientLastName='Sinatra')

wallet = l.wallet_register(wallet_data)

charge_data = dict(wallet=1234, amountTot='2.00', amountCom='1.00',
                   wkToken=uuid.uuid4().__str__(),
                   returnUrl='http://yoursite.com', cancelUrl='http://yoursite.com',
                   errorUrl='http://yoursite.com')

transaction_url = l.card_charge_page(charge_data)