0

ユーザーが受け入れた後、PayPal サービスをページにリダイレクトする必要があります。リダイレクトしたいページは、次の構造に従います。

  • Me.aspx
  • \Paypal\Accept.aspx
  • \Paypal\Cancel.aspx
  • \Paypal\Finish.aspx

だから私がいるならhttp://localhost:63000/myfolder/me.aspx

PayPal からのリダイレクトを希望しますhttp://localhost:63000/myfolder/paypal/accept.aspx

どのように?

4

2 に答える 2

0

ReturnURL = HttpContext.Current.Request.Url.AbsoluteUri.ToLower().Replace("me", "PayPal/Accept")

HttpContext.Current.Request.Url.AbsoluteUriがhttp:// localhost:63000 / myfolder / me.aspxの場合、ReturnURLはhttp:// localhost:63000 / myfolder / PayPal / Accept.aspxであり、PayPalサンドボックスは正しく返されます。

于 2012-04-11T08:48:52.267 に答える
0

Ok。うまくいきました!

HttpContext.Current を使用して現在の Url を取得し、現在のページをサブディレクトリとページに書き換えることができます。

ReturnURL = HttpContext.Current.Request.Url.AbsoluteUri.ToLower().Replace("me", "PayPal/Accept")

HttpContext.Current.Request.Url.AbsoluteUri がhttp://localhost:63000/myfolder/me.aspxReturnURL であるhttp://localhost:63000/myfolder/PayPal/Accept.aspx場合、PayPal サンドボックスは適切に返されます。

于 2012-04-12T08:14:38.920 に答える