I am playing around with transaction services trying to post a transaction from visual studio.
I have been able to Successfully use the getopenchecks soap call.
Here is the code I am using to attempt PostTransaction:
(this code is really rough and messy)
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
'************************** Post transaction test
Dim pGuestCheck As New MicrosAPI.ResPosAPI_GuestCheck
Dim ppMenuItemsTest(1) As MicrosAPI.ResPosAPI_MenuItem
Dim CondimentsField(1) As MicrosAPI.ResPosAPI_MenuItemDefinition
Dim TestComboField(1) As MicrosAPI.ResPosAPI_MenuItemDefinition
Dim ppComboMeals(1) As MicrosAPI.ResPosAPI_ComboMeal
Dim pServiceChg As New MicrosAPI.ResPosAPI_SvcCharge
Dim pSubTotalDiscount As New MicrosAPI.ResPosAPI_Discount
Dim pTmedDetail As New MicrosAPI.ResPosAPI_TmedDetailItem
Dim pTotalsResponse As New MicrosAPI.ResPosAPI_TotalsResponse
Dim TestMenuItem As New MicrosAPI.ResPosAPI_MenuItemDefinition
'ppMenuItems(0) = New MicrosAPI.ResPosAPI_MenuItem
Dim testcond As New MicrosAPI.ResPosAPI_MenuItemDefinition
Dim testcombo As New MicrosAPI.ResPosAPI_ComboMeal
'ppComboMeals(0) = testcombo
testcond.ItemDiscount = New MicrosAPI.ResPosAPI_Discount
CondimentsField(0) = testcond
TestMenuItem.MiObjectNum = 102077
TestMenuItem.MiMenuLevel = 1
pGuestCheck.CheckRevenueCenterObjectNum = 1
pGuestCheck.CheckEmployeeObjectNum = 888
TestMenuItem.ItemDiscount = New MicrosAPI.ResPosAPI_Discount
ppMenuItemsTest(0) = New MicrosAPI.ResPosAPI_MenuItem
ppMenuItemsTest(0).MenuItem = TestMenuItem
ppMenuItemsTest(0).Condiments = CondimentsField
pTmedDetail.TmedCreditCard = New MicrosAPI.ResPosAPI_CreditCard
Dim ClassInst As New MicrosAPI.ResPosApiWebServiceSoapClient
ClassInst.PostTransaction(pGuestCheck, ppMenuItemsTest, ppComboMeals, pServiceChg, pSubTotalDiscount, pTmedDetail, pTotalsResponse)
End Sub
I am getting an error:
An unhandled exception of type 'System.ServiceModel.FaultException' occurred in mscorlib.dll
Additional information: System.Web.Services.Protocols.SoapException: [-956234774] Invalid database object detected.
Don't really have much experience at all with transaction services.
the menu item is valid as well as employee and Revenue center.
I am only trying to post a single menu item in this test with no condiments.
the example call below works fine for getopenchecks, so I assume I have the licensing correct.
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
'************************** Post open checks test
Dim employeeObjectNum As Int32 = 0
Dim ppCheckSummaryArray() As MicrosAPI.ResPosAPI_CheckSummary
Dim ClassInst As New MicrosAPI.ResPosApiWebServiceSoapClient
ClassInst.GetOpenChecks(employeeObjectNum, ppCheckSummaryArray)
Any help would be greatly appreciated.
Thanks in advance.
I have been able to Successfully use the getopenchecks soap call.
Here is the code I am using to attempt PostTransaction:
(this code is really rough and messy)
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
'************************** Post transaction test
Dim pGuestCheck As New MicrosAPI.ResPosAPI_GuestCheck
Dim ppMenuItemsTest(1) As MicrosAPI.ResPosAPI_MenuItem
Dim CondimentsField(1) As MicrosAPI.ResPosAPI_MenuItemDefinition
Dim TestComboField(1) As MicrosAPI.ResPosAPI_MenuItemDefinition
Dim ppComboMeals(1) As MicrosAPI.ResPosAPI_ComboMeal
Dim pServiceChg As New MicrosAPI.ResPosAPI_SvcCharge
Dim pSubTotalDiscount As New MicrosAPI.ResPosAPI_Discount
Dim pTmedDetail As New MicrosAPI.ResPosAPI_TmedDetailItem
Dim pTotalsResponse As New MicrosAPI.ResPosAPI_TotalsResponse
Dim TestMenuItem As New MicrosAPI.ResPosAPI_MenuItemDefinition
'ppMenuItems(0) = New MicrosAPI.ResPosAPI_MenuItem
Dim testcond As New MicrosAPI.ResPosAPI_MenuItemDefinition
Dim testcombo As New MicrosAPI.ResPosAPI_ComboMeal
'ppComboMeals(0) = testcombo
testcond.ItemDiscount = New MicrosAPI.ResPosAPI_Discount
CondimentsField(0) = testcond
TestMenuItem.MiObjectNum = 102077
TestMenuItem.MiMenuLevel = 1
pGuestCheck.CheckRevenueCenterObjectNum = 1
pGuestCheck.CheckEmployeeObjectNum = 888
TestMenuItem.ItemDiscount = New MicrosAPI.ResPosAPI_Discount
ppMenuItemsTest(0) = New MicrosAPI.ResPosAPI_MenuItem
ppMenuItemsTest(0).MenuItem = TestMenuItem
ppMenuItemsTest(0).Condiments = CondimentsField
pTmedDetail.TmedCreditCard = New MicrosAPI.ResPosAPI_CreditCard
Dim ClassInst As New MicrosAPI.ResPosApiWebServiceSoapClient
ClassInst.PostTransaction(pGuestCheck, ppMenuItemsTest, ppComboMeals, pServiceChg, pSubTotalDiscount, pTmedDetail, pTotalsResponse)
End Sub
I am getting an error:
An unhandled exception of type 'System.ServiceModel.FaultException' occurred in mscorlib.dll
Additional information: System.Web.Services.Protocols.SoapException: [-956234774] Invalid database object detected.
Don't really have much experience at all with transaction services.
the menu item is valid as well as employee and Revenue center.
I am only trying to post a single menu item in this test with no condiments.
the example call below works fine for getopenchecks, so I assume I have the licensing correct.
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
'************************** Post open checks test
Dim employeeObjectNum As Int32 = 0
Dim ppCheckSummaryArray() As MicrosAPI.ResPosAPI_CheckSummary
Dim ClassInst As New MicrosAPI.ResPosApiWebServiceSoapClient
ClassInst.GetOpenChecks(employeeObjectNum, ppCheckSummaryArray)
Any help would be greatly appreciated.
Thanks in advance.