PDA

View Full Version : CreateAccount method of backofficeAPI fails to give proper response message



Dilip
12-01-2015, 10:50 AM
Hello,

while creating account with AccountID that already exist... it gives response as
- VertexFXBOAPI10.CreateAccountResultEnum.Successful AccountResult ( "OK" )

but not expected as
- VertexFXBOAPI10.CreateAccountResultEnum.AccountIDA lreadyExistAccountResult ( "AccountID Already Exist" )



Dilip

Rawan-HS
12-02-2015, 01:25 PM
Dear Dilip


I have tested the Issue in my side and I get the right result, so if you didn't wait the Create Account Result (http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/2112) event you must do it .

Dilip
12-07-2015, 07:32 AM
Hello Rawan-HS,

I really didn't get proper return retult after calling api. what do mean you "so if you didn't wait the Create Account Result (http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/2112) event you must do it" , to use callback api for proper result.....

Rawan-HS
12-07-2015, 09:26 AM
Hi Dilip :)


Let me make it clear to you.


There are two return values when you request anything from the server.
Suppose you call CreateAccount (http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/2082).


1- CreateAccount (http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/2082) returned value of type CreateAccountResultEnum (http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/2150): if this equal SuccessfulAccountResult that means your request has sent to the server and you must wait the server response (it just a local validation)
2- OperationResult : this result came through event that carry the operation result from the server side in our example you must wait Create Account Result (http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/2112)

Check this code :-


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim result As VertexFXBOAPI10.CreateAccountResultEnum
Dim AccID As Integer = "12345678"
result = m_oBOAPI.CreateAccount("dealer", AccID, VertexGeneral10.AccountTypeEnum.DemoAccountType, 10000, True, False, False,"")
If result.ToString =" SuccessfulAccountResult" then
MsgBox("Waithing server response")
Else
MsgBox(result.ToString)
End If

End Sub


Private Sub BOAPI_CreateAccountResult(Result As VertexFXBOAPI.CreateAccountResultEnum, TransTag As String)
'OperationResult
Msgbox((Result.ToString)
' if you are creating an account with already exist accountID it will return AccountIDAlreadyExistAccountResult
End Sub