I have a local version of a client's site running in a Wordpress installation on my machine with MAMP. The website contains a PayPal donation form that was written by another developer but left unfinished until the client had set up a PayPal account. The client now has the account, and has hired me to make the donation form "live." Obviously I want to test this before I flip the switch to make it live on their site. When I attempt to submit the form to my PayPal Sandbox account for testing, the browser goes to the correct URL, but I receive the following error message in the browser:
HTTP Status 405 - Request method 'POST' not supported
According to PayPal's documentation, the form's method must be "Post." Also, I've tested other sites with similar PayPal forms successfully on this installation of MAMP. My question is: is there a bug in the code that I'm not catching (as I said, I didn't write this), or is there a server permission that I need to change in MAMP? If the latter, how do I change server permissions in MAMP, because I can't seem find that option anywhere.
Here's the code that's submitting to PayPal:
<form method="post" action="https://www.sandbox.paypal.com">
<div id="small-button-container" class="">
<div id="twenty-five" class="lightred general_button blue_button form_small_button selected_amount select_state_color_btn"><span>25</span></div>
<div id="fifty" class="general_button blue_button form_small_button select_state_color_btn"><span>50</span></div>
<div id="one-hundred" class="general_button blue_button form_small_button select_state_color_btn"><span>100</span></div>
<div id="two-hundred" class="general_button blue_button form_small_button select_state_color_btn"><span>200</span></div>
</div>
<div id="other-amount" class="general_button blue_button form_other_amount">
<span><img src="<?php $root ?>/images/close.png"/>
</span>
<label>$</label><input class="whitetext" type="text" name="other-amount" value="143">
</div>
<div id="other-amount-button" class="general_button blue_button select_state_color_btn">
<span>OTHER</span>
</div>
<input type="hidden" name="LOGIN" value="(Sandbox Test Account Here)">
<input type="hidden" name="PARTNER" value="PayPal">
<input id="donation-amount" type="hidden" name="AMOUNT" value="0">
<input id="donation_description" type="hidden" name="DESCRIPTION" value="Tax deductible donation to (Client's Name Here) (Tax Identification Number: XXXX)">
<input type="hidden" name="TYPE" value="S">
<input class="general_button blue_button submit_button" id="submit" type="submit" value="Donate">
</form>
Note: There's a lot of other stuff in this code, because it's set up to calculate the amount of donation selected before submitting.