springload/eway-rapid-python

Name: eway-rapid-python

Owner: Springload

Description: Python client implementation for eWAY Rapid API v3

Created: 2016-05-25 02:08:52.0

Updated: 2016-10-28 02:39:47.0

Pushed: 2017-12-07 22:09:49.0

Homepage: null

Size: 498

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

eway-rapid-python

Python client implementation for eWAY Rapid API v3

Installation

install eway-rapid-python

API parts implementation status:

= Implemented
= To be implemented in future versions

Rapid API v3

Rapid API documentation: https://eway.io/api-v3

Basic usage

 eway.rapid.client import RestClient
 eway.rapid.endpoint import SandboxEndpoint
 eway.rapid.model import Payment, RequestMethod, TransactionType
 eway.rapid.payment_method.transparent_redirect import TransparentRedirect, CreateAccessCodeRequest

ent_method = TransparentRedirect(RestClient('api-key', 'api-password', SandboxEndpoint()))

sponse is eway.rapid.payment_method.transparent_redirect.response.AccessCodeResponse
onse = payment_method.create_access_code(CreateAccessCodeRequest(
Payment(4200, 'AUD'),
RequestMethod.ProcessPayment,
TransactionType.Purchase,
'https://localhost/'


t(response.to_json())

. here client performs form submit in his browser

ansaction is eway.rapid.payment_method.transparent_redirect.response.TransactionInfo
saction = payment_method.request_transaction_result(response.AccessCode)

t(transaction.to_json())

For more complete example have a look at Transparent Redirect tests

Testing

on -m unittest tests

License

The MIT License (MIT). Please see License File for more information.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.