【问题标题】:Using Sage Pay iFrame method ,for customer click the url to complete the payment,how can I generate the iFrame URL?使用 Sage Pay iFrame 方法,客户点击 url 完成支付,如何生成 iFrame URL?
【发布时间】:2014-09-23 08:40:09
【问题描述】:

这里是问题: 我的网站使用 Sage Pay iFrame 方法让客户完成付款,但我不知道如何生成付款 URL,客户可以点击该 URL 重定向到 Sage Pay 以完成付款。

这个网址是我需要的,或者如何生成这个网址。

【问题讨论】:

标签: c# asp.net-mvc iframe opayo


【解决方案1】:

我建议您查看SagePay API documentation here,它将引导您了解如何创建对 SagePay 的请求以接收 nextUrl,特别是 Appendix A1 and Appendix A2 - 因为这是您的付款注册请求和响应对象.基本上这个过程是这样的:

  • 您将请求对象(在附录的 A1 中)发送到 SagePay 的服务器 - 为此,您需要阅读链接 PDF 的相关部分。

  • 他们使用响应对象 (A2) 进行响应,其中一个属性是 NextUrl。

  • 然后,您可以将 url 呈现给用户以供点击,或者更好的解决方案是将页面返回给用户,使用 NextUrl 值作为页面中 iframe 的 src - 类似于

-

return View("Payment", new SagePayView { nextUrl = sagePayResponse.NextUrl });

以及您的付款视图:

<h2>Secure Payment by SagePay</h2>
<iframe src="@Model.nextUrl" width="600", height="600" frameborder="0" border="0" style="margin-left:15px;"></iframe>

【讨论】:

  • 谢谢你们……文档很有帮助。
猜你喜欢
  • 1970-01-01
  • 2018-02-11
  • 1970-01-01
  • 1970-01-01
  • 2013-05-20
  • 1970-01-01
  • 2016-09-05
  • 2015-04-15
  • 1970-01-01
相关资源
最近更新 更多