-
17
-
95
-
25.05.2017
-
Turkey
I creating my own payment method, when OpcCheckoutPage call PaymentInfo View i had an error.
Any idea ?
-
17
-
95
-
25.05.2017
-
Turkey
i try to added
web.config file, app.config file, packages.config and "@using Nop.Web.Framework" in View
but still giving error
Zertifizierter Entwickler
-
64
-
538
-
05.03.2015
-
India
Please give more details on the error
-
17
-
95
-
25.05.2017
-
Turkey
Here PaymentInfoViewModel Class
public string IFrameSrc { get; set; }
public bool IsVisible { get; set; }
public bool IsFailed { get; set; }
Here PaymentInfo Method
[ChildActionOnly]
public ActionResult PaymentInfo()
{
/* other codes. */
var model = PaymentInfoViewModel();
model.IFrameSrc = "https://website.com/token"
model.IsVisible = True;
model.IsFailed = False;
return View("~/Plugins/Payments.PayTR/Views/PaymentInfo.cshtml",model);
}
Here View
@if (!Model.IsFailed)
{
<script src="https://www.website.com/js/iframeResizer.min.js"></script>
<iframe src="@Model.IFrameSrc" id="paymentframe" frameborder="0" scrolling="no" style="width: 100%;">
</iframe>
<script>iFrameResize({}, '#paymentframe');</script>
}
else
{
<label> Payment method couldnt load.. </label>
}