ok i am sure the title is a bit misleading,
what i am trying to do now is setup an add to cart button for paypal, which i have done and it works well in sandbox, what i am struggling with is how to add a ticket number from a range of physical tickets that i want to sell. i have an idea on how to do it but not sure if its the most efficient/safe way.
My idea,
in sql have a table tickets
in the table have fields ticket_num name …
on the php
var $start_num $end_num $current_num $last_num
in the script have it check the table for the $last_num
then make $current_num = $last_num+1
if the $current_num > $end_num error out
if the $current_num < $start_num error out
in the paypal script just give it a hidden field of $current_num
and input the data back into the table for the next order
the only problem i see with this is efficiency and what if 2 orders happen at the same time? they will skip number yes?
is there a better way?