Paypal Checkout in mobile website

浪子不回头ぞ 提交于 2019-12-12 04:47:27

问题


I am developing one mobile website for selling products through paypal. When i click the paypal button it redirects to paypal site in desktop mode. i want to change that to mobile mode...

I use the following code

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" name="paypal">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="merchant@website.com">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="product1">
<input type="hidden" name="amount" value="1.00">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="return" value="www.website.com/mobile/paypalreturn.php"/>
<input type="hidden" name="cancel_return" value="www.website.com/mobile/" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="shopping_url" value="www.website.com/mobile/index.php"> 
<input type="hidden" name="notify_url" value="www.website.com/mobile/paypalnotify.php">
<script>document.paypal.submit();</script>
</form>

Here it show Desktop version . I want to change to mobile version.. I checked this with Android and Iphone Devices. in Mobile device also its shows desktop version. I googled it, some site said it automatically change according to devices but not working for me..

Please suggest on this to rectify

Thanks in advance....


回答1:


Do not know what alternative there is for command _xclick, but with Express Checkout you can use instead of

<input type="hidden" name="cmd" value="_express-checkout" />

this

<input type="hidden" name="cmd" value="_express-checkout-mobile" />

So the URL looks like https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout-mobile&token=.... See more about Express Checkout Mobile here: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_WPECOnMobileDevices .

Try to find similar solution for Your xclick cmd parameter.



来源:https://stackoverflow.com/questions/10893457/paypal-checkout-in-mobile-website

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!