Paypal return URL - using GET parameters?

廉价感情. 提交于 2019-12-23 15:08:56

问题


Here's some simple code I'm using to test the Paypal Website Payments Standard upload thingy.

My return URL is http://mysite/index.php?module=store&show=order_confirm I go through the payment process, and when I get to the end and it returns me to the page, it instead just returns me to index.php (i.e. without the extra parameters).

Anyone know what the deal with this is

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">

    <input type="hidden" name="cmd" value="_cart" />

    <input type="hidden" name="upload" value="1">
    <input type="hidden" name="return" value="http://mysite/index.php?module=store&amp;show=order_confirm" />
    <input type="hidden" name="currency_code" value="EUR" />

    <input type="hidden" name="business" value="b.coug_1277121937_biz@gmail.com">

            <input type="hidden" name="item_name_1" value="adaddada" />
            <input type="hidden" name="amount_1" value="30.00" />

            <input type="hidden" name="quantity_1" value="1" />
                            <input type="hidden" name="item_name_2" value="wuiui" />
            <input type="hidden" name="amount_2" value="50.00" />
            <input type="hidden" name="quantity_2" value="1" />


    <input type="hidden" name="custom" value="19" />

    <input type="image" name="submit" border="0" src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" alt="PayPal - The safer, easier way to pay online">

</form>

回答1:


I'm not sure why Paypal is doing what it's doing, but I suspect their desire to add their own GET parameters is wiping out your own. You might want to try something like this, if mod_rewrite or something similar is available to you:

write a rule that changes this:

http://mysite/store/order_confirm/?merchant_return_link=Test+Store

to this

http://mysite/index.php?merchant_return_link=Test+Store&module=store&show=order_confirm



回答2:


Try escaping the ? and & in the return URL; change them to %3F and %26.




回答3:


An alternative answer is to set the paypal 'rm' [return method] variable to "2", so that paypal would POST all its own return variables, rather than sending them as GET variables



来源:https://stackoverflow.com/questions/3094426/paypal-return-url-using-get-parameters

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