asp.net - Getting the property send by api in mvc -
i using paytab's api. (paytab payment gate way api). after payement return actionresult thereturnpage(). there need payement_refrence property paytab send post method. in asp.net 2 tier did , worked me
public partial class thereturnpage : system.web.ui.page { protected void page_load(object sender, eventargs e) { httpcontext c = httpcontext.current; if (c.request["payment_reference"] != null) { string paymentreference = c.request["payment_reference"].tostring(); if (verifypayment(paymentreference)) { //payment verified , logging out payment process if (logoutpayment()) { textbox1.text = "payment verified , logged out successfuly";
how can same in mvc? paytab manual can find here. https://www.paytabs.com/paytabs-api%20documentation.pdf
you can use request.form object in controller, object contains post values of request, this:
string paymentreference = request.form.get("payment_reference");
Comments
Post a Comment