PayPal Subscribe button with modify - I am breaking it somehow - how? - paypal-ipn

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.

Try creating an unhosted button. Some values in the form aren't allow to be used when the preset values are saved within the PayPal account.
When creating the button add the steps below to obtain the "raw" HTML code.
Click "Step 2: Track inventory, profit & loss (optional)"
Uncheck "Save button at PayPal"
Once the button is created go ahead and click the link to remove code protection. If the issue continues please post the new form here and I'll take a look.
Hope this helps!

Related

Show paypal buy button in fancybox popup?

How can I put this code into fancybox popup, and activate it whenever my <a> button gets pressed?
Here is the code:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="test#gmail.com">
<input type="hidden" name="lc" value="IN">
<input type="hidden" name="item_name" value="Item 1">
<input type="hidden" name="amount" value="1.00">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest">
<table>
<tr><td><input type="hidden" name="on0" value="Your info">Your info</td></tr><tr><td><input type="text" name="os0" maxlength="200"></td></tr>
<tr><td><input type="hidden" name="on1" value="More info">More info</td></tr><tr><td><input type="text" name="os1" maxlength="200"></td></tr>
</table>
<input type="image" src="https://www.paypalobjects.com/en_GB/i/btn/btn_buynowCC_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_GB/i/scr/pixel.gif" width="1" height="1">
</form>
Any help or suggestions are well appreciated.
P.S.: I will have multiple different buttons on my store, and each one should open different popup since each item costs different amount.
Please put the contents of your paypal button (that you have mentioned in the question) in say "myfancybox.html"
then in your file add:
<a data-fancybox-type="iframe" href="myfancybox.html">Pay</a>

Paypal non-hosted buy now form creation

I have different products in my site to sell.
The problem is that each time for new product i have to manually create a new form using paypal and implement it in site which takes a lot time.While purchase i need two information from customers their email and phone no. .So is there any way to do this by creating a non-hosted paypal form.Can we add text-fields in non-hosted paypal forms?
For Example:(below is non-hosted paypal form how can i add two text fields to it and get them show up in customers purchase detail in paypal)
<div style="width:300px;background-color: #FFFFFF">
<h2 style="text-align:center">
Type in title here</h2>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" name="paypal_form">
<h3 style="text-align:center">
Yummy Logo for $90</h3>
<p align="center">
<input type="submit" value="Buy" /></p>
<input name="cmd" type="hidden" value="_xclick" />
<input name="business" type="hidden" value="my_paypal_email#example.com" />
<input name="item_name" type="hidden" value="logo type x2" />
<input name="amount" type="hidden" value="2" />
<input name="no_shipping" type="hidden" value="1" />
<input name="no_note" type="hidden" value="0" />
<input name="cn" type="hidden" value="Client Comments:" />
<input name="return" type="hidden" value="http://example.com" />
<input name="cancel_return" type="hidden" value="http://example.com" />
<input name="rm" type="hidden" value="1" />
<input name="currency_code" type="hidden" value="USD" />
</form>
</div>
<p>
</p>
Check out HTML Variables for Filling Out PayPal Checkout Pages Automatically.

I am trying to redirect to paypal from my site http:\\www.abc.com and it doesn't work

I am trying to redirect to paypal from my site http:\www.abc.com and it doesn't work and shows message like To help protect the security of information you enter into this website, the publisher of this content does not allow it to be displayed in a frame.
Anyone can tell what is this issue for?
Here is a code example directly from the PayPal Developer Site:
For PayPal Button Manager API Overview click here
<form target="paypal" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="19218">
<table>
<tr><td><input type="hidden" name="on0" value="Color">Color</td></tr><tr><td><select name="os0">
<option value="Red">Red $10.00
<option value="Blue">Blue $8.00
<option value="Green">Green $12.00
</select> </td></tr>
<tr><td><input type="hidden" name="on1" value="Size">Size</td></tr><tr><td><select name="os1">
<option value="Small">Small
<option value="Large">Large
</select> </td></tr>
</table>
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="">
<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

Passing Address details via the Buy Now button

I am trying to pass my users details to Paypal screen using the appropriate html variables but only some are getting passed!?!?!? This is driving me mad! The order details are fine.
My code is:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick" />
#*Order Details*#
<input type="hidden" name="business" value="sales#xxxxxx.co.uk">
<input type="hidden" name="item_name" value="Order Number 123">
<input type="hidden" name="amount" value="200.00">
<input type="hidden" name="currency_code" value="GBP">
#*Address Stuff *#
<input type="hidden" name="first_name" value="Barry">
<input type="hidden" name="last_name" value="White">
<input type="hidden" name="address1" value="1 Big Street">
<input type="hidden" name="address2" value="Big Mountain">
<input type="hidden" name="city" value="Big City">
<input type="hidden" name="country" value="GB">
<input type="hidden" name="email" value="Bob#bob.com">
<input type="hidden" name="lc" value="UK">
<input type="image" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_buynowCC_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_GB/i/scr/pixel.gif" width="1" height="1" />
</form>
The paypal screen shows some of the fields (name, email country!) but not all
Why are some of the fields populating and some not!!!!!!!!!
Thanks
It seems that if you don't supply all the address details then it will not display any!
If I add the zip field then it displays the address.
Paypal integration should be so simple but their documentation is so bad - shows what monopolies do for you.
all the address fields are optional according to the documentation ffs

Cannot get Paypal subscribe button to work

I am trying to implement a simple subscribe button using Paypal.
I have used their button generator and then copy pasted that code into my webpage.
The form looks perfectly fine and when I select a package and then click subscribe I need to login to Paypal which also works but then I get this error:
The link you used to access the PayPal system is invalid. Check the link and try again.
This is my button code. What is wrong?
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="XXXXXX">
<table>
<tr><td><input type="hidden" name="on0" value="Packages">Packages</td></tr><tr><td><select name="os0">
<option value="Donor">Donor: $5,00 USD</option>
<option value="Vip">Vip: $10,00 USD</option>
<option value="Svip">Svip: $15,00 USD</option>
<option value="Elite">Elite: $20,00 USD</option>
</select> </td></tr>
<tr><td><input type="hidden" name="on1" value="Minecraft username">Minecraft username</td></tr><tr><td><input type="text" name="os1" 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_subscribe_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/sv_SE/i/scr/pixel.gif" width="1" height="1">
</form>
Forgot to fill in all settings for my Paypal Company account. Works fine now with above code.