The Save customer function has stopped working on my test sites for both Drupal 6 and 7.

I'm getting the following error message from Tripletex:

Tripletex Error code 591 : method not found (session may have timed out) ()

Comments

stenjo’s picture

Yes, this is a change in the API from Tripletex. Method is now called Company.saveCustomerVendor as opposed to the previous Company.saveCustomer. Please note that it seems the parameter sequence is changed as well. Have implemented this in a new function tripletex_create_update_customer($params) that is calling function tripletex_create_customer($params)
Latest update in 6.x-dev should be OK.
Might consider removing the old function tripletex_save_customer($params, &$session) if we're not using it yet.

reswild’s picture

Thanks. I have copied your new functions to the 7.x branch, and changed the save customer test to use tripletex_create_update_customer instead of tripletex_save_customer.

I can see that we need to put some more work into the update customer function, though. Right now, it only checks for matching names, but this will lead us into trouble if we get two customers with the same name.

I think we need to create our own customer numbers, and check for matching email addresses instead of names. This should work fine as long as we are able to verify the email addresses (either by allowing purchases only for registered users, or by using paypal or similar payment methods that are linked up to peoples email address.)

stenjo’s picture

I think you are entirely right. As far as I know, the API does not allow for searching e-mail - The result does not even return the registered e-mail address when searching for customer. The current functionality returns customer number only when there is a single match. If not everything is left to Tripletex to handle.

stenjo’s picture

Status: Active » Closed (works as designed)