Automated layaway payments?

I'm looking at what it would take to add automated monthly layaway payments to RMS. So far the only real problem I see is that it's not obvious how to programatically add a recurring CC payment to a layaway transaction. The code i'm trying looks like this:

The goal is full automation -- no user input required. For now, though, the code is riddled with debug MsgBoxes. :)

Public Function Process(ByVal s As Object) As Boolean MsgBox("hi!") s.RecallTransaction(4, 9) Try With s.Transaction MsgBox("recalled transaction; total = " & .Total) With .Tenders.Add(.TenderDefault.Descriptor) MsgBox("made a tender") .AccountNumber = "4111111111111111" .AccountExpiration = "02/06" .AmountIn = 4.5 End With MsgBox("about to post") if (.Post() = 0) Then MsgBox("posted ok") Return True Else MsgBox("Post error") Return False End If End With Catch e As Exception MsgBox(e.Message) Return False End Try End Function

When this code runs,

  • layaway order #9 appears on the screen.
  • With the exception of the error messages, all of the message boxes appear....including the one that says "posted ok".
  • No exceptions get thrown, and no error messages appear.
  • When i click Tender on the POS screen, it asks me to save changes or pickup the layaway (full or partial pickup).
  • When i pick "save changes", the tender screen pops up, and the .50 is there at the bottom of the list. (It's cash, though. Probably due to the default tender type being cash atm.)
  • If i click OK on the Tender screen, the POS says the customer should get .50 back as change. IOW: the payment isn't officially added to the item.

Even if it's not part of the problem, using the default tender seems to me to be asking for trouble. Problem is that that's the only way i've seen to grab a Tender i'm not familiar with yet. :P

So....uhh.... (1) How do i add a layaway payment so that it shows up properly in RMS? (2) How do i get a CC tender descriptor (assuming i need it), instead of changing the default tender type to CC and hoping it never changes again?

/
Reply to
I HATE PDAs
Loading thread data ...

OK, so i figured out how to add the charge and the tender. If anyone cares.... :P

With s.Transaction .setLayawayPaymentCurrent(amt) With .Tenders("2") ' key "2" is credit card .AccountHolder = "Joe Schmoe" .AccountNumber = "4111111111111111" .AccountExpiration = "0206" .AmountIn = amt End With .TendersForceValidation() Process = (.Post() = 0) End With

So now, the payment is added to the layaway. When i click "Tender", the CC line shows $4.50 (which was the value of amt), and the Change line at the bottom has a green $0.00. I click ok from there, and the change/receipt/etc box pops up, change is $0.00, and the order disappears.

Go me.

Now, how do i get that last part to be automatic? There might be a thousand customers with automated charges, and clicking a button or two for each one is going to drive someone batty.

/
Reply to
I HATE PDAs

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.