我有一个带有订阅 paypal 按钮的 asp.net MVC4 操作:
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" id="payPalForm">
<input type="hidden" name="item_number" value="@item.Id">
<input type="hidden" name="item_name" value="@item.Name">
<input type="hidden" name="src" value="1">@*Recurring until user cancels*@
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="p3" value="1"> @*Billing cycle amount*@
<input type="hidden" name="t3" value="M"> @*billing cycle period - Month*@
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="business" value="dude@dude.com">@*Hiva's paypal account*@
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="return" value="@returnUrl">
<input type="hidden" name="amount" id="amount" value="@item.Price">
<input type="submit" name="Submit" value="Subscribe">
</form>
在返回 URL 中,它触发了一个操作,我希望能够在其中查看表单详细信息以及付款是否通过,以及所有这些好东西。这就是我所拥有的:
public ActionResult PaymentConfirm(FormCollection form)
{
//if successful, blah blah
var user = User.Identity.Name;
//Merchant merch = ctx.Merchants.Single(x => x.User.UserName == user);
//merch.Plan = plan;
return RedirectToAction("Index", "Merchant");
}
我怎样才能得到这些数据!