Re: WorldPay Module for ZenCartv1.3x
Marc,
Sorry to hear of your troubles.
Firstly - doesn't help you right now but a lesson to us all - test everything first on your new server BEFORE moving live sites across. If things don't work as before stay put until all issues are resolved.
Having said that some moves are not planned - your original server may have fried and this was a forced move rather than a planned one.
The short term solution is to switch back to your old server, if this is possible, until you get this issue resolved.
There is a lack of info as to exactly what is happening but I am assuming that everything goes well with WorldPay and the transaction is completed but the callback fails so you have the transaction details in your WorldPay Control Panel but no order in your Zencart. You may also have had notification from WorldPay that the callback failed - in which case what error was reported? The usual one is that there was some kind of re-direct. WorldPay (presumably for security reasons) does not allow the callback to be re-directed.
It has puzzled me for some time now why the WorldPay module works perfectly on most servers but not all. I think I have narrowed the cause down a bit. This could be a sessions issue. You need to ask your host if they maintain sessions - some do not guarantee to do so. If the session is not maintaned by your server throughout the WorldPAy transaction process then when WorldPay initiates the callback Zencart tries to re-create the session by re-directing to the log in page. As soon as WorldPay detects the re-direct the callback fails.
Things to check:
In your configure.php file at line 55 what do you have?
If this:
Code:
define('STORE_SESSIONS', ''); // use 'db' for best support, or '' for file-based storage
then ensure that your session directory, as defined in Admin >> Configuration >> Sessions, is writeable.
Alternatively try changing the above line 55 to:
Code:
define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage
If this doesn't work and your host can't help PM me with your email address and I will contact you directly.
If you find a solution post details back here.
Regards,
Alan
Re: WorldPay Module for ZenCartv1.3x
Thanks for your prompt reply and I will now get on and try your suggestions.
The reason we moved was because FASTHOSTS.co.uk are useless and yesturday had issues and couldn't resolve them - we run a valentines gift site and cannot afford to be down a second right now - so the move was essential.
We have moved to RackSpace - not as cheap as others but boy their support and customer services is amazing and well worth the extra money.
right - enough chat - off to try your suggestions.
Thanks again.
Re: WorldPay Module for ZenCartv1.3x
one of our zen sites was working - and your post directed me to a solution.....
the site that was working has cache set to file.
I set the other sites to file to and ensure the cache dir has the right permissions - now waiting for an order to see whether this worked.
my only problem now is contacting all the customers that ordered since midnight and finding where they want stuff sent - shame there isn't a module that allows me to mark a cart as paid.
Marc
Re: WorldPay Module for ZenCartv1.3x
I believe the reason for this is DNS.
the shopper shops on the site on the new server
goes to world pay and pays ok
the callback from worldpay fails because worldpay dns has not propergated our new IP
so this seems to be a waiting game for me - then orders will go through normally.
I just wish there was a way of getting these orders out of zencart that we know have paid.
Marc
Re: WorldPay Module for ZenCartv1.3x
I wonder if you can help resolve a problem that my client is having. he uses one world pay merchant account for two eccomerce sites. One ppekit runs zencart - the other is custom. He has two (bank)accounts set up within his world pay account - one for each of his sites.
The problem is that the client wishes his ppekit payments to go to a seperate (bank) account he has opened for the purpose, not the default world pay (bank)account.
World pay have asekd if we can pass the accID directly int he world pay module.
He has asked forme to resolve the problem within 7 working days as his bank are putting him underpressure to resolve the issue.
Is this possible? and if so how do you do it.
many thanks
Sarah
Re: WorldPay Module for ZenCartv1.3x
Marc,
Instead of waiting to see if you lose any more orders why not quickly change your WorldPay module to test mode and put an order through yourself to see what happens and then change back to live mode. Or simply put through a low value order using your debit card. If you run the store the card payment will come to you anyway and all it will cost you is the debit card transaction fee - about 50p.
All my Zencart installations are set to store sessions in the database and I have never had a callback problem.
There is no easy solution to retrieving the order information you require. The following may help.
1. In your WorldPay control panel identify the payments you cannot match to orders.
2. Take a note of customer names and order values.
3. In ZenCart Admin >> Customers >> Customers use the search box to find each customer within ZenCart and take a note of their ID.
4. Access your store database using phpMyAdmin
5. Run the following query on your database to identify the current contents of each affected customer's shopping basket
Code:
SELECT cb.customers_id, c.customers_firstname, c.customers_lastname, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, c.customers_email_address, c.customers_telephone, p.products_id, p.products_model, cb.customers_basket_quantity, p.products_price
FROM customers_basket cb, customers c, products p, address_book ab
WHERE cb.customers_id = XXXX
AND c.customers_id = cb.customers_id
AND c.customers_default_address_id = ab.address_book_id
AND p.products_id = SUBSTRING_INDEX(cb.products_id, ':', 1)
6. Run this query for each of your affected customers replacing 'XXXX' with each customer's ID
7. Use the phpMyAdmin print view function to print the results for each customer.
With any luck when you add up the total cost of the items in each basket you should arrive at the total cost of the customer's transaction in WorldPay.
Limitations:
1. Won't be accurate if the customer has revisited the site since placing the 'lost' order and added or deleted items in their cart.
2. Doesn't provide any attribute information for products in the cart so if you have colour, size etc options on any of the products you will need to do a bit more delving within the database.
Once you have done the above you will have enough information to contact each customer by telephone, email or post to confirm their order details, delivery address etc and subsequently fulfil their order.
Every ########-up is an opportunity to sell so you might want to send each customer affected a discount voucher for use with their next order. The chances are they won't have noticed a problem before you contact them. By the time you contact them you have a solution and you only want to double check their order details, and hey they get a discount off their next order for their trouble. If that doesn't impress them - who needs them anyway!
Hope the above helps.
Alan
Re: WorldPay Module for ZenCartv1.3x
Great solution - but i found a slightly better one.......
I have produced a custom statement in worldpay control panel - which lists all authorised amounts and transaction ID's
I then installed master password module.
I then activated pay by cheque.
I then logged in as each customer - placed the order again (which means the order is in zen and customer gets confirmation) and then deleted the cheque module.
not ideal - but as soon as worldpay updates DNS the problem will be solved.
It seems they cache dns data for 24 hours - shame it wasn't 3 hours!
Right - back to manually checking.
THANKS AGAIN FOR YOUR HELP AND ADVICE.
Re: WorldPay Module for ZenCartv1.3x
Marc,
Master Password Module!
Sounds just what I need for something completely different.
Yours seems a much better solution than mine.
Glad you have developed a good recovery strategy.
Hope your DNS problem resolves soon.
Regards,
Alan
Re: WorldPay Module for ZenCartv1.3x
Sarah,
Relatively simple solution - just one line of code.
In includes/modules/payment/worldpay.php at around line 123 find this section of code:
Code:
$process_button_string =
zen_draw_hidden_field('instId', MODULE_PAYMENT_WORLDPAY_ID) .
Add a new line immediately below this as follows:
Code:
zen_draw_hidden_field('accId1', 'x') .
Replace the 'x' with the appropriate account number.
That's it!
I haven't tested this so test it out first yourself before using live. Please report back here whether it works or not.
Regards,
Alan
Re: WorldPay Module for ZenCartv1.3x
Many thanks for that - i'll try it today and let you know how it goes.
Sarah