Link to home
Start Free TrialLog in
Avatar of sitg
sitgFlag for Iceland

asked on

Any one Help me I want to convert vb code to c# code

Public Function GetPGResponse(ByVal pVisaType As String, ByVal pCustID As String, ByVal pCustName As String, ByVal pCustPhone As String, ByVal pCCNO As String, ByVal pCVVNO As String, ByVal pEMail As String, ByVal pCCExpMonth As String, ByVal pCCExpYear As String, ByVal pCSUID As String, ByVal pbtaAdd1 As String, ByVal pbtaAdd2 As String, ByVal pbtaAdd3 As String, ByVal pbtaCity As String, ByVal pbtaState As String, ByVal pbtaZip As String, ByVal pbtaCountry As String, ByVal pstaAdd1 As String, ByVal pstaAdd2 As String, ByVal pstaAdd3 As String, ByVal pstaCity As String, ByVal pstaState As String, ByVal pstaZip As String, ByVal pstaCountry As String, ByRef pMerchant As Merchant) As PGResponse
  ''used public in ICICI_PG_Lib13.dll version 1.3.0
   
    'Main Function meant for using by applications
    Dim sAuthCode As String
    Dim sqltext As String
    Dim sBillAdd As String
   
    'Collect Billing Address from Address Fields
    sBillAdd = pbtaAdd1 & ", " & pbtaAdd2 & ", " & pbtaAdd3 & ", " & pbtaCity & ", " & pbtaState & ", " & pbtaZip & ", " & pbtaCountry
   
    'Initialise Post Class
    Set oPostLib = New PostLib
   
    'Initialise CardInfo Class
    Set oCInfo = New CardInfo
   
    'Initialise MPIData Class
    Set oMPI = New MPIData
    'Initialise Billing Address
    Set oBTA = New BillToAddress
    'Initialise Shipping Address
    Set oSTA = New ShipToAddress
   
    'Initialise Payment Gate Response Object
    Set oPGResp = New PGResponse
   
   
    'Set Billing Address
    oBTA.setAddressDetails pCustID, pCustName, pbtaAdd1, pbtaAdd2, pbtaAdd3, pbtaCity, pbtaState, pbtaZip, pbtaCountry, pEMail
       
    'Set Shipping Address
    oSTA.setAddressDetails pstaAdd1, pstaAdd2, pstaAdd3, pstaCity, pstaState, pstaZip, pstaCountry, pEMail
   
    'Set Card Details
    oCInfo.setCardDetails pVisaType, pCCNO, pCVVNO, pCCExpYear, pCCExpMonth, pCustName, "CREDI"
   
    'Set MPI Response Details
    oMPI.setMPIResponseDetails "05", "NTBlZjRjMThjMjc1NTUxYzk1MTY=", "", "", "", ""
   
    'Post Data through oPostLib.postMOTO function and set oPGResp Object
    Set oPGResp = oPostLib.postMOTO(oCInfo, oMPI, pMerchant, oBTA, oSTA)
   
   
    Set GetPGResponse = oPGResp
   
   
    Exit Function
TrapError:
    Set GetPGResponse = Nothing

End Function
ASKER CERTIFIED SOLUTION
Avatar of digitalZo
digitalZo
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of evilrix
evilrix
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sitg

ASKER

Thanks