Closed (works as designed)
Project:
Tripletex
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Apr 2012 at 13:39 UTC
Updated:
29 Apr 2012 at 22:05 UTC
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
Comment #1
stenjo commentedYes, 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 callingfunction 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.Comment #2
reswild commentedThanks. 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.)
Comment #3
stenjo commentedI 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.
Comment #4
stenjo commented