PayPal 在移动网站结帐


Paypal Checkout in mobile website

我正在开发一个通过PayPal销售产品的移动网站。当我单击PayPal按钮时,它会重定向到桌面模式下PayPal站点。我想将其更改为移动模式...

我使用以下代码

<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>

这里显示 桌面版 .我想更改为移动版本。我用Android和Iphone设备检查了这一点。在移动设备中,它也显示桌面版本。我用谷歌搜索了一下,一些网站说它会根据设备自动更改,但对我不起作用。

请就此提出建议以纠正

提前谢谢....

不知道命令_xclick有什么替代方案,但使用快速结帐您可以使用而不是

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

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

所以网址看起来像https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout-mobile&token=....在此处查看有关快速结账移动版的更多信息:https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_WPECOnMobileDevices 。

尝试为您的xclick cmd参数找到类似的解决方案。