View Full Version : $5.00 Per Calendar Entry.
JackG
09-08-2001, 04:11 AM
Hello,
I was wondering if someone will help me to make
this hack.
My web site is for a music genre called freestyle.
Our vB Calendar is a hot spot to get party info.
When I post an event, the club owner
usually is very happy at the turn out.
I was wondering if I can generate a little
income by charging 5 bucks to post an event.
-------------------
Hack Request Description:
When user (member) clicks on add event,
I would like them to come to the add event page.
Once they place the event the hack would direct
them to 'Pay Pal' where they pay 5 bucks.
Somehow.. The hack must know that the user
paid and only then display/finalize their entry.
-------------------
This hack may be of some interest to others who
want to do the same.
Any ideas.. Suggestions and actual code would be greatly
appreciated.
* The Pay Pal thing may be near impossible, so
if anyone has alternative ideas..please post!
Admin
09-08-2001, 06:54 AM
[QUOTE]Originally posted by JackG
* The Pay Pal thing may be near impossible, so
if anyone has alternative ideas..please post!
tubedogg
09-08-2001, 07:04 AM
For more on PayPal, including info on Instant Payment Notification, visit this page:
https://www.paypal.com/cgi-bin/webscr?cmd=p/acc/ipn-info
(Note: you will need to log-in to PayPal to visit this page).
Also look at this page:
https://www.paypal.com/cgi-bin/webscr?cmd=p/acc/ipn-sample-pop (same deal, must log-in).
Some PERL code, which could be ported to PHP rather easily for use in this:
#!/usr/local/bin/perl
# read the post from PayPal system and add 'cmd'
read (STDIN, $query, $ENV{'CONTENT_LENGTH'});
$query .= '&cmd=_notify-validate';
# post back to PayPal system to validate
use LWP::UserAgent;
$ua = new LWP::UserAgent;
$req = new HTTP::Request 'POST','https://www.paypal.com/cgi-bin/webscr';
$req->content_type('application/x-www-form-urlencoded');
$req->content($query);
$res = $ua->request($req);
# split posted variables into pairs
@pairs = split(/&/, $query);
$count = 0;
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$variable{$name} = $value;
$count++;
}
# assign posted variables to local variables
$receiver_email = $variable{'receiver_email'};
$item_name = $variable{'item_name'};
$item_number = $variable{'item_number'};
$custom = $variable{'custom'};
$payment_status = $variable{'payment_status'};
$payment_date = $variable{'payment_date'};
$payment_gross = $variable{'payment_gross'};
$payment_fee = $variable{'payment_fee'};
$txn_id = $variable{'txn_id'};
$first_name = $variable{'first_name'};
$last_name = $variable{'last_name'};
$address_street = $variable{'address_street'};
$address_city = $variable{'address_city'};
$address_state = $variable{'address_state'};
$address_zip = $variable{'address_zip'};
$address_country = $variable{'address_country'};
$payer_email = $variable{'payer_email'};
if ($res->content eq 'VERIFIED') {
# check transaction for uniqueness
# process payment
}
elsif ($res->content eq 'INVALID') {
# possible fraud
}
else {
# error
}
JackG
09-08-2001, 05:10 PM
Thanks for answering FireFly & TubeDog.
I cant port perl to PHP :(
TubeDog. I just read that page, so it is
defanatly possible to do.
Pay pall will pass payment_status (paid/failed,etc)
or even this may work payment_fee (will return the ammt.
that was deposited in your acct.)
Then maybe we need to pass a 'custom' feild to let
the hack know the payment was for this calendar
transaction and not another type of transaction.
I just need some help actually making the php code
and having this thing work.
JackG
09-15-2001, 08:19 PM
Can anyone help here? I am sure this hack will help other
forums too??
Why dosent anyone want to help? I will pay a little if thats what u want.
chrispadfield
09-15-2001, 09:26 PM
a non programming solution would be to get people to pay via paypal, when they do you just give them permission to post public events on the calendar. It is hardly going to take you more than 30 seconds. I know my subscription ordreing process requires me to fill in one quick permission change, hardly that much effort.
JackG
09-15-2001, 09:27 PM
I hear that chrispadfield. An Automated program will be Much more efficient and less time consuming for the web master.
JackG
09-17-2001, 10:31 PM
If anyone here has a forum and feels that this hack with
help them Please Respond. Maybe if their are allot of us..
Someone will want to make this hack. We can even
chip in $ if needed to get this done.
JackG
02-22-2003, 07:45 PM
Ok that's that. Waiting for the new vB.. maybe
it will address this issue :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.