When I set modify=1 as below and click the button I don't get the advertised behaviour of being taken to a PayPal page where I can upgrade my (the test user's) existing subscription. Instead I just get presented with a new subscription, which doesn't cancel the old one if I agree. I'm sending some extra stuff as well and I figure something there must be breaking it ... but what?
<form target="paypal" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" name="subscribe_XXXXXX" id="subscribe_XXXXXX" style="float: left;">
<input type="hidden" name="cmd" value="_s-xclick" />
<input type="hidden" name="bn" value="XXXXXX" />
<input type="hidden" name="custom" value="XXXXXX" />
<input type="hidden" name="image_url" value="XXXXXX" />
<input type="hidden" name="no_shipping" value="1" />
<input type="hidden" name="notify_url" value="XXXXXX" />
<input type="hidden" name="return" value="XXXXXX" />
<input type="hidden" name="rm" value="2" />
<input type="hidden" name="cbt" value="XXXXXX" />
<input type="hidden" name="src" value="1" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="hosted_button_id" value="XXXXXX" />
<input type="hidden" name="item_name" value="XXXXXX" />
<input type="hidden" name="modify" value="1" />
<input type="hidden" name="on0" value="Subscription options" />
<input type="hidden" name="on1" value="email" />
<table>
<tbody>
<tr>
<td>Subscription options:</td>
<td>
<select name="os0">
<option value="Daily">Daily: </option>
<option value="Weekly">Weekly: </option>
<option value="Montly">Monthly: </option>
<option value="Yearly">Yearly: </option>
</select>
</td>
<td>
<input type="text" name="os1" maxlength="200"/>
</td>
<td>
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_subscribeCC_LG.gif" border="0" name="submit" title="Subscribe to CognitiveLab ICND1" alt="PayPal - The safer, easier way to pay online!" width="96" height="30" /><img alt="|" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
</td>
</tr>
</tbody>
</table>
</form>
All the URLs are correct and work properly. I've also tried modify=2, and I am setting modify=0 if I know that the user isn't subscribed.
I am expecting this to result in a subscr_modify
IPN with a revised period[123]
and mc_amount[123]
and a subscr_effective
date. It doesn't, I get a new subscr_signup.