ASP.NET 付款后收到来自paypal的查询字符串
ASP.NET receive a query string from paypal after payment
我创建了一个允许用户通过 PayPal 付款的按钮,并且可以使用,
然而,当我回到我的页面时,我没有收到 url 查询字符串来捕获 。
这是当前代码:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<button class="ato4" name="submit" type="image" onmouseover="this.style.backgroundColor='#CCC9BD';return true;" onmouseout="this.style.backgroundColor='rgba(79,129,189,0.5)';return true;" style="cursor:pointer;float:right;margin-right:490px;">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="V84TB5GYULLYC">
<font class="shadowfilter">תשלום דרך האינטרנט
<br>
<font style="color:green;">PAYPAL</font>
</font>
</button>
</form>
如何让 paypal 自动重定向到我的网站,而无需按 PayPal 在其网站上的 return 按钮?
显然有一个选项可以让所有页面自动 return 到 -> url 。好吧,它不如单个页面好,但它给出了结果
您必须在您的 PayPal 帐户中启用自动 return,否则它将忽略 return
字段。
来自文档(已更新以反映新布局):
Auto Return is turned off by default.
To turn on Auto Return:
- Log in to your PayPal account at https://www.paypal.com.
The My Account Overview page appears.
- Click the Profile subtab.
The Profile Summary page appears.
- Click the My Selling Tools link in the left column.
- Under the Selling Online section, click the Update link in the row for Website Preferences.
The Website Payment Preferences page appears
- Under Auto Return for Website Payments, click the On radio button to enable Auto
Return.
- In the Return URL field, enter the URL to which you want your payers redirected after
they complete their payments.
NOTE: PayPal checks the Return URL that you enter. If the URL is not properly formatted
or cannot be validated, PayPal will not activate Auto Return.
- Scroll to the bottom of the page, and click the Save button.
IPN 用于即时付款通知。它将为您提供比自动 return.
更多的 reliable/useful 信息
IPN 文档在此处:https://www.x.com/sites/default/files/ipnguide.pdf
IPN 联机文档:https://developer.paypal.com/docs/classic/ipn/gs_IPN/
一般的程序是你在请求中传递一个notify_url
参数,并设置一个页面来处理和验证IPN通知,PayPal会在[=31]时向该页面发送请求以通知你=].经过。该 IPN 处理程序页面将是更新数据库以将订单标记为已支付的正确位置。
参考:Setting PayPal return URL and making it auto return?
我创建了一个允许用户通过 PayPal 付款的按钮,并且可以使用, 然而,当我回到我的页面时,我没有收到 url 查询字符串来捕获 。
这是当前代码:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<button class="ato4" name="submit" type="image" onmouseover="this.style.backgroundColor='#CCC9BD';return true;" onmouseout="this.style.backgroundColor='rgba(79,129,189,0.5)';return true;" style="cursor:pointer;float:right;margin-right:490px;">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="V84TB5GYULLYC">
<font class="shadowfilter">תשלום דרך האינטרנט
<br>
<font style="color:green;">PAYPAL</font>
</font>
</button>
</form>
如何让 paypal 自动重定向到我的网站,而无需按 PayPal 在其网站上的 return 按钮?
显然有一个选项可以让所有页面自动 return 到 -> url 。好吧,它不如单个页面好,但它给出了结果
您必须在您的 PayPal 帐户中启用自动 return,否则它将忽略 return
字段。
来自文档(已更新以反映新布局):
Auto Return is turned off by default. To turn on Auto Return:
- Log in to your PayPal account at https://www.paypal.com. The My Account Overview page appears.
- Click the Profile subtab. The Profile Summary page appears.
- Click the My Selling Tools link in the left column.
- Under the Selling Online section, click the Update link in the row for Website Preferences. The Website Payment Preferences page appears
- Under Auto Return for Website Payments, click the On radio button to enable Auto Return.
- In the Return URL field, enter the URL to which you want your payers redirected after they complete their payments. NOTE: PayPal checks the Return URL that you enter. If the URL is not properly formatted or cannot be validated, PayPal will not activate Auto Return.
- Scroll to the bottom of the page, and click the Save button.
IPN 用于即时付款通知。它将为您提供比自动 return.
更多的 reliable/useful 信息IPN 文档在此处:https://www.x.com/sites/default/files/ipnguide.pdf
IPN 联机文档:https://developer.paypal.com/docs/classic/ipn/gs_IPN/
一般的程序是你在请求中传递一个notify_url
参数,并设置一个页面来处理和验证IPN通知,PayPal会在[=31]时向该页面发送请求以通知你=].经过。该 IPN 处理程序页面将是更新数据库以将订单标记为已支付的正确位置。
参考:Setting PayPal return URL and making it auto return?