Paypal return URL does not start properly

Our website has the following one-time payment buttons.

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
    <input type="hidden" name="custom" value="@Model.UserId.ToString()">
    <input type="hidden" name="notify_url" value="http://www.testweb.com/paypal/IpnHandler">
    <input type="hidden" name="return" value="http://www.testweb.com/paypal/Onetimeyearlysuccess">
    <input type="hidden" name="cancel_return" value="http://www.testweb.com/paypal/cancel">
    <input type="hidden" name="cmd" value="_s-xclick">
    <input type="hidden" name="hosted_button_id" value="8xxxxxxC">
    <input type="image" src="@Url.Content("~/images/OneTime55year.png")" border="0" name="submit" style="width: 130px !important; height: 47px !important;" alt="PayPal - The safer, easier way to pay online!" >
</form>

After completing the payment in PayPal, we saw that we were getting 404 error. The problem is that we are getting the wrong URL.

https://www.testweb.com/PaypalOnetimeyearlysuccess?amt=55.00&cc=USD&cm=22028&item_name=oneTimeAnnual55&st=Completed&tx=59M0424544743135Y

We do not know why the sloping abyss after PayPal.

The correct URL must be

https://www.testweb.com/Paypal/Onetimeyearlysuccess?amt=55.00&cc=USD&cm=22028&item_name=oneTimeAnnual55&st=Completed&tx=59M0424544743135Y

The URL must have a slash after PayPal.

You can also see the correct URL from the paypal button return URL.

Why is he redirecting the wrong address?

URL- paypal. " http://www.testweb.com/paypal/Onetimeyearlysuccesstest."

URL- , paypal URL-.

, , URL- .

+4
1

PayPal 'return'. URL- (http://www.testweb.com/paypal/Onetimeyearlysuccess). , .html,.php,.aspx .., .

0
source

Source: https://habr.com/ru/post/1690603/


All Articles