Package: altapay
This is an unofficial Python SDK for Valitor (formerly AltaPay/Pensio),https://altapay.com/. The SDK is maintained by Coolshop.com,https://www.coolshop.com/.DocumentationDocumentation is available at Read the Docs.RequirementsPython (3.5, 3.6, 3.7)Other versions of Python may also be supported, but these are the only versions we test against.DependenciesrequestssixInstallationThe easiest way is using pip.pipinstallaltapayGetting StartedRefer to theintroduction on the documentationfor some getting started use cases.ContributingCurrently, this library only implements the bare minimum of the AltaPay API. It will allow you to create payment links, and do basic subscription functionality. If you need anything else, feel free to submit a full request, or if you have ideas, open an issue.If you do decide to submit a pull request, do note that both isort and flake8 (including pep8-naming) are run for all pull requests. You are also advised to write test cases.Running the TestsFirst of all, havetoxinstalled on your system. System-wide is probably the better choice. Once you have tox installed, simply run:toxThis will run all tests, against all supported Python versions.Change Log1.4.1 (2019-06-26)** Python support **As of version 1.4.0, Python versions below 3.5 are no longer supported.1.4.0 (2019-06-24)FeaturesAddedaltapay.Transaction.chargebacks()which returns the chargeback events as custom objects.1.3.0 (2017-10-20)FeaturesAddedaltapay.Transaction.refund()with functionality for refunding a transaction, both full and partial.1.2.1 (2016-11-02)BugfixFixed a bug where parsing the values “nan”, “inf” or “-inf” would lead to a float value, when handling XML values. While this could potentially be correct, it’s safer to assume that these values are in fact string values1.2.0 (2016-04-19)Features*Addedaltapay.FundingListandaltapay.Funding. These two objects will interact with the funding list features of AltaPay, and will allow you to both list all of your funding files, as well as download individual files. Currently no guide section is written on the subject, but full API documentation is availableAddedaltapay.CustomReportwhich mimics the custom reporting module of AltaPay. Using a custom report ID and additional kwargs based on the report, you can either view or download your custom reports1.1.0 (2016-04-12)Previously, all calls would use an HTTP GET, since the AltaPay documentation in some cases suggests that this is the case. This works, however, it breaks when payments start to contain many order lines. Because of this, all calls have been changed to HTTP POST, which is the recommended way of communicating with the AltaPay API.1.0.1 (2016-03-15)API ChangeBackwards incompatiblealtapay.Transaction.capture()will now return analtapay.Callbackobject instead of aaltapay.Transactionobject1.0 (2016-03-03)First Production ReleaseFeaturesAdddedaltapay.Transaction.release()1.0.dev9 (2016-02-26)ImprovementsBackwards incompatibleMovedaltapay.Transaction.create_invoice_reservation()toaltapay.Callback.create_invoice_reservation(). The method will now return aaltapay.Callbackobject in order to read the result key (#41)1.0.dev8 (2016-02-22)FeaturesAddedaltapay.Transaction.create_invoice_reservation()1.0.dev7 (2016-02-17)ImprovementsBackwards incompatibleChanged the name ofaltapay.Transaction.reserve()toaltapay.Transaction.reserve_subscription_charge()1.0.dev6 (2016-02-17)FeaturesAddedaltapay.Transaction.reserve()which will reserve an amount on a subscription1.0.dev5 (2016-02-11)ImprovementsBackwards incompatibleChanged the return type ofaltapay.Transaction.charge_subscription(). It will not return aaltapay.Callbackobject instead of a list of transactionsBackwards incompatibleChanged the argument ofaltapay.Callback.transactions()to be keyword only. Will now accept any number of filters, and these will be matched using AND logic1.0.dev4 (2016-02-03)FeaturesAddedaltapay.Transaction.charge_subscription()which will charge a subscription on a transaction, if this transaction is setup as a subscriptionBugfixesFixed a bug where looking up a non-existent transaction ID would result in aKeyError(#32)0.1.dev3 (2016-01-18)BugfixesAdded missing apostrophe’s in the documentation for the callback guide (#24)Fixed a bug where filtering transactions on aaltapay.Callbackobject might result in aKeyError(#25)ImprovementsMade it more explicit how attributes on response objects work (#26)0.1.dev2 (2016-01-14)FeaturesAddedaltapay.Transactionand the ability to find a transaction by its transaction ID in the AltaPay serviceAddedaltapay.Transaction.capture()which captures a transaction that has already been loaded. Optinally, parameters can be passed which allows for partial captures (see the AltaPay documentation for full list of possible arguments)Added a public facing API for converting an AltaPay XML response (as a string) to a Python dictionary (altapay.utils.xml_to_dict)Addedaltapay.Callbackwhich wraps a callback response from AltaPay, and automatically wraps the coupled transactions inaltapay.TransactionobjectsBugfixesFixed a bug where specifying a non-existing terminal while creating analtapay.Paymentobject would result inaltapay.Payment.successreturningTrueFixed a bug where running in production mode was not possible. It is now possible by specifying a shop name when instantiating the API0.1.dev1 (2016-01-05)Complex payments are now possible. This means it is now possible to send detailed payment information in a Pythonic way using just lists and dictionaries, instead of the PHP style query params syntaxDocumentation now includes a small guide for available parts of the SDK, which will make is easier to get started easily without reading the raw API documentation0.1.dev0 (2015-12-18)Basic API connection class implemented inaltapay.api.APIBasic Payment class implemented inaltapay.payment.Paymentwhich is currently mainly for creating a very basic payment request with the AltaPay service