YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

Custom pass-through variable Options
jtabish
#1 Posted : Thursday, December 18, 2003 1:08:09 PM
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..
Sponsor  
 
willylam
#2 Posted : Monday, December 22, 2003 6:56:41 AM
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;
}
Tim_Myth
#3 Posted : Sunday, April 10, 2005 2:53:07 PM
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
jtabish
#4 Posted : Sunday, April 10, 2005 6:16:15 PM
Rank: Starting Member

Groups: Registered

Joined: 12/13/2003
Posts: 4
Location: ,
255 chars
Tim_Myth
#5 Posted : Sunday, April 10, 2005 6:37:28 PM
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
jtabish
#6 Posted : Sunday, April 10, 2005 7:31:46 PM
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
Tim_Myth
#7 Posted : Sunday, April 10, 2005 8:42:25 PM
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
Tim_Myth
#8 Posted : Sunday, April 10, 2005 8:45:07 PM
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
jtabish
#9 Posted : Sunday, April 10, 2005 8:52:09 PM
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
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFVision Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.291 seconds.