2010-02-23 2 views

답변

2

ccavenue에 통합 설명서를 확인하시기 바랍니다. 나는 귀하의 웹 사이트에 페이팔을 통합하는 것과 같은 생각을하지 않습니다.

0

을 도움이되기를 바랍니다 offical 한

1

해결되었습니다. 예 CCAvenue는 좋은 지원을 제공합니다. 그러나 asp.net 포럼을 사용하는 사람은 항상 asp.net 코드와 직접 답변을 찾습니다. :)

나는 이것이 누군가 도움이되기를 바랍니다. 코드 뒤에 두 개의 속성을 만들었습니다. 하나는 체크섬 값을 반환하고 다른 하나는 체크 아웃 항목에 대한 세부 정보를 반환하는 것입니다.

public string CCAvenueItemList 
{ 
    get 
    { 
     StringBuilder CCAvenueItems = new StringBuilder(); 
     DataTable dt = new DataTable(); 
     DataTable dtClientInfo = new DataTable(); 
     dt = (DataTable)Session["CheckedItems"]; 
     dtClientInfo = (DataTable)Session["ClientInfo"]; 
     for (int i = 0; i <= dt.Rows.Count - 1; i++) 
     { 

      string amountTemplate = "<input type=\"hidden\" name=\"Amount\" value=\"$Amount$\" />\n"; 
      string orderTemplate = "<input type=\"hidden\" name=\"Order_Id\" value=\"$Order_Id$\" />\n"; 

      // BILLING INFO 
      string billingNameTemplate = "<input type=\"hidden\" name=\"billing_cust_name\" value=\"$billing_cust_name$\" />\n"; 
      string billingCustAddressTemplate = "<input type=\"hidden\" name=\"billing_cust_address\" value=\"$billing_cust_address$\" />\n"; 
      string billingCountryTemplate = "<input type=\"hidden\" name=\"billing_cust_country\" value=\"$billing_cust_country$\" />\n"; 
      string billingEmailTemplate = "<input type=\"hidden\" name=\"billing_cust_email\" value=\"$billing_cust_email$\" />\n"; 
      string billingTelTemplate = "<input type=\"hidden\" name=\"billing_cust_tel\" value=\"$billing_cust_tel$\" />\n"; 
      string billingStateTemplate = "<input type=\"hidden\" name=\"billing_cust_state\" value=\"$billing_cust_state$\" />\n"; 
      string billingCityTemplate = "<input type=\"hidden\" name=\"billing_cust_city\" value=\"$billing_cust_city$\" />\n"; 
      string billingZipTemplate = "<input type=\"hidden\" name=\"billing_zip_code\" value=\"$billing_zip_code$\" />\n"; 

      billingCustAddressTemplate = billingCustAddressTemplate.Replace("$billing_cust_address$", dtClientInfo.Rows[0]["Address"].ToString()); 
      billingCountryTemplate = billingCountryTemplate.Replace("$billing_cust_country$", dtClientInfo.Rows[0]["Country"].ToString()); 
      billingEmailTemplate = billingEmailTemplate.Replace("$billing_cust_email$", dtClientInfo.Rows[0]["Email_ID"].ToString()); 
      billingTelTemplate = billingTelTemplate.Replace("$billing_cust_tel$", dtClientInfo.Rows[0]["Phone_no"].ToString()); 
      billingStateTemplate = billingStateTemplate.Replace("$billing_cust_state$", dtClientInfo.Rows[0]["State"].ToString()); 
      billingCityTemplate = billingCityTemplate.Replace("$billing_cust_city$", dtClientInfo.Rows[0]["City"].ToString()); 
      billingZipTemplate = billingZipTemplate.Replace("$billing_zip_code$", dtClientInfo.Rows[0]["ZipCode"].ToString()); 

      strAmount = dt.Rows[i]["INR"].ToString(); 
      amountTemplate = amountTemplate.Replace("$Amount$", dt.Rows[i]["INR"].ToString()); 
      orderTemplate = orderTemplate.Replace("$Order_Id$", dt.Rows[i]["ClientID"].ToString()); 
      billingNameTemplate = billingNameTemplate.Replace("$billing_cust_name$", dtClientInfo.Rows[0]["Name"].ToString()); 

      CCAvenueItems.Append(amountTemplate) 
       .Append(orderTemplate) 
       .Append(billingNameTemplate) 
       .Append(billingCustAddressTemplate) 
       .Append(billingCountryTemplate) 
       .Append(billingEmailTemplate) 
       .Append(billingTelTemplate) 
       .Append(billingStateTemplate) 
       .Append(billingCityTemplate) 
       .Append(billingZipTemplate) 
       .Append(deliveryNameTemplate) 
       .Append(deliveryCustAddressTemplate) 
       .Append(deliveryCountryTemplate) 
      } 
     return CCAvenueItems.ToString(); 
    } 
} 

검사를 반환하는 또 다른 속성은

public string propcheckSum 
{ 
    get { 
     libfuncs objLib = new libfuncs(); 
     string strCheckSum = objLib.getchecksum("YourMerchantID", Session["ClientID"].ToString(), strAmount, "UrReturnUrl", "your working key"); 
     return strCheckSum; 
    } 
} 

되고

<div> 
    <%=CCAvenueItemList%> 
    <input type="hidden" name="Merchant_Id" value="yourmerchantID" /> 
    <input type="hidden" name="Checksum" value="<%=propcheckSum%>" /> 
    <input type="hidden" name="Redirect_Url" value="YourWebsite'sThankyoupage.aspx" /> 
    <input type="submit" value="Submit" runat="server" /> 
</div> 

다음은 상인 ID를 얻고있는 작업 키를 생성 할 수있는 등 디자인 소스보기에서이 속성을 사용 CCAvenue 웹 사이트. 그것은 상인 로그인에 있습니다.

사람이 쉽게 도움이되기를 바랍니다.

관련 문제