@OGKevin @Bastiaan Thanx for both the on-line and off-line support. Googling on specific SDK API keywords got many hits on your names. As I am no experienced programmer and not OO at all, spend however quite some time getting things working, mixing several examples. I now use Bunq to manually create a Payment request (which I mail to myself) and then put this onto the invoice of my customer and in the mail to make the payment barrier as low as possible (and nice to hear the phone beep 15 minutes after I send out an invoice and already the money is in the bank ;-). Also spend always quite some time checking if the links work, double checking the invoice etc, so I would like to automate this now to have a more efficient and accurate invoicing process.
Learned a lot the last couple of days, finding out the the BunqMeTab Class is not what I want because I want to be able to check the status of a payment and with a shared payment request I couldn't get this working (stays pending even after payment has been received). Using the older and more powerfull (but with less examples) RequestInquiry Class I got things working, so I now understand the code to send out a payment request, check the status and when the payment is made end enters my bank account, send out the invoice. This took me quite some hours as I am not an experienced OO programmer and would have saved valuable hours if I had an easy to understand example. I like using functions to hide functional parts of my code and put a lot of comments in my test code so I will remember in a year's time what I did and will integrate the test code this weekend in my website.
Would like to publish this somewhere (code and application screenshots), so somebody else can save some time. What is the most appropriate place to publish this?
Second question I have about the context refresh mechanism. Combined two code examples one using a SQL Lite database where the context got always updated and another using a file to save the context, but don't see the file content changes, maybe because the context is still valid or maybe because I am doing unnecessary things. Can you react on the section below, what it does/should do/does unnecessary?
function context_production() { // Context fetch and update Production from default file bunq.conf
$apiContext = ApiContext::restore(ApiContext::FILENAME_CONFIG_DEFAULT);
$apiContext->ensureSessionActive();
$apiContext->save(ApiContext::FILENAME_CONFIG_DEFAULT);
BunqContext::loadApiContext($apiContext);
return $apiContext;
}