Paypal Newbie - How do i add an additional variable?

Discussion in 'HTML & Website Design' started by sabian1982, Mar 2, 2007.

  1. #1
    I am trying to get a rather simple form added to a website that i am working on. The idea is that the user fills out a two form box (one input is for their full name and the other if for a username that they have specified previously).

    This information (once payment has occured) needs including in the details page of the transaction and the email notification seen by me (the buyer).

    I think i have managed to work out how to achieve this, however would obviously like to know if the following above code will provide the required solution.

    
    
    <form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">
            <input type="hidden" name="cmd" value="_xclick">
            <input type="hidden" name="business" value="payments@address.com">
            <input type="hidden" name="currency_code" value="USD">
            <input type="hidden" name="item_name" value="Purchase Product A">
            <input type="hidden" name="amount" value="49.99">
    		<input type="hidden" name="return" value="http://www.voisd.com/success">
    		<input type="hidden" name="cancel_return" value="http://www.voisd.com/failure">
    		<input type="hidden" name="undefined_quantity" value="0">
    		<input type="hidden" name="no_shipping" value="0">
    		<input type="hidden" name="no_note" value="1">
            <table width="349">
              <tr>
                <td width="136" class="left"><input type="hidden" name="on0" value="username" maxlength="75"> Name</td>
                <td width="201"><input name="on0" type="text" class="input"></td>
              </tr>
              <tr>
                <td class="left"><input type="hidden" name="on1" value="username" maxlength="75">
                  Username</td>
                <td><input name="on1" type="text" class="input"></td>
              </tr>
              <tr>
                <td class="left">&nbsp;</td>
                <td><input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but01.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"></td>
              </tr>
            </table>
          </form>
    
    
    Code (markup):
    Im also interested to know if i should be using the on0/on1 or os0/os1 assignment (as i dont understand the real difference).

    Any insight would be much appreciated.

    Thanks
     
    sabian1982, Mar 2, 2007 IP