[Zope] Enabling micropayment in zope using centipaid

Adonis El Fakih adonis@aynacorp.com
Sat, 15 Feb 2003 08:31:54 -0800


This is a multi-part message in MIME format.

------=_NextPart_000_0B6E_01C2D4CC.B2524C30
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hi,

We have various sites using Zope and we are trying to install a
micropayment solution to collect fees from our online users. We want to
use the Apache::Centipaid module from centipaid.com. This module is an
Apache authentication module, and it works by inserting configuration
instructions for mod_perl in the httpd.conf. What we are trying to do
(for testing purposed) is to make the http://www.aley.net/Ar/centipaid
path paid using centipaid Apache:: Centipaid module (the test is to pay
$0.005 which will allo the user access for 1 day)

We have tested the module with plain apache site and it works well, but
when used with a zope installation we are getting nothing. What I mean
it seems that module does not get called at all, so it is an apache/Zope
issue dealign with authentication, and that is why I am asking for
pointers on how to do that if it can be done at all.

In plain apache installations the path is the path of the file but in
zope it is not, since it is rewritten to be executed by Zope.cgi This is
the centipaid configuration, the instruction is what confusing me here,
and where should I insert it?? after the rewrite engine? before??.. 


AuthName Centipaid
AuthType aleynet
PerlAuthenHandler Apache::Centipaid
require valid-user

# debug level 5 shows everything, 0 show nothing
PerlSetVar debug 5

# payee information
# To signup for an account go to www.centipaid.com
PerlSetVar acct xxxx
PerlSetVar pass xxx
PerlSetVar amount 0.005
PerlSetVar duration 1d
PerlSetVar lang en
PerlSetVar enforce_ip 0
# centipaid receipt server assigned to payee
PerlSetVar authserver pay001.centipaid.com
PerlSetvar authport 2021

# mysql database to hold the receipts
PerlSetVar dbtype mysql
PerlSetVar dbhost xxxx
PerlSetVar dbport 3306 
PerlSetVar dbname xxxx
perlSetVar dbuser xxx
perlSetVar dbpass xxx


and our zope installation looks like this


ServerName www.aley.net
DocumentRoot /web/zope/sites/www.aley.net
ErrorLog /web/log/www.aley.net-error_log
TransferLog /web/log/www.aley.net-access_log
ScriptAlias /cgi-bin/ /web/zope/sites/www.aley.net/cgi-bin/


# AllowOverride None
AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all


RewriteEngine on 
RewriteRule ^/cgi-bin - [L]
RewriteRule ^/accesswatch - [L]
RewriteRule ^/netgame - [L]
RewriteRule ^/images - [L]
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) /web/zope/sites/www.aley.net/cgi-bin/Zope.cgi$1 
[e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,L]


Any help on getting Zope to work with this authentication module will be
appretiated, since it will open the doors for paid content on sites
using centipaid.

Info about 
centipaid: http://www.centipaid.com
Apache::Centipaid
http://www.centipaid.com/download/apache_centipaid.html
Configuring the Apache::Centipaid module
http://www.centipaid.com/faq/question.php?qstId=8

Thanks in advance..
Adonis 

_______________________________________________________________
Ayna.com the Arabic web starts right here.



------=_NextPart_000_0B6E_01C2D4CC.B2524C30
Content-Type: text/html
Content-Transfer-Encoding: 7bit

<HTML>
<BODY>
Hi,<br>
<br>
We have various sites using Zope and we are trying to install a micropayment solution to collect fees from our online users.  We want to use the Apache::Centipaid module from centipaid.com.  This module is an Apache authentication module, and it works by inserting configuration instructions for mod_perl in the httpd.conf. What we are trying to do (for testing purposed) is to make the http://www.aley.net/Ar/centipaid path paid using centipaid Apache:: Centipaid module (the test is to pay $0.005 which will allo the user access for 1 day)<br>
<br>
We have tested the module with plain apache site and it works well, but when used with a zope installation we are getting nothing.  What I mean it seems that module does not get called at all, so it is an apache/Zope issue dealign with authentication, and that is why I am asking for pointers on how to do that if it can be done at all.<br>
<br>
In plain apache installations the <directory> path is the path of the file but in zope it is not, since it is rewritten to be executed by Zope.cgi  This is the centipaid configuration, the <directory> instruction is what confusing me here, and where should I insert it?? after the rewrite engine? before??.. <br>
<br>
    <directory "/web/zope/sites/www.aley.net/cgi-bin/Zope.cgi/Ar/centipaid"><br>
    AuthName Centipaid<br>
    AuthType aleynet<br>
    PerlAuthenHandler Apache::Centipaid<br>
    require valid-user<br>
<br>
    # debug level 5 shows everything, 0 show nothing<br>
    PerlSetVar debug 5<br>
<br>
    # payee information<br>
    # To signup for an account go to www.centipaid.com<br>
    PerlSetVar acct xxxx<br>
    PerlSetVar pass xxx<br>
    PerlSetVar amount 0.005<br>
    PerlSetVar duration 1d<br>
    PerlSetVar lang en<br>
    PerlSetVar enforce_ip 0<br>
    # centipaid receipt server assigned to payee<br>
    PerlSetVar authserver pay001.centipaid.com<br>
    PerlSetvar authport 2021<br>
<br>
    # mysql database to hold the receipts<br>
    PerlSetVar dbtype mysql<br>
    PerlSetVar dbhost xxxx<br>
    PerlSetVar dbport 3306  <br>
    PerlSetVar dbname xxxx<br>
    perlSetVar dbuser xxx<br>
    perlSetVar dbpass xxx<br>
    </directory><br>
<br>
and our zope installation looks like this<br>
<br>
 <VirtualHost 216.177.8.115:80><br>
    ServerName www.aley.net<br>
    DocumentRoot /web/zope/sites/www.aley.net<br>
    ErrorLog   /web/log/www.aley.net-error_log<br>
    TransferLog   /web/log/www.aley.net-access_log<br>
    ScriptAlias /cgi-bin/ /web/zope/sites/www.aley.net/cgi-bin/<br>
    <br>
        <Directory "/web/zope/sites/www.aley.net/cgi-bin"><br>
# AllowOverride None<br>
    AllowOverride AuthConfig<br>
    Options ExecCGI<br>
    Order allow,deny<br>
    Allow from all<br>
    </Directory><br>
<br>
    RewriteEngine on  <br>
    RewriteRule ^/cgi-bin - [L]<br>
    RewriteRule ^/accesswatch - [L]<br>
    RewriteRule ^/netgame - [L]<br>
    RewriteRule ^/images - [L]<br>
    RewriteCond   %{HTTP:Authorization} ^(.*)<br>
        RewriteRule  ^(.*) /web/zope/sites/www.aley.net/cgi-bin/Zope.cgi$1 <br>
[e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,L]<br>
</VirtualHost><br>
<br>
Any help on getting Zope to work with this authentication module will be appretiated, since it will open the doors for paid content on sites using centipaid.<br>
<br>
Info about <br>
centipaid: http://www.centipaid.com<br>
Apache::Centipaid http://www.centipaid.com/download/apache_centipaid.html<br>
Configuring the Apache::Centipaid module http://www.centipaid.com/faq/question.php?qstId=8<br>
<br>
Thanks in advance..<br>
Adonis
</BODY></HTML>
<BR><font face="Arial, Helvetica, sans-serif" size="2" style="font-size:13.5px">_______________________________________________________________<BR>Ayna.com the Arabic web starts right here.</font><br><br>
------=_NextPart_000_0B6E_01C2D4CC.B2524C30--