Hello, We already have a membership site where we manually process memberships for successful payments. However, increasing sales makes it very hard to manually process memberships. We use GsPay payment processor for credit card payments and we are happy with them. I am wondering if AmemberPro can be integrated to use GsPay payment processor. If it is possible AmemberPro will be the best software for our site. Willing to buy Amember immediately if this is possible. I have emailed both Amember and GsPay support . I am also willing to pay separate for this GsPay plug in. Here is the GsPay reply and the script file ================================ CALLBACK SCRIPT v1.0 --------------------- Important note: This script helps you to manage and update your .htpasswd file. Also, .htacess and .htpasswd files are unix/linux things, so the script does not work on NT or other server platforms. Overview: This script update your .htpasswd file after membership was purchased on GSPAY. If user cancel or refund money, GSPAY automatically remove users login and password from your server. Installation: 1) Upload cs.pl to your cgi-bin then chmod to "755". 2) Run script, Enter Callback script key (you will use it in "Site preferences" to protect yourself from using your script by someones). If you see message "Unable to create config file", chmod your cgi-bin folder to "777", then run again. After successful installation, chmod your cgi-bin folder back to "755". 3) Now Password Update Script installed on your server. Check at your "Site preferences" that you enter correct "Callback script key" field. Test your script by clicking on "Add test password" in "Site preferences" page. If you meet any problems with script setup, contact our Support: support@gspay.com Thank you! GSPAY Staff. Script from GsPay ================================== PHP: #!/usr/bin/perl use CGI qw (:standard); $q=new CGI (); $confname=".postback.cfg"; $cryptkey="aa"; $docroot=$ENV{DOCUMENT_ROOT}; open (data, $confname) or &createconf(); @data=<data>; close(data); foreach $data(@data) { $data=~s/\n//; $data=~s/ //; @datax=split(/:/, $data); if ("@datax[0]" eq "key") { $key=@datax[1]; } elsif ("@datax[0]" eq "memberzone_url") { $memberzone_url=@datax[1]; } elsif ("@datax[0]" eq "passwd_filename") { $passwd_filename=@datax[1]; } elsif ("@datax[0]" eq "htaccess_filename") { $htaccess_filename=@datax[1]; } } print "Content-type: text/plain\n\n"; #$key="12345"; #$memberzone_url="/members/"; $protected_dir=$docroot.$memberzone_url; if (!$passwd_filename) { $passwd_filename="$protected_dir/.passwd"; } if (!$htaccess_filename) { $htaccess_filename="$protected_dir/.htaccess"; } $userkey=crypt($q->param(key),$cryptkey); $username=$q->param(username); $password=$q->param(password); $action=$q->param(action); if ( $userkey ne $key or !$key or !$userkey ) { &error("keys mismatch"); exit; } $htaccess_text=" AuthUserFile \"$passwd_filename\" AuthName \"authorized users only\" AuthType Basic require valid-user "; if ( !-e "$passwd_filename") { print "creating password file ($passwd_filename)\n"; open HTACC,">","$passwd_filename" or &error("Unable to open password file"); close HTACC; } if ( !-e "$htaccess_filename") { print "creating htaccess file ($htaccess_filename)\n"; open HTACC,">","$htaccess_filename" or &error("Unable to open htaccess file"); print HTACC $htaccess_text; close HTACC; } if (!$username or !$password) { &error("invalid username ('$username') or password ('$password')"); } if ($action eq "adduser") { &adduser; print "postback:1:New user '$username' is added."; exit; } if ($action eq "deluser") { &deluser; print "postback:2:User '$username' is deleted form the data base.\n"; exit; } if ($action eq "updateuser") { &updateuser; print "postback:3:User '$username' updated the data base.\n"; exit; } sub error { print "postback:0:$_[0]\n"; #print "$!\n"; exit; } sub adduser { open (data, "<$passwd_filename") or &error("Unable to open the data file"); @data=<data>; close(data); foreach $data(@data) { @datax=split(/:/, $data); unless ($username ne "@datax[0]" or $username != @datax[0]){ print("postback:-1:Sorry, the user name '$username' has been taken already."); exit; } } $cryptedpassword = crypt($password, $cryptkey); open (wdata, ">>$passwd_filename") or &error("Unable to write to the data file"); print wdata "$username:$cryptedpassword\n"; close(wdata); } sub deluser { open (data, "<$passwd_filename") or &error("Unable to open the password file"); @data=<data>; close(data); $count=0; foreach $data(@data) { $count++; @datax=split(/:/, $data); if ($username eq "@datax[0]" and $username== "@datax[0]") { $count--; splice (@data, $count, 1); open (wdata, ">$passwd_filename") or &error("Unable to write to the data file"); print wdata @data; close(wdata); } } } sub updateuser { &deluser; &adduser; } sub createconf { $ins_key=$q->param(ins_key); $ins_key2=$q->param(ins_key2); $ins_memberzone_url=$q->param(ins_memberzone_url); $ins_passwd_filename=$q->param(ins_passwd_filename); $ins_htaccess_filename=$q->param(ins_htaccess_filename); if ($ins_memberzone_url and $ins_key and $ins_key eq $ins_key2 and -d $docroot.$ins_memberzone_url) { print "Content-type: text/plain\n\n"; open (wdata, ">$confname") or &error("Unable to create config file ($confname)"); $crypted_ins_key=crypt($ins_key, $cryptkey); print wdata "key:$crypted_ins_key\n"; print wdata "memberzone_url:$ins_memberzone_url\n"; if ($ins_passwd_filename) { print wdata "passwd_filename:$ins_passwd_filename\n"; } if ($ins_htaccess_filename) { print wdata "htaccess_filename:$ins_htaccess_filename\n"; } close(wdata); print "Config created successfully. Installation complete.\n"; } else { #if ($ins_memberzone_url and !-d $docroot.$ins_memberzone_url) { if ($ins_memberzone_url and !-d $docroot.$ins_memberzone_url) { $err=" members zone path invalid (".$docroot.$ins_memberzone_url.")<br>"; } print "Content-type: text/html\n\n"; print " <html> <b>$err</b> Install: <br> <form> Callback script key: <input name=ins_key value=\"$ins_key\"><br> Repeat key: <input name=ins_key2 value=\"$ins_key2\"><br> <font color=red>*</font> Members zone path: <input value=/members/ name=ins_memberzone_url value=\"$ins_memberzone_url\"><br> <font color=red>* <b>If you have (members or protected folder) for example like here www.yourdomain.com/members/ Enter only name of folder e.g. /members/</font></b><br> <font color=green>*</font> Full path to .passwd filename: <input size=45 name=ins_passwd_filename value=\"$ins_passwd_filename\"> Optional<br> <font color=green><b>If your password file outside of members folder, then enter your full path to password file (Example: /home/users/adult.com/pswd/.passwd).</font><br> <input type=submit value=Install> </form> </html> "; } exit; } #foreach $env (keys %ENV) { # print "$env $ENV{$env}\n"; #}
It's best to have aMember helpdesk handle payment plugins. I'm sure they will be able to come back to you on this. Lee