0

I've got a PayPal button with three text fields and my customers are able to complete transactions using the button but the text field data does not appear in the transaction details. I think the problem is how the input tags are named. Here's part of the code:

<tr><td style="padding:20px;"><input type="hidden" name="on0" value="Payment Options"><span style="color:blue">Payment Options:</span></td>
<td><select name="os0" style="width: 300px; height: 23px;"> 
    <option value="Payment Option (1)">Payment Option (1) $75.00 USD</option>
    <option value="Payment Option (2)">Payment Option (2) $100.00 USD</option>
    <option value="Payment Option (3)">Payment Option (3) $125.00 USD</option>
    <option value="Payment Option (4)">Payment Option (4) $150.00 USD</option>
    <option value="Payment Option (5)">Payment Option (5) $175.00 USD</option>
    <option value="Payment Option (6)">Payment Option (6) $200.00 USD</option>
    <option value="Payment Option (7)">Payment Option (7) $225.00 USD</option>
    <option value="Payment Option (8)">Payment Option (8) $250.00 USD</option>
    <option value="Payment Option (9)">Payment Option (9) $275.00 USD</option>
    <option value="Payment Option (10)">Payment Option (10) $300.00 USD</option>
</select> </td></tr>
<br>

<tr><td style="padding:20px;"><input type="hidden" name="on1" value="Student Name"><span style="color:blue">Student Full Name:<span style="color:red">*</span></td>
<td><input type="text" name="os1" maxlength="100" style="width: 300px; height: 23px;" required ></td></tr>

<tr><td style="padding:20px;"><input type="hidden" name="on2" value="Parent Name"><span style="color:blue">Parent Full Name:</span><span style="color:red">*</span></td>
<td><input type="text" name="os2" maxlength="100" style="width: 300px; height: 23px;" required ></td></tr>

<tr><td style="padding:20px;"><input type="hidden" name="on3" value="Parent Phone"><span style="color:blue">Parent Phone Number:</span><span style="color:red">*</span></td>
<td><input type="text" name="os3" maxlength="100" style="width: 300px; height: 23px;" required ></td></tr>

PayPal tech support sent me a this:

"Below is one of the examples of how to use the variable "on0" and "os0" for naming." https://www.paypal.com/us/cgi-bin/webscr?cmd=_pdn_xclick_options_help_outside

Still, I can't figure it out. Any help would be appreciated! I think this solution is close to being correct I just don't know a small bit.

Notice the 3 text fields. PayPal button builder allows for 2 text fields. I'm trying to add the additional one.

PayPal Form

The details show the data passed to the 3 text fields. Unfortunately, this data does not appear in the transaction details once the payment has been made.

PayPal Payment Screen

0

Use PayPal's payment button generator to build the proper code for your button. You can add additional input fields there, then compare that to your (I am assuming) custom-built button code.

  • Hi Rick - I did use the PayPal button generator but it only allows for two text inputs and I wanted more. I think the problem is that I don't know how to add the extra text input without breaking the way the button works. – zzMzz Jun 2 '17 at 14:47
  • Since PayPal only allows two text inputs, you will need to create an intermediate form that collects information (and stores the data in a temporary 'pending order' table, then that form's submit will pass info to the actual paypal button. Set a variable with a unique value, then pass that along to the actual PayPal form as an additional variable. Then your processing page will need to 'connect' the two form's post values via the stored info from the first form. – Rick Hellewell Jun 2 '17 at 18:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.