A client requested that I set the Subsribe button to have reattempts at failed payments quite specifically. The account used is a Paypal Standard (not paypal pro) and from my research there's only the SRA variable that only toggles the pre-set 3-attempts in 5 days setting by Paypal, which is giving up on a subsriber too easily from my client's perspective. He'd want a total of 30 billing re-attempts, done every 3 days for the next 90 days.
I have only found other people wondering the same thing, but haven't found a solution. My current code on the page is this:
<form id='frmPayPalYearly' 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="xxxxxxxx">
<input type="hidden" name="custom" value="Standard Annual Member with id:<?php echo $user_id;?>">
<input type="hidden" name="invoice" value="03/2013/<?php echo $user_id;?>/12/<?php echo uniqid()?>">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/btn/btn_subscribe_SM.gif" width="0" height="1">
</form>
If I add the SRA like so:
<input type="hidden" name="sra" value="1">
Correct me if I'm wrong, but this will tell Paypal to reattempt 3 times. Any way I can make Paypal reattempt 30 times?
Anyone has any ideas?
Unfortunately, there isn't much you can do.
The API products actually provide parameters to specify this sort of thing, but they're ignored. It's a known issue that I've been hoping to see fixed for years now. I'm not holding my breath. Everything falls to the default of 3 attempts 5 days apart and then suspends.
If you were using the API's then you could at least automate the process of re-activating the plugin when it becomes suspended on that 3rd attempt so that it falls right back into a fresh 3-attempt cycle, and just keep doing that as many times as you want your application to allow.
With Payments Standard, though, there isn't an API that will let you do this. You would need to switch to Express Checkout API's in order to do that, and then you would handle the auto-re-activate within an IPN solution.
Related
I have created a hosted PayPal button for monthly subscription and included its code on my website.
The subscription offers a free trial period of 1 week.
I would like to check if the user has already used their trial and is trying to subscribe again. And if so, how do I let PayPal know that it should not allow a trial period for that user?
The button's code looks something like this:
<form action="https://www.sandbox.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="ABCDEFGHIJKLM">
<input type="hidden" name="on0" value="Your email">
<label for="plan-email">Your email</label>
<input id="plan-email" type="email" name="os0" placeholder="joanne.doe#gmail.com" required maxlength="200">
<button type="submit">Subscribe</button>
</form>
It would be even better, if you know a way to use Subscription Plan (created in https://www.paypal.com/billing/plans) as an HTML form similar to the one above (pure HTML form, without using PayPal JavaScript SDK) instead of a Button (created in https://www.paypal.com/buttons/). I need to pass an extra option (user's email) to PayPal as well as whether to allow a trial period or not.
I'm building a website and want to add "Paypal" payment method
so I add this Html Form to site page
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="paypal">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="add" value="1">
<input type="hidden" name="business" value="paypalemail#gmail.com">
<input type="hidden" name="item_name" value="My Cart Item 1">
<input type="hidden" name="amount" value="10.00">
<input type="hidden" name="shopping_url" value="http://localhost:2718/school/paymeant.aspx">
<input type="hidden" name="return" value="http://localhost:2718/school/paymeant.aspx?sucess=1">
<input type="hidden" name="cancel_return" value="http://localhost:2718/school/paymeant.aspx?faile=1">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but22.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
all is going ok expect when user want to pay me throw credit or master or visa card
then paypal ask them to create account to pay throw that card how can i remove
create account option in debit or credit card section
The method you are using for adding a PayPal button to your is called Payments Standard. This integration method is quick and easy, but it has some limitations.
What you're after, where users can just pay with a credit card without logging in or creating an account, is called "guest checkout". Unfortunately, with Payments Standard guest checkout relies on browser based cookies. As such, if anybody has ever signed in to a PayPal account with that particular browser the system is going to assume you'll be using PayPal, so it sort of hides away the guest checkout option. You should still see a link that allows you to get there, but it's very easy to miss.
If you were to try that in a fresh browser or clear the cache/cookies in your current browser you would probably see the guest checkout experience.
If you want to force the guest checkout experience at all times regardless of browser cookies you'll need to use the Express Checkout API instead of Payments Standard. This will require the use of a programming language like PHP.
Assuming you are familiar with that, you could use this PHP PayPal SDK to easily integrate Express Checkout. It comes with free samples that would probably be enough to get you going.
Alternatively, if you are using a CMS of some kind there is probably a plugin available that would make Express Checkout integration easy for you. For example, if you're using WooCommerce, by chance, I would recommend taking a look at PayPal for WooCommerce.
I have been trying to make a working ipn for my website. Here's the code:
Have tested this through real PayPal.
My Button:
<form method="post" name="paypalConfirm" action="http://www.paypal.com/cgi-bin/webscr">
<input type="hidden" name="rm" value="2"/>
<input type="hidden" name="cmd" value="_xclick"/>
<input type="hidden" name="custom" value="username">
<input type="hidden" name="business" value="email"/>
<input type="hidden" name="item_name" value="Item"/>
<input type="hidden" name="amount" value="0.02"/>
<input type="image" 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">
I have tested these several times but it just won't work. If anybody could help me, please do.
You need to make sure you have IPN configured in the PayPal account that is receiving the payment.
If you do have it configured and you don't think you're getting an IPN check the IPN History in your PayPal account. This will show you whether or not anything is getting sent and what response your server is sending back. It's possible the IPN's are getting sent but your script is simply failing.
You'll need to check your web server logs to see what the error is if that's the case, or what I like to do is setup a basic HTML form with the action set to my IPN URL. I include hidden fields that match what I expect to get from an IPN, and then I load this in a browser and submit it. This allows me to see the result on screen which helps with debugging. Once it's all working there you know it'll work when PayPal sends it.
Keep in mind if testing that way the IPN will not verify with PayPal since the data didn't come from them, so you'll need to make sure your code logic handles that accordingly.
I must be going crazy, or I'm completely lost when it comes to understanding what is doable when it comes to PayPal buttons on my site - either way I must apologise if this seems obtuse.
I'm building a custom CMS for my clients, and I'm trying to let them utilize PayPal on their sites by simply entering in either their merchant ID, or their PayPal e-mail address, and then let CMS will do the rest. Ideally:
Client enters merchant ID / PayPal e-mail address into CMS backend
CMS generates "Buy Now" button for client's buyers to click on
Buyer pays on PayPal's site
Buyer gets redirected to client's site
My headache disappears
This seems to be easier said than done. I've read the developer documentation on generating your own buttons, and used that Javascript-based button generator to create a button with an IPN callback, but that's not going to redirect the buyers back to my clients' websites.
Thus my questions: is it at all possible to achieve what I'm looking to do with just my clients' merchant ID's? Is it possible to do it without them having to configure anything additional in their PayPal account settings to avoid set-up issues? Should I be looking at a different PayPal processing mechanism instead of the "Buy Now" button?
I should probably mention that I have a free PayPal account, not a Premium or Business account, but that should be irrelevant to this situation as it's not me that's trying to get paid.
Thanks in advance, and any help is GREATLY appreciated!
create a hidden field named 'return' in your form and put your return URL as the 'value'
A thank you to Billy for his answer, and while researching this topic some more, I've discovered that what I'm looking to do CANNOT be done with the current payment standards buttons on a standard free PayPal account. You can't achieve automatic redirection back to your site from PayPal with the Buy Now button.
As Billy mentioned, you can add return URLs that will give the user the option to click on a link that will return them to your site afterwards (PayPal will add these links to their side of operations themselves). To do this you would need to add the appropriate hidden fields to your PayPal form.
This worked for me:
<form method="post" action="https://www.paypal.com/cgi-bin/webscr">
<input type="hidden" name="button" value="buynow">
<input type="hidden" name="item_name" value="Item 1">
<input type="hidden" name="amount" value="1234.56">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="env" value="www">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="return" value="http://www.site.com/success">
<input type="hidden" name="cancel_return" value="http://www.site.com/error">
<input type="hidden" name="business" value="your#email.com">
</form>
I hope this helps someone avoid headache and unnecessary documentation scouring!
I am using "buy it now" PayPal buttons but I DO NOT want to use the previously saved buttons on my PayPal account, I want to create a custom form that has a submit button. However, I need to know which fields are the minimum required ones for a form. I thought it would be something like this
<input type="hidden" name="cmd" value="_s-xclick" >
<input type="hidden" name="business" value="me#myemail.com" >
<input type="hidden" name="item_name" value="some item name" >
<input type="hidden" name="item_number" value="some item number" >
<input type="hidden" name="amount" value="10.00" >
But this keeps on kicking back as an unpecified error on PP. Any thoughts?
The following link has a minimal example: https://www.paypal.com/cgi-bin/webscr?cmd=_pdn_xclick_techview_outside . The most important parts are making sure the action is correct and the cmd field is correct. (I'm not familiar with _s-xclick as a command – I always use _xclick myself – but my knowledge in the area is admittedly a bit dated.)
For more tips on making the form just right, I recommend poking around on the PayPal Developer network: https://www.x.com/index.jspa
Also, please note: PayPal IPN is a feature that does callback posts from PayPal to you, the merchant, after a purchase is made, and doesn't quite seem to be what you're working with here, which is the button's form posted from the user's browser to PayPal. This form submission in a buy-now button is just considered part of the buy-now button feature.