Receiving a Payment via SDK

SOLVED

Does anyone have an example of how to receive a payment via the Sage SDK? It's looking to me like you have to go directly at the tables (which is a HUGE gap in the SDK in my opinion) but that sounds risky. Anyone know how to do this?

  • 0
    The SDK doesn't appear to process receipts for 'pay later' invoices, but there are methods for payment at the time of invoicing.

    To work out which fields to update via a direct database transaction, you could use transaction logging in the MySQL engine.
  • 0
    Hello Mike, did you manage to make it work modifying the mySql database directly? If so, would you mind to share with us how you did it?
  • 0 in reply to RandyW
    Could you tell us more how to enable transaction logging into MySql of Sage50? I am not usre if you are referring to enable the binary log (dev.mysql.com/.../binary-log.html), but I tried enabling it by executing

    SET sql_log_bin=1;

    but this requires the 'SUPER' privilege. The users created by sage50 do not have this privilege. Is there a way to connect to the DB using another user that does have the privileges to make logging happen?

    If this is not what you meant for transaction logging of MySql, can you tell more how to enable it, and where to look to access the log?

    Thanks!
  • 0 in reply to Noesis
    SUGGESTED

    Noesis said:
    I am not usre if you are referring to enable the binary log

    I think that Binary logging is at more of a redo / undo binary data block level as in ib_logfile0 and ib_logfile1. 

    You want SQL Query Logging  http://dev.mysql.com/doc/refman/5.7/en/query-log.html

    Add a line to dbengine.ini:

    general_log = 'ON'

    (probably under C:\Program Files (x86)\winsim\ConnectionManager\MySqlBinary\5.6.10)   (Check the properties of the Connection Manager service for the path)

    There will be a log file created in the 'SAJ' folder with the name of the workstation and a 'LOG' extension.  

    Execute the transaction, copy the log file and paste it somewhere you can work on it.   I found that renaming to .CSV formatted it the best

    On starting Sage 50 there will be a log file created in the 'SAJ' folder with the name of the workstation and a 'LOG' extension.   The file will be deleted when closing the Sage 50 Company File.

    Execute the transaction you want to see, copy the log file and paste it somewhere you can work on it, the transactions are in chronological order.   I found that renaming to .CSV and autofiltering it in Excel worked best. 

    The above information is intended for study and troubleshooting only, the user of it takes all responsibility for not violating the Sage 50 software and SDK End User license agreements.   

  • 0 in reply to RandyW
    Thank you so much for all that very useful information.
  • +1 in reply to Noesis
    verified answer

    I did get this to work but I REALLY don't recommend it. There have been a ton of issues that had to get resolved over the years with account reconciliation and everything. It is an INCREDIBLE gap in their SDK that they do not allow for this and I'm very seriously considering dropping support for this feature in our connector. It just too flaky.

  • 0 in reply to mikejobbox

    Hi Mike, out of a lack of options I have to embark into a similar approach to get all invoices out and post back in payment receipts. Could I ask you to share some of your experiences, pointing at booby traps and the likes?  It could be ... therapeutic? Sweat smile. Thank you kindly for considering it.