- The
ItemDefinition
does not validate the bounds forperiod
any longer. This has to be done by the integrating party. This is along the lines of what is alrady happening withexpiry
.
-
The
is_permalink
option was added as a parameter when generating purchase URLs, which is available for contributions and donations. If present andTrue
, this generates a non-expiring link. -
Adjusted "a year" to 365 days instead of 12 * 31 days.
-
The
ITEM_TYPE_POLITICAL_CONTRIBUTION
constant was added to theconstants
module. It's to be used in conjuction with theitem_type
attribute on anItemDefinition
. -
The
ItemDefinition
gained a new key-word argumentelection_id
that must be set whenitem_type
isITEM_TYPE_POLITICAL_CONTRIBUTION
when creating purchase URLs for political contributions.
-
The
ItemDefinition
gained a new key-word argumentitem_type
that must be set to'contribution'
or'donation'
when creating purchase URLs for contributions or donations. -
Two new constants were added to the
constants
module:ITEM_TYPE_CONTRIBUTION
andITEM_TYPE_DONATION
to be used in conjuction with the newitem_type
attribute on anItemDefinition
.
-
Added support for Python 3.6
-
Allowed
article_ids
when fetching access data to be acollections.Iterable
and not just a string, list or tuple. Passing anything else will raise aDeprecationWarning
.
-
Added the
connection_handler
toLaterPayClient
to simplify connection pooling. -
Updated test dependencies.
- Only passed one of
lptoken
andmuid
to/access
calls. Passing both is not supported.
-
Added explicit support for the
muid
argument toget_add_url()
,get_buy_url()
andget_subscribe_url()
. -
Added function to create manual ident URLs. A user can visit these URLs to regain access to previous purchased or bought content.
-
Added PyJWT >= 1.4.2 to the installation requirements as it's required for the added manual ident URLs feature.
-
Added support for
muid
when creating manual ident URLs. -
Added support to check for access based on
muid
instead oflptoken
.
- Added constants outlining expiration and duration time bases for purchases
- Ignored HMAC character capitalization (#93)
- Added support for
/dialog/subscribe
and LaterPay's subscription system
-
Removed the following long deprecated methods from the
laterpay.LaterPayClient
:get_access()
, useget_access_data()
insteadget_iframeapi_balance_url()
, usget_controls_balance_url()
insteadget_iframeapi_links_url()
, usget_controls_links_url()
insteadget_identify_url()
is not needed following our modern access control checks
-
Removed the following deprecated arguments from
laterpay.LaterPayClient
methods:use_dialog_api
fromget_login_dialog_url()
use_dialog_api
fromget_signup_dialog_url()
use_dialog_api
fromget_logout_dialog_url()
-
Removed the following public methods from
laterpay.signing
:sign_and_encode()
in favor oflaterpay.utils.signed_query()
sign_get_url()
in favor oflaterpay.utils.signed_url()
Note that
sign_and_encode()
andsign_get_url()
used to remove existing'hmac'
parameters before signing query strings. This is different tosigned_query()
as that function also allows other names for the hmac query argument. Please remove the parameter yourself if need be. -
Removed the deprecated
cp
argument fromlaterpay.ItemDefinition
-
Reliably ignore
hmac
andgettoken
parameters when creating the signature message. In the pastsigning.sign()
andsigning.verify()
stripped those keys when adict()
was passed from the passed function arguments but not for lists or tuples. Note that as a result the provided parameters are not touched anymore and calling either function will not have side-effects on the provided arguments.
- Fixed encoding issues when passing byte string parameters on Python 3 (#84)
- Added support for Python requests >= 2.11
- Added current version number to HTTP request headers
- Enabled universal wheel builds
-
laterpay.utils.signed_query()
now passes adict
params instance tolaterpay.signing.sign()
which makes it compatible withsign()
ignoring some params being ignored bysign()
by looking them up within
operator. -
Added Python 3.5 support
-
LaterPayClient.get_add_url()
andLaterPayClient.get_buy_url()
accept**kwargs
. -
The parameter
skip_add_to_invoice
inLaterPayClient.get_add_url()
andLaterPayClient.get_buy_url()
is deprecated and will be removed in a future release.
-
laterpay.signing.sign_and_encode()
is deprecated and will be removed in a future release. Consider usinglaterpay.utils.signed_query()
instead. -
signing.sign_get_url()
is deprecated and will be removed in a future release. -
LaterPayClient.get_access()
is deprecated and will be removed in a future release. Consider usingLaterPayClient.get_access_data()
instead. -
LaterPayClient.get_identify_url()
is deprecated and will be removed in a future release. -
New utility functions:
laterpay.utils.signed_query()
andlaterpay.utils.signed_url()
-
New
LaterPayClient
methods:get_request_headers()
get_access_url()
get_access_params()
get_access_data()
-
Improved and newly added tests.
-
Improved
laterpay.signing
docs. -
Replaced most of
compat
with propersix
usage.
- Dialog API Wrapper is deprecated.
get_buy_url()
,get_add_url()
,get_login_dialog_url()
,get_signup_dialog_url()
, andget_logout_dialog_url()
have a newuse_dialog_api
parameter that sets if the URL returned uses the Dialog API Wrapper or not. Defaults to True during the Dialog API deprecation period.ItemDefinition
no longer requires acp
argument.
- Exceptions raised by
urlopen
inLaterPayClient._make_request()
are now logged withERROR
level usingLogger.exception()
. - Added
timeout_seconds
(default value is 10) param toLaterPayClient
. Backend API requests will time out now according to that value. - Removed deprecated
laterpay.django
package. - Removed deprecated
vat
andpurchasedatetime
params fromItemDefinition.__init__()
. This is a backward incompatible change to__init__(self, item_id, pricing, url, title, cp=None, expiry=None)
from__init__(self, item_id, pricing, vat, url, title, purchasedatetime=None, cp=None, expiry=None)
. - Removed deprecated
add_metered_access()
andget_metered_access()
methods fromLaterPayClient
.
- Standardised the usage of the (internal)
product
API (it was usable via path or parameter, and we're deprecating the path usage)
- Deprecating the
vat
parameter inItemDefinition
because of new EU law for calculating VAT - Deprecated
LaterPayClient.get_metered_access()
andLaterPayClient.add_metered_access()
methods. - Added
return_url
/failure_url
parameters for dialogs: https://docs.laterpay.net/platform/dialogs/
- Support for Python 3.3 and 3.4 (#1)
- Improved documentation coverage
- Dropped distutils usage
- Fixed an issue where omitted optional
ItemDefinition
data would be erroneously included in URLs as the string"None"
- Added deprecation warnings to several methods that never should have been considered part of the public API
- Deprecated the Django integration in favour of an explicit
django-laterpay
library. - Added support for expiring items
Existence