PayPal subscription button with change - somehow I break it - how?

When I set modify=1 , as shown below, and click the button, I do not get the advertised behavior on the PayPal page, where I can update my test user with an existing subscription. Instead, I just get a new subscription, which does not cancel the old one if I agree. I am sending some extra things, like well, and I see something, it 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" /> <!-- Modify HERE --> <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 URLs are correct and working correctly. I also tried modify=2 , and I set modify=0 if I know that the user is not subscribed.

I expect this to result in a subscr_modify IPN with a revised period[123] and mc_amount[123] and a subscr_effective . It is not, I get a new subscr_signup.

+4
source share
1 answer

Try creating an unpainted button. Some values ​​in the form cannot be used when previously saved values ​​are saved in your PayPal account.

When creating the button, add the following steps to get the "raw" HTML code.

  • Click "Step 2: Mark inventory, profit and loss (optional)"
  • Uncheck "Save to PayPal"

Once the button is created, follow the link to remove the code protection. If the problem continues, write a new form here, and I'll see.

Hope this helps!

+14
source

All Articles