|
|
|
Rank: Starting Member
Groups: Registered
Joined: 12/13/2003 Posts: 4 Location: ,
|
Hi,
I'm wanting to pass my own values through paypal back to my ipn script using the pass-through variable custom.
I need to pass my own $username, $password, $subgroup, $ip variables with that custom variable that paypal provides us.. I just don't know how to set it properly up in the forms and then how to put the data my perl ipn script gets back into seperate values again... I realize that the custom variable will be just one giant string that needs to be seperated into it's own values inside my ipn script and that is what I'm looking for... How to setup the 'custom variable' in my forms then how to seperate it's data into seperate $values inside my perl ipn script..
|
|
|
|
|
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 12/22/2003 Posts: 2 Location: ,
|
Hi,
You may compose your custom string like
$string = username=abc&passsword=456
and use the URL encoding function in Perl to change it:
$string =~s/(\W)/sprintf("%%%02X",unpack("C",$1))/eg;
After receiving the custom variable from Paypal, just invoke
$string=~s/%([0-9a-f][0-9a-f])/pack("C",hex($1))/egi;
to decode the whole string and further split the string by
@pairs = split(/&/,$buffer); foreach $pair(@pairs) { ($name, $value) = split(/=/, $pair); $FORM{$name} = $value; }
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 4/10/2005 Posts: 5 Location: ,
|
How long can that custom variable be? I'm trying to find the answer in the manual, but no luck so far.
Yesterday's Traditions, Tomorrow's Technology
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 12/13/2003 Posts: 4 Location: ,
|
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 4/10/2005 Posts: 5 Location: ,
|
Hmmm...that's a problem. I need to pass around 500 characters. Any ideas?
Yesterday's Traditions, Tomorrow's Technology
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 12/13/2003 Posts: 4 Location: ,
|
There is more then 1 variable that can be used in there to pass custome variables
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 4/10/2005 Posts: 5 Location: ,
|
With the pass through variables, can html strings be sent when building my http POST? For example, can I set custom='<p>', Or does it have to be custom='%3cp%3e'?
I scrolled down the page further and found that I could also 'subvert' the invoice variable. Good call! ;)
Yesterday's Traditions, Tomorrow's Technology
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 4/10/2005 Posts: 5 Location: ,
|
My bad. I forgot the information in the previous posts. I can just "use the URL encoding function in Perl to change it". I catch on eventually... :D
Yesterday's Traditions, Tomorrow's Technology
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 12/13/2003 Posts: 4 Location: ,
|
Well what I used to do is pass the custome variable with $custome=&username=abc&password=test
There is a perl or php to pharse variables like this
|
|
|
|
Guest
|
YAFVision Theme by Jaben Cargman (Tiny Gecko)Powered by YAF |
YAF © 2003-2009, Yet Another Forum.NETThis page was generated in 0.291 seconds.