Frage
I have a paypal button within a jqtouch site as follows
<div id="paypal">
<div class="toolbar">
<h5>Pay online</h5>
<a href="#" class="back">Back</a>
</div>
<div class="s-scrollwrapper" >
<div>
<form action="https://www.paypal.com/cgi-bin/webscr"method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="----@-----------">
<input type="hidden" name="item_name" value="Test Item">
<input type="hidden" name="amount" value="1.00">
<input type="hidden" name="currency_code" value="NZD">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="bn"value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHosted">
<input type="image" src="https://www.paypalobjects.com/en_US/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_US/i/scr/pixel.gif" width="1"height="1">
</form>
</div>
</div>
</div>
Taping the paypal button does nothing. Firebuging sees a post
request with a result code of 302
followed by a get
that is cancelled. If I put the button on a page outside of jqtouch it seems to work not problem. How would you trouble shoot this?
Chrome console shows the following. In the non-jqtouch the initiator is (other)
Lösung 2
Jqtouch submits all forms as with AJAX by default. This upsets the paypal button. Add the following to you initialization
formSelector: false
Andere Tipps
That isn't a valid PayPal button. The 302 is redirecting you to login since you aren't posting a valid set of data. I would recommend setting up a Sandbox Account and cut and paste the actual button snippet. It should look more like this PayPal button sample.
<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="me@mybusiness.com">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_name" value="Teddy Bear">
<input type="hidden" name="amount" value="12.99">
<input type="image" src="http://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif"
border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>