Paypal Return URL

允我心安 提交于 2019-12-12 02:34:35

问题


I need to allow recurring subscription to take place. So far, It is looking good except that Paypal is not honoring completely the "return" hidden variable value. It does the redirect but it omits the supplied query string. It does add couple querystring variables such as www.mysite.com?auth=XXXX&form_charset=YYYY

For my solution, I want to rely on some values on the query string if that possible. Otherwise, I would have to store that temporary info in Session.

Any ideas?

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

        <input type="hidden" name="cmd" value="_xclick-subscriptions">
        <input type="hidden" name="business" value="MerchantEmailAddress" />

        <input type="hidden" name="item_name" value="Description of Transaction">

        <input type="hidden" name="a3" value="5.00">
        <input type="hidden" name="p3" value="1">


        <input type="hidden" name="t3" value="M"> 
        <input type="hidden" name="src" value="1">

        <input type="hidden" name="custom" value="111.111111" />
        <input type="hidden" name="invoice" value="11" />

        <input type="hidden" name="cancel_return" value="http://www.MySite.com/?Cmd=Cancel"   />
        <input type="hidden" name="return" value="http://www.MySite.com/?Cmd=Return"   />
        <input name="notify_url" value="http://www.MySite.com/?Cmd=Notify" type="hidden">

        <!-- Display the payment button. -->
        <input type="image" name="submit" border="0" src="https://www.paypalobjects.com/en_US/i/btn/btn_subscribe_LG.gif"
                alt="PayPal - The safer, easier way to pay online">
        <img alt="" border="0" width="1" height="1"
            src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif">
    </form>

回答1:


Adding the rm=2 variable and value should work. That would tell PayPal to send information back as a POST. If you have Payment Data Transfer enabled in your seller account it would overwrite the rm value and the information returned to your site from PayPal would always be a GET.



来源:https://stackoverflow.com/questions/17641421/paypal-return-url

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