Donate Button: Return page after checkout not working

Rick_Cosmos
Contributor
Contributor

I'm setting up a website for
a client  who will be accepting donations for different segments of their nonprofit -- One for donations towards books, one for their annual walk, etc.

 

In the advance features of
creating a button I chose a return page containing the full URL.


When I test the button out everything processes okay and I'm returned to
a page that says:


Your donation is now complete

Gives a Confirmation number saying an email will details will be sent to me, the client's info, etc.

 

I'm not returned automatically to the return page but there is a button on this page to return to our site, but when I click that button I get the message
"Method Not Allowed
The requested method POST is not allowed for the URL  (i.e. My return URL)

 

I questioned Paypal about it but don't understand their response:


Currently donation buttons always use a POST instead of a GET method for the return regardless of "rm" or profiles settings and static html pages cannot receive posts by default if they do they give back a 405 Method not allowed like you are seeing.  The POST and GET methods of the return are basic coding functionality and your developer/host should know this information.

 

. Set the return to a page that can handle this method such as a page using a more robust scripting language (PHP, Java or .NET, which your developer/host should also know about)
2. Adjust the pages settings to allow for a POST (This changes based on your integration and hosting so I cannot give specific steps)
3. Remove the return url altogether.

 

Sorry to drop in so much info, but can anyone translate this for me... I'm a designer, not a coder.

 

THanks a million.


Login to Me Too
6 REPLIES 6

skier
Advisor
Advisor

Easiest method is to first enable Auto Return in your Account Profile, this must be done first.   You can then override what's in your Profile by using the "return" variable in your item button code.

 

Here's a few details:

 

"Auto Return" immediately brings your buyers back to your specified URL upon payment completion. This feature replaces the standard PayPal hosted "Payment Done" page with a page hosted on your website.

To set up Auto Return, you need to turn it on in your Account Profile and enter the return URL that will be used to redirect your buyers back to your site.

Log in to your Account
Select "Edit Profile"
Under "Selling Preferences"
Select "Website Payment Preferences"
Note first option - Select "On" - Auto Return for Website Payments
Enter the Return URL.
Click "Save."

The Return URL specified in your PayPal Account is good for all transactions however, you can override this by using the "return" variable in your individual item button code and direct the buyer to a different URL.

 

 

How Auto Return Works:
* If the buyer pays with a PayPal account, they are automatically taken back to the site.

* If the buyer pays with the Credit Card Option, they are taken to the receipt page where PayPal gives them the chance to print out a receipt. This is a legal requirement. After that, the buyer must click on the "Return to Merchant" link in order to return to the site.

Notes: The Credit Card Option or PayPal Account Optional is turned on by default for new PayPal Premiere and Business accounts. With PayPal Account Optional turned off, people without PayPal accounts must sign up for a PayPal account. They can pay by credit card, but they must agree to sign up for a PayPal account before completing their transactions and making their payments. Only Premiere or Business accounts have PayPal Account Optional in their account profiles. With Personal accounts, the checkout experience is as if PayPal Account Optional were turned off.

 

 

* If your plan is to have data returned with the URL specified in the value, then you would need to include the "rm" variable.
For example:
<input type="hidden" name="rm" value="2">
Means - The payer’s browser is redirected to the return URL by the POST method, and all transaction variables are also posted.

<input type=
"hidden" name="rm" value="1">
Means - The payer’s browser is redirected to the return URL by the GET method, and no transaction variables are sent.

<input type=
"hidden" name="rm" value="0">
Default setting - All shopping cart transactions use the GET method.

The "rm" variable takes effect only if the "return" variable is also set.

 

 

 Regards,

 

skier

 

Login to Me Too

Rick_Cosmos
Contributor
Contributor

Skier,

Thanks for the response.

I already had the Auto Return turned on and I was having the buttons created by paypal, so I'm not sure where I would make the code changes you mentioned.

 

For a quick fix what I ended up doing was changed my return page from .html to .php and now it seems to work.

 

Do you think that's okay?

 

Rick

Login to Me Too

skier
Advisor
Advisor

If you are getting the results you expect to see, then it's OK.

 

 

Regards,

 

skier

Login to Me Too

Rick_Cosmos
Contributor
Contributor

Sigh...Skier,

My quick solve seemed to work on my PC in I.E. but it doesn't seem to be working on Mac browsers.

 

I get to the summary page as I described before but when I click on the return to our website button I get the popup: "This is  a non-secure form. This form will be sent in a way that is not secure. Are you sure you want to send it?"

 

You have to hit send a couple of times before you return to my site.

 

Could you tell me where/how to insert the code you mentioned previously.

 

Thanks

Rick

Login to Me Too

jsnkadlec
New Community Member

Did you solve the "this is a non-secure form" issue? I've just run into it and am looking for the solution.

 

If you click "Send" it works fine, you're taken to the right page but I'm pretty sure a lot of people who see that will hit cancel.

Login to Me Too

mjackson
New Community Member

Had the same problem, applied the auto-return solution (although it seemed that the route to the appropriate settings screen had changed since December).  It works fine if I make a donation using a PayPal account, but if a credit card is used instead the return button from the completion screen still raises a 405 error.  Suggestions?

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.