Difference between revisions of "MediaWiki/archive/extensions/Special/SiteSubscribe"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
m (MediaWiki/SpecialPayPal moved to MediaWiki/SpecialSiteSubscribe: realized that the focus was less on handling PayPal than on managing site subscriptions, and just happens to support PayPal)
(explanation and table names modified to match with new name of extension)
Line 1: Line 1:
 
==Overview==
 
==Overview==
'''Special:PayPal''' is a MediaWiki extension to provide functions for [[PayPal/integration|integrating with PayPal]]. It is initially being created for a client who wants to provide full access only to paying subscribers, but in the long run it may be a good platform for adding other PayPal functions. (The access-restriction is being accomplished by a combination of MediaWiki site settings and [[W3TPL]], and is very flexible.)
+
'''Special:SiteSubscribe''' is a [[MediaWiki extension]] to provide functions for managing paid subscriptions to a wiki site. The preliminary version supports [[PayPal/integration|PayPal]] and manual adjustment by site admins, but other payment methods could be added.
 +
 
 +
The access-restriction is being accomplished by a combination of MediaWiki site settings and [[W3TPL]], and is very flexible.
 
===Necessity===
 
===Necessity===
 
MediaWiki extensions currently available for interacting with [[PayPal]] seem to be limited to displaying static PayPal buttons, which can also be done using [[W3TPL]] and other extensions capable of displaying linked external images. This extension makes it possible to receive and process [[PayPal/IPN|Instant Payment Notifications]] from PayPal.
 
MediaWiki extensions currently available for interacting with [[PayPal]] seem to be limited to displaying static PayPal buttons, which can also be done using [[W3TPL]] and other extensions capable of displaying linked external images. This extension makes it possible to receive and process [[PayPal/IPN|Instant Payment Notifications]] from PayPal.
 +
 +
In the long run, it may make sense for these two functions (managing subscriptions and handling PayPal IPN) to be split into separate modules.
 
==Status==
 
==Status==
Special:PayPal is currently under development. Code will be posted here when it works.
+
This extension is currently under development. Code will be posted here when it works.
 
==Functionality==
 
==Functionality==
 
* TO DO: record new subscriptions (sent via [[PayPal/IPN|IPN]])  
 
* TO DO: record new subscriptions (sent via [[PayPal/IPN|IPN]])  
Line 17: Line 21:
 
* table to record subscription info
 
* table to record subscription info
 
==Data Design==
 
==Data Design==
===pp_paymts===
+
===ssub_paymts===
 
Log of payments received
 
Log of payments received
<section begin=sql /><mysql>CREATE TABLE `pp_paymts` (
+
<section begin=sql /><mysql>CREATE TABLE `ssub_paymts` (
 
   ID      INT          NOT NULL AUTO_INCREMENT,
 
   ID      INT          NOT NULL AUTO_INCREMENT,
 
   ID_User  INT          NOT NULL COMMENT "user.user_id of user making the payment",
 
   ID_User  INT          NOT NULL COMMENT "user.user_id of user making the payment",
Line 28: Line 32:
 
ENGINE = MYISAM;</mysql>
 
ENGINE = MYISAM;</mysql>
 
<section end=sql />
 
<section end=sql />
===pp_subscrs===
+
===ssub_subscrs===
 
Subscription status
 
Subscription status
<section begin=sql /><mysql>CREATE TABLE `pp_subscrs` (
+
<section begin=sql /><mysql>CREATE TABLE `ssub_subscrs` (
 
   ID_User  INT          NOT NULL COMMENT "user.user_id of user making the payment",
 
   ID_User  INT          NOT NULL COMMENT "user.user_id of user making the payment",
 
   WhenExp  DATETIME    NOT NULL COMMENT "when the subscription expires",
 
   WhenExp  DATETIME    NOT NULL COMMENT "when the subscription expires",

Revision as of 12:13, 12 February 2009

Overview

Special:SiteSubscribe is a MediaWiki extension to provide functions for managing paid subscriptions to a wiki site. The preliminary version supports PayPal and manual adjustment by site admins, but other payment methods could be added.

The access-restriction is being accomplished by a combination of MediaWiki site settings and W3TPL, and is very flexible.

Necessity

MediaWiki extensions currently available for interacting with PayPal seem to be limited to displaying static PayPal buttons, which can also be done using W3TPL and other extensions capable of displaying linked external images. This extension makes it possible to receive and process Instant Payment Notifications from PayPal.

In the long run, it may make sense for these two functions (managing subscriptions and handling PayPal IPN) to be split into separate modules.

Status

This extension is currently under development. Code will be posted here when it works.

Functionality

  • TO DO: record new subscriptions (sent via IPN)
    • TO DO: function to create/extend subscriptions when IPN received
    • TO DO: add user into "subscribers" group when payment received
  • TO DO: track subscription status (expiration)
    • TO DO: detect when user's account has expired
    • TO DO: remove user from "subscribers" group on expiration
    • TO DO: display subscription status for admins
    • TO DO: allow admins to modify subscription status (change expiration, add new subscription)

also to do

  • table to record subscription info

Data Design

ssub_paymts

Log of payments received

<mysql>CREATE TABLE `ssub_paymts` (

  ID       INT          NOT NULL AUTO_INCREMENT,
  ID_User  INT          NOT NULL COMMENT "user.user_id of user making the payment",
  WhenRecd DATETIME     NOT NULL COMMENT "when the payment was received",
  AmtRecd  DECIMAL(9,2) NOT NULL COMMENT "dollar amount received",
 PRIMARY KEY(`ID`)

) ENGINE = MYISAM;</mysql>

ssub_subscrs

Subscription status

<mysql>CREATE TABLE `ssub_subscrs` (

  ID_User  INT          NOT NULL COMMENT "user.user_id of user making the payment",
  WhenExp  DATETIME     NOT NULL COMMENT "when the subscription expires",
 PRIMARY KEY(`ID_User`)

) ENGINE = MYISAM;</mysql>