【发布时间】:2017-05-06 15:50:38
【问题描述】:
我正在使用 MVC 开发一个网站,我将使用 PayPal 管理付款。
付款后我需要交易ID,但我不知道如何获得。 谁能帮帮我?
payRequest.ReturnURL = url + Url.Action("PaymentPayPalOk");
payRequest.CancelURL = url + Url.Action("PaymentKo");
payRequest.Amount = Math.Round(model.total, 2);
payRequest.Commento = string.Format("Ordine: {0}", OrderId);
payRequest.ReceiverEmail = PayPal.RecipientEmail;
var payResponse = _payPalService.ProcessPayment(payRequest, Server.MapPath("~/"));
model.TransactionId = payResponse.PayPalKey;
if (payResponse.IsSuccessful)
{
return Redirect(payResponse.RedirectURL);
}
else
return RedirectToAction("Index", "Error");
我附上了我需要的信息的图片
【问题讨论】:
-
你用的是什么SDK?
-
感谢您的回答,我正在使用 SOAP 响应。
标签: c# asp.net-mvc paypal