rudiemm
2012-02-14 08:38
We've created a web API to access the Ledger.
I've included a sample of the output.
Here is a sample of the query string:
"https://sdg-set.pnpscada.com/getLedger.jsp?LOGIN=xxx&PWD=ppp&Serial=69900432"
The server you'll access could be different for different customers.
You can also get a transaction log by specifying 'startdate' and 'enddate', both of which are in the format 'YYYY-MM-DD HH:MM:SS'
You can also load money by specifying the parameters (if you pay R50 - the R in tpe is for Receipt):
pay=true
amt=50.00
tpe=R
desc=[This is a description: put your own]
That is the essence.
sdg.marinusvz
2013-02-20 07:12
Sorry, here is a sample of the output:
sdg.marinusvz
2013-02-20 07:20
A new parameter has been added, namely RequestID.
This is a field that must be specified by the client software. If not used, the value for each transaction's RequestID would be null.
When paying or charging, if you specify the RequestID, it will be recorded per payment. For instance, if you want to group a number of them together, you can give them the same RequestID, which ties up on your side, for example, you can credit the ledger for the amount that was paid, and then debit it with any payment charges that was incurred, e.g. for EasyPay or the bank, that may charge a commission or deposit charge. In this way, the customer sees all the cash flow movements, and the chances of him being unhappy when he doesn't see the full amount that he payed reflected on his ledger is reduced.
Also, when just requesting to see the ledger movements, instead of specifying an edate and sdate, you may specify a RequestID, and then all transactions with this RequestID will be reported back. This enables the client software to double check whether a transaction has been successfully posted to PNPSCADA, e.g. in the case where connectivity is lost in the middle of a transaction.
sdg.corrie
2014-04-22 09:58
So if I run the following string:
"https://sdg-set.pnpscada.com/getLedger.jsp?LOGIN=user&PWD=pass&Serial=63901154&RequestID=test200&pay=true&amt=50.00&tpe=R&desc=R50_Added_to_the_account"
The reply is as follow:
_______________________________________________________________________________________________________________________
_____________________________________________________________________________________________________
You can clearly see that the
If the transaction is submitted with the same RequestID the Transaction will not load the request.
____________________________________________________________________________________________________________________________
Exception: java.lang.Exception: Duplicate transaction: Dates are not the same. Use dte parameter in format YYYY-MM-DD HH:mm:SS, for test200
_______________________________________________________________________________________________________
By sending the following string you can see when and what was changed with the specific RequestID:
"https://sdg-set.pnpscada.com/getLedger.jsp?LOGIN=user&PWD=pass&Serial=63901154&RequestID=test200"
_________________________________________________________________________________________________________________
__________________________________________________________________________________________
sdg.marinusvz
2014-07-29 10:01
You gave us a link on the wiki (http://wiki.pnpscada.com/content.php?241-PNPSCADA-SDK) which we can use to test our code and pull transaction data from the ledger.
Currently however when sending the request (https://set.pnpscada.com:445/getLedger.jsp?LOGIN=pretest.pretest&PWD=admin&Serial=63901282&sdate=2014-07-25%2000:00:00&edate=2014-07-29%2017:21:20&RequestID=edtest58) with data ranges we don’t seem to get the transactions back as expected. When login into the system and looking at the ledger there’s 114 transactions but none of them are returned by the above API call. We do however get the opening and closing balances but we need the per transaction details as well. I.E in this case for all 114 transactions.
Could you please double check for us if we are using the API calls correctly. Not sure if this is the one we should be using if I look at the example replies in the wiki since that also doesn’t have transaction data unless you create a transaction which we aren’t doing now yet.
Let me know what you think.You gave us a link on the wiki (http://wiki.pnpscada.com/content.php?241-PNPSCADA-SDK) which we can use to test our code and pull transaction data from the ledger.
Currently however when sending the request (https://set.pnpscada.com:445/getLedger.jsp?LOGIN=pretest.pretest&PWD=admin&Serial=63901282&sdate=2014-07-25%2000:00:00&edate=2014-07-29%2017:21:20&RequestID=edtest58) with data ranges we don’t seem to get the transactions back as expected. When login into the system and looking at the ledger there’s 114 transactions but none of them are returned by the above API call. We do however get the opening and closing balances but we need the per transaction details as well. I.E in this case for all 114 transactions.
Could you please double check for us if we are using the API calls correctly. Not sure if this is the one we should be using if I look at the example replies in the wiki since that also doesn’t have transaction data unless you create a transaction which we aren’t doing now yet.
Let me know what you think.
sdg.marinusvz
2014-08-06 13:25
Due to popular demand, we've now added ANUMBER as a means for specifying the Ledger, instead of Serial.
To recap, there are 3 ways you can specify the Prepaid Account you want to manipulate/view:
You can either
(1) specify the Ledger entity via the normal method, as detailed in webservices.jsp, or you can
(2) specify the smart prepaid meter serial number via the Serial parameter, or you can
(3) specify the Account Number field of the Meter Account of the Prepaid Facility, by specifying the ANUMBER parameter.