AnsweredAssumed Answered

Script Complications With Billing and Card_ID

Question asked by Jason Pelletier on Mar 25, 2014
Latest reply on Apr 24, 2014 by Jason Pelletier

We are running Uniprint 8.3 and have been running Pharos with the same scripts for a few years now (7.2 and up). We're now really starting to want to use Direct Print but in order to do so our Logon ID fields should be our staff and student's AD usernames. That means that we'll need to use the Card_ID field for both logon and billing. We've been able to work around the logon issue since our logon scripts for the PC stations and the Omegas actually have a SQL query in them to look up and authenticate the number passed to them via the card swipe at the release station (although looking towards web release, this too may cause issues in the future if we don't have a way to login using the logon ID, but I digress). The issue we are running in to comes down to the billing script. We are a CSGold shop so have multiple purses and have to check with CSGold to verify the user account and verify funds. We can't seem to get it to work and I imagine its because of what we're doing in the script.


As an example, we use a SQL query to get internal balances:

sSQLQuery =

        "exec pp_user_purse_balances" +

        " @bill_name = '" + PlugIn.BillName +  "'," +

        " @pstation = '" + PlugIn.Client +  "'";


And this will work...until we want to do Direct Print because then we print but the job won't be attributed to me since my account doesn't have my username as the logon ID (meaning if we set the username in Pharos to be our AD username, we can print, it sets it to our username and works but when we swipe and release a job, the username field is blank in the transaction and we don't get debited the correct amount). But the catch is, if I change my Logon ID to be my username, I can login to a station with our new script but can't be billed because the system has no idea who I am.


Its all complicated and confusing. I've attached our MultiPurse With Billing Gateway Script and our newly adjusted logon script just in case someone wants to have a laugh.


Basically what we want is to be able to direct print and account for the printing by username. Swipe and release by the same users at public printers/release stations and in the future do web release, all while having internal and external funds. Oh, and did I mention that all print jobs printed from a color printer must be debited from the billing gateway and not from the internal funds?!


If anyone can help or has some insight, I'd appreciate it.