Text field data from PayPal button payment is not grabbed in Classic API NVP transaction details call

StackOverflow https://stackoverflow.com/questions/17823222

Question

I'm calling GetTransactionDetails with NVP using the code from List of PayPal transactions

The HTML for the PayPal button look likes

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="XXXXXXXXXXXXX"> PLACEHOLDER VALUE
<table>
<tr><td><input type="hidden" name="on0" value="Tier Selection">Tier Selection</td></tr><tr><td><select name="os0">
<option value="Tier 1">Tier 1 $15.00 USD</option>
<option value="Tier 2">Tier 2 $30.00 USD</option>
<option value="Tier 3">Tier 3 $50.00 USD</option>
<option value="Tier 4">Tier 4 $200.00 USD</option>
<option value="Tier 5">Tier 5 $500.00 USD</option>
<option value="Tier 6">Tier 6 $1,000.00 USD</option>
</select> </td></tr>
<tr><td><input type="hidden" name="on1" value="Name for Product">Name for Product</td></tr><tr><td><input type="text" name="os1" maxlength="200"></td></tr>
<tr><td><input type="hidden" name="on2" value="Forum Email Address">Forum Email Address</td></tr><tr><td><input type="text" name="os2" maxlength="200"></td></tr>
</table>
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

Tne NVP call returns (after parse_str)

L_OPTIONSNAME0 => Tier Selection
L_OPTIONSNAME1 => Name for Product
L_OPTIONSVALUE0 => Tier 1
L_OPTIONSVALUE1 => NAME
L_OPTIONS1NAME0 => Name for Product
L_OPTIONS1VALUE0 => NAME

The "Name for Product" data is returned twice and the "Forum Email Address" is not returned. The "Forum Email Address" data is displayed properly under Item Title when I view Transaction Details on the PayPal website. And as a side note when I export transactions to CSV the "Forum Email Address" data is not being exported.

I plan on writing a script that would automatically add the "Forum Email Address" data to a private forum on my site by using the PayPal API.

Is the duplicate name/value entry a bug?

No correct solution

OTHER TIPS

From a quick glance at your code it looks like you have everything set correctly. I am not aware of any bugs for this issue off hand. However, I would suggest opening up a ticket with PayPal's Merchant Technical Support so that this can be looked into further and a bug filed for this if needed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top