Exciting incoming addition to GetPaid: credits
Last week, we peered into the top secret skunkworks of dixond and well,
let the cat out of the bag about an exciting new extension coming to
GetPaid any day now :) Ok, so maybe skunkworks is a bit of
exageration...but I deal with developers who are hard to get to talk!
It is often classified (in heads) until checked in...thanks to a
shocking burst of verbosity, we got this insight:
(12:04:11 AM) dixond:
effectively what I've built is a way to turn a Plone site with GetPaid
into an advertising channel, where people can pay to publish their
content for a fixed time. The basic framework and concept can be
extended then to other things also.
Stepping down from dixond's elloquent marketing-speak, the use
case is something like this: A user needs some credit to make their
content public in some way (ie "for a week" or by virtue of a group
membership).
OK, the nuts and bolts:
1) ICreditRegistry for storing the credits (can obviously be in RDBMS but my trivial implementation uses ZODB and BTrees)
2)
TickingMachine subscriber that knows about ICreditPublishedContent and
applies some rules around send reminder emails, depublish, etc
3) Archetypes schema extender profile for ICreditPublishedContent to track stuff like 'weeks remaining published'
4) Various portlets to allow purchasing credit and using that credit to publish ICreditPublishedContent
5) A few basic content types to represent the credit being purchased
Basically,
what I've been building is a way to buy 'non-things' much like the
notion of the 'donatable' type and to keep track of them and then use
them for controlling access to arbitrary actions later. At present it
works great, I'm spending most of my time 'generic-ifying' it so that
it can be re-used elsewhere and isn't tied too closely to my specific
use-case. Also on the list are other credit types like 'group
membership' etc. Once I've generic-ified it enough this should be
'easy'.
Currently, three packages: getpaid.creditpublish, getpaid.creditregistry, getpaid.purchasablecredit
Future
extensions could also allow content to be accessed by using credits, if
a payment processor is implemented which consumes credits.
What
are others saying: "that's a really needed usecase of getpaid - lots of
people will be hopping happy :)" -duffyd on #getpaid
What for this landing in the GetPaid repo any time now!
