PDA

View Full Version : paypal item_number


testbot
10-21-2009, 03:58 PM
how is the paypal item_number generated? can this be any value as long as it's unique to each order?

i see this in the payments template.

<input type="hidden" name="item_number" value="$item" />

i'm just not sure how $item is being generated. it looks like it's just a hash or something but it changes every time.

--------------- Added 1256146467 at 1256146467 ---------------

found it. if anyone else needs it:

$hash = md5($vbulletin->userinfo['userid'] . $vbulletin->userinfo['salt'] . $subscriptionid . uniqid(microtime(),1));

i would store it as something else though if you're going to use it somewhere. that's just em though.

<input type="hidden" name="item_number" value="$item_number" />
$item_number= md5($vbulletin->userinfo['userid'] . $vbulletin->userinfo['salt'] . $subscriptionid . uniqid(microtime(),1));