Im having difficult time here trying to call a web-service with a razor-macro.
When I added the service reference with VS2010 it got it to work and it gave me intellisence and so on, but when I call the macro in the umbraco template it throws me the rendering error...
Calling a web-service problem
Hey there,
Im having difficult time here trying to call a web-service with a razor-macro.
When I added the service reference with VS2010 it got it to work and it gave me intellisence and so on, but when I call the macro in the umbraco template it throws me the rendering error...
Here is some code:
@using System
@using TrumotNet
<form class="TrumotNetForm" target="_blank" action="" enctype="application/x-www-form-urlencoded;charset=UTF-8" accept-charset="UTF-8" method="POST">
<fieldset>
<legend><strong>התממשקות</strong></legend>
<input class="frmInput" type="hidden" name="sCompanyID" value="***">
<input class="frmInput" type="hidden" name="sGroupId" value="**********">
<label for="sLastName">שם משפחה:</label>
<input class="frmInput" type="text" name="sLastName">
<label for="sFirstName">שם פרטי:</label>
<input class="frmInput" type="text" name="sFirstName">
<label for="sStreet">רחוב:</label>
<input class="frmInput" type="text" name="sStreet">
<label for="sHome">מספר בית:</label>
<input class="frmInput" type="text" name="sHome">
<label for="sCity">עיר:</label>
<input class="frmInput" type="text" name="sCity">
<label for="sZip">מיקוד:</label>
<input class="frmInput" type="text" name="sZip">
<label for="sID">ת.ז:</label>
<input class="frmInput" type="text" name="sID">
<label for="sPhone">טלפון:</label>
<input class="frmInput" type="text" name="sPhone">
<label for="sRemark">הערות:</label>
<input class="frmInput" type="text" name="sRemark">
<label for="sVisaID">מס כ.אשראי:</label>
<input class="frmInput" type="text" name="sVisaID">
<label for="sExpMonth">תוקף חודש:</label>
<input class="frmInput" type="text" size="50" name="sExpMonth">
<label for="sExpYear">תוקף שנה:</label>
<input class="frmInput" type="text" size="50" name="sExpYear">
<label for="sCVV">מס אימות:</label>
<input class="frmInput" type="text" size="50" name="sCVV">
<label for="sAmaunt">סכום:</label>
<input class="frmInput" type="text" size="50" name="sAmaunt">
<label for="sTimes">תשלומים:</label>
<input class="frmInput" type="text" size="50" name="sTimes">
<input type="submit" value="Invoke" class="button">
<label id="lblMsg"></label>
</fieldset>
</form>
@{
TrumotNet.Visa1SoapClient oVisa = new TrumotNet.Visa1SoapClient();
TrumotNet.Ret oRet = new TrumotNet.Ret();
oRet = oVisa.ClearingTrumaRegister(
Request["sCompanyID"],
Request["sLastName"],
Request["sFirstName"],
Request["sStreet"],
Request["sHome"],
Request["sCity"],
Request["sZip"],
Request["sID"],
Request["sPhone"],
Request["sRemark"],
Request["sVisaID"],
Request["sExpMonth"],
Request["sExpYear"],
Request["sCVV"],
Request["sAmaunt"],
Request["sTimes"],
Request["sGroupId"]
);
if(oRet.nRet == 0){
Model.lblMsg.Text = "הפעולה הסתימה בהצלחה" + "<br>" + "קוד קבלה " + Convert.ToString(oRet.nDocID);
}else{
Model.lblMsg.Text = "הפעולה נכשלה" + "<br>";
foreach( string sErr in oRet.saErrors){
Model.lblMsg.Text += sErr + "<br>";
}
//Model.btnPay.Visible = True
}
}
Any Ideas?
is working on a reply...