开发者

Paypal return URL - using GET parameters?

开发者 https://www.devze.com 2023-01-04 03:52 出处:网络
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

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>


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


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消