Just clarify, did you add something to one of the defines like PAYMENT_METHOD_DETAIL or something, to put the image in ?
Printable View
Just clarify, did you add something to one of the defines like PAYMENT_METHOD_DETAIL or something, to put the image in ?
That would help huh LOL
I added the code into includes/languages/english/modules/payment/worldpay.php
PHP Code:
define('MODULE_PAYMENT_WORLDPAY_TEXT_TITLE', '<img src="https://select.worldpay.com/jsp/shopper/pictures/poweredByWorldPay.gif" alt="WorldPay" /><br /> Credit Card via WorldPay');
I am buggered if I can find a cunning way of doing it, but the simple way if for you to edit
/email/email_template_wp_callback.html
there's all kinds of variables in there so after each one put (a) (b) (c) do a test order, look at the email to work out which variable was affected and then replace it. so if it is $PAYMENT_METHOD_DETAIL being replaced by your constant MODULE_PAYMENT_WORLDPAY_TEXT_TITLE then you just remove $PAYMENT_METHOD...
The automatic emailing sytem in includes/classes/orders.php which would involve a lot of editing of code, when the easy way is just to replace the section in the email template with whatever you want.
Philip.
I'm trying to understand that, but I'm a bit lost even contemplating it LOL
The code in includes/modules/payment/worldpay.php that calls the define MODULE_PAYMENT_WORLDPAY_TEXT_TITLE is this section here on Line 54:
I was wondering if I can add in an extra constant I create in the language file for the image, say MODULE_PAYMENT_WORLDPAY_IMG for example somewhere before MODULE_PAYMENT_WORLDPAY_TEXT_TITLE in that code? Is that possible?Code:$this->title = (IS_ADMIN_FLAG === true) ? MODULE_PAYMENT_WORLDPAY_TEXT_ADMIN_DESCRIPTION.' v'.$this->moduleVersion .( (MODULE_PAYMENT_WORLDPAY_TEST_MODE != 0) ? ' <b style="color:red">(Test Mode activated)</b>' : '') : MODULE_PAYMENT_WORLDPAY_TEXT_TITLE;
$this->enabled = ((MODULE_PAYMENT_WORLDPAY_STATUS == 'True') ? true : false);
As you can see I am very very new to php and not overly sure what I am doing most of the time LOL
Ok you are not bad in that you hae the right constant and location but you don't get the big picture. An entirely diffferent part of zencart after an order is successfully makred as paid, starts working on the tables, it pulls the constant through from the worldpay module and embeds it in the "order", in a single static row in a table that is saved for all time (that's hwo it's supposed to work). Now when it does this, it happens to pull the email template, does a quick search and replace and sends out the html, from the same information.
So if you created a new constant then you would have two options, either a) start playing with the module to get it to send out the new constant only after the order was successful, or b) start playing with the core of zencart and telling it to ignore what it normally does and change the constant in the email.
The third way is what I suggested, edit the template for the emails that goes out. The template is a basic seearch & replace with information from the core of zencart, so you can write "I'm a blue monkey" in there and it will go out just as you wrote it. Things in Capitals with a $ in in front of them get replaced by zencart so you need to locate the $VARIABLE that shows your image, and just put "Paid by Worldpay" in it's place, so just mark up each section of the email template with letters or numbers so that when you put a test order through, you can work out which bit to change. I'd do this but I don't have a worldpay account (yes I know that I run the module and it's just weird, but it's also true) and I haven't got a spare demo site set up (which takes a couple of hours) when it's faster that you send yourself an email.
It's a worldpay only template so won't affect any other users or processes, so you find the file,
/email/email_template_wp_callback.html
mark it up with numbers so that you can locate which variable to replace, and remove the sentence "I'm a blue monkey" before going "live".
Philip.
Ok, I think I am getting closer to understanding this LOL and I believe the variable that needs changing is $PAYMENT_METHOD_DETAIL, what I don't know...or understand...is where this variable is 'defined' or written to change it, I tried looking it up in the developer's toolkit and it can't find it lol, so I think I am not understanding how or where to change that variable.
**edited in to add that I can find the variable without the $ in includes/classes/orders.php:
but I really don't wanna screw up the file by mucking around with what I don't know LOLCode:$html_msg['PAYMENT_METHOD_DETAIL'] = (is_object($GLOBALS[$_SESSION['payment']]) ? $GLOBALS[$payment_class]->title : PAYMENT_METHOD_GV );
BTW I read earlier in the thread how you'd applied for a test account with WP and I think they really should give you one considering how much work you've put into enabling their customers to increase their money for them lol
Mulling over this....lol
Would the correct way to change this be to in includes/classes/orders.php add the following in red below:
Then in includes/languages/english/wp_callback.php add the follwing define:Code:$html_msg['PAYMENT_METHOD_DETAIL'] = (is_object($GLOBALS[$_SESSION['payment']]) ? $GLOBALS[$payment_class]->title : PAYMENT_METHOD_GV );
$html_msg['PAYMENT_METHOD_DETAIL_WP'] = EMAIL_TEXT_PAYMENT_METHOD_DETAIL_WP;
And then finally in email/email_template_wp_callback.html replaceCode:define('EMAIL_TEXT_PAYMENT_METHOD_DETAIL_WP', 'Credit Card Via Worldpay');
withCode:$PAYMENT_METHOD_DETAIL
Am I on the right track? Or way out of my league? LOLCode:$PAYMENT_METHOD_DETAIL_WP
Oo I am making this harder on myself than it has to be aren't I? I have read and re-read your reply and you literally mean to replace $PAYMENT_METHOD_DETAIL in the email template with Credit Card Via Worldpay ? :blush: :oops:
Spot on, just rip the variable out of the template and plonk in whatever you want. Keep it Simple not so stupid, as you've done very very well in searching around in the bowels of zen cart, It's probably and anglo-australian misunderstanding. Find the template, test it for the place you want your new thing and then replace the variable in the file, not elsewhere.
As for worldpay, who really knows and understands their logic, they have a clearly published set of developer guidelines, but no testing mechanism unless you pay for a merchant account, and I only inherited this module when I broke it. There's supposed to be an affiliate reommend system too, and I haven't got that either, the only reason I know is that every so often somone comes along here and spams the forum. I rely on people trusting me enough to give me access to their merchant accounts just to run this and with ZC 2.0 around the corner, everything will stop working.
Well, you know we are an upside down backward lot down here LOL add in blonde DNA to the mix and there's bound to be trouble :P
You ever need to test with a merchant account gimme a holler, I really don't make enough worth stealing at the moment ROFLMAO and I would trust you anyways ;)
hey all,
I'm having the worst time trying to get this module to work with my store. like the person on page 10, i have just been approved by worldpay and have a brand new account. i've followed all of the instructions on here and triple-checked everything but what am i missing!?
I cannot get the orders to go through. After entering the CC details in my checkout i am directed to the ugly Worldpay success page saying my payment has been submitted. It doesn't redirect back to my store, and the orders from my store don't get emailed to me. The only emails I receive are the default success ones from Worldpay. I have debugging on and get those emails, but I cannot find any errors in them!!!!
I noticed in the tutorial it said to put the callback url in the "callback url" box.. but there isnt one in worldpay, theres the Payment Response URL which I assume is the same thing... ? I have this in that box:
http://<wpdisplay item="MC_callback"> (no S since my site isnt SSL).
What could be wrong with this darn thing?!
Have you entered all the necessary details in BOTH the test environment and the production environment? Cos that is what my mistake was, I hadn't put all the same details into the test environment settings lol
Yes I have. I just noticed that in my zen admin, under the worldpay module it says
Warning: Session encryption is enabled in store.
Additional: session encryption is enabled in admin area
what does that mean!?!
Also just noticed my settings aren't saving in Worldpay's admin!! Enable the Shopper Response keeps unchecking itself. also, every time I copy to Production and save then go back to check the settings they're all defaulted again!
It means you have to disable suhosin by following the instructions, which are here:
http://www.zen-cart.com/forum/showthread.php?t=110204
where you either add a line to php.ini or to .htaccess depending on your server's set up.
Thank you I got that warning to go away by doing what you suggested. I am still having problems with the other stuff though.
Well I got it to work! I cleared the contents of the test and production installations in worldpay and re-entered them and voila!
I've mentioned it before,WorldPay does appear to have a caching mechanism so sometimes thing do not change immediately, I always suggest a cup of tea.
We have a client complaining that Google Analytics is ignoring sales via Worldpay, but tracking those via Paypal IPN. Has anyone else had this problem - and if so, is there a solution?
Both the modules have been installed correctly (or so we believe!)
Clients huh ? There is no interface at all for google analytics and worldpay, and the paypal IPN is not really "tracking sales". The only way that analytics could track sales would be by setting a cookie on the checkout process/ checkout success sales pages unless paypal allowed an analytics box inside it's secure payment area. There is no reason why analytics would not work with the worldpay module, the analytics module may provide differing checkout pages, and these could be modified and copied to the worldpay templates.
Brief explanation into the technical bits
Worldpay has a different checkout success page to the rest of zen-cart because it receives a password from worldpay and is then pulled into the worldpay website where worldpay then re-writes the page and puts the transaction number and success or fail. The page pulled in, is just the same as zen-cart's normal templates but has one tag inserted so that worldpay can put it's markup in. To get the analytics module to work would require adding the code to the pulled through page, BUT this would rely on worldpay allowing analytics to set cookies or have unique identifiers, might work, might not, have to suck it and see. Not complex at all to do, but a successful worldpay transaction has a zencart shop page displayed at a worldpay url and it's not a redirect.
Thanks for that Philip - much appreciated
Rick
Hi Everyone,
I am new to Zencart and enjoy the colloborative sharing that goes into this product.
In that spirit, I have created a slight modification to Philips great addon to allow the user to pick a credit card type before sending the order to Worldpay (See attached screenshot).
As you all know, the more screens the user has to enter information, the less likely he/she is to buy so this at least eliminates one screen (assuming you only want to accept payment in one currency)
There are only two files to change:
1. \includes\templates\YOUR TEMPLATE\templates\tpl_checkout_payment_default.php
2. \includes\modules\payment\worldpay.php
File#1
LOOK for the first line in the snippet below then add everything after <!-- BOF Draw CC dropdown box -->
NOTE: This assumes that Worldpay is the FIRST payment module in your sort order. If not then change the value of $i (see comments)
File#2PHP Code:
<label for="pmt-<?php echo $selection[$i]['id']; ?>" class="radioButtonLabel"><?php echo $selection[$i]['module']; ?></label>
<!-- BOF Draw CC dropdown box -->
<?php
//This assumes that the Worldpay is your FIRST in your sort order in the ADMIN > Payment > Modules
//If not then change the value of $i to match where in the order you want it
if ($i==0)
{
//Create the array of credit cards as per Worldpay documentation
$cc1[] = array('id' => 'VISA', 'text' => 'Visa');
$cc1[] = array('id' => 'MSCD', 'text' => 'MasterCard');
echo zen_draw_pull_down_menu("paymentType", $cc1,'','','');
}
?>
<!-- EOF Draw CC dropdown box -->
There are two spots you need to add code.
1. LOOK for the first line of code then add the code following it:
2. In the variable $process_button_string add this line. I put it after this:PHP Code:
$OrderAmt = number_format($order->info['total'] * $currencies->get_value($currency), $currencies->get_decimal_places($currency), '.', '') ;
//**************************************
// Credit card Drop down
//**************************************
//Get the CC type
$CCpaymentType = $_POST["paymentType"];
//**************************************
And that's basically it. You can add more cards by adding it to the array.PHP Code:
zen_draw_hidden_field('currency', $currency) .
//**************************************
// Credit card Drop down
//**************************************
zen_draw_hidden_field('paymentType', $CCpaymentType) .
Now please bear in mind I am new to Zencart and relatively new to PHP, but I do have 25+ years in coding so I am not completely green but it doesnt mean I couldnt have overlooked something. So go easy on me. But so far it appears to work as planned.
Hopefully Philip will include this in his new version. His work has saved me a lot of time, so thanks Philip!
There is a "small problem" not all merchant are authorised to take all credit or debit cards, e.g. USA people don't do maestro I believe, not what could be a better way is to incorporate the above code but to make it so that the shop owner selects which card types they do accept from a list in the admin sections by ticking the boxes. I can't find the paymentType parameter in the worldpay documentation either. Here:
http://www.worldpay.com/support/kb/m...rhtml5902.html
although it is documented here
http://www.worldpay.com/support/kb/m...custa9102.html
so good spotting, that also then gives me an entire list of possible options and it does mention that which I wrote above:
Note that you may need to modify this HTML fragment, so that it displays only the payment methods that our Payment Service can accept for your installation.
so integrating your code with an admin selectable list would work and I'll schedule it in for the next release.
Philip.
Yes, I agree that putting it the admin would probably be best. I was looking for someone quick and easy, so hence adding it to the payment template.
As a Canadian, we too cannot take a lot of those cards which is why I wanted to limit it to Visa and Mastercard. As you stated, you can add whatever card you like as per the Worldpay documentation.
Since I have your ear, do you have any idea why I would get a "This page contains both secure and nonsecure items" when my callback page is called?
Since I am not using SSL (yet), I put the url in Worldpay as http://<wpdisplay item="MC_callback"> as per the install text.
I did notice the resultant url is:
https://select-test.worldpay.com/wcc/card?xxxxx
Is there something I am missing in the config?
Thanks,
Khalil
Nothing missing in the config, the error is browser generated because your images or style sheets that are linked into the secure "worldpay page" URI are not coming from an SSL server so IE flags it up because the main paige URL is SSL.
I'll incorperate those mods as they do seem like a good idea, I'm a fan of speeding up the shopping process and was asked recently if there was a way of doing a shop where the user would not be requried to create an account. The answer to that question is "no" at the moment because of the way worldpay tries to re-establish a session to mark the item as paid, in theory a temporary "guest" cart could be created then when the user fills in the details at worldpay, the information sent back could be joined to the "guest" cart and then create a new user, then an order, but it's a lot of work as worldpay does need a different templating system to that which ZC already uses.
Philip.
Hi - I've fallen at the first post when trying to install the WorldPay module in Admin. When I click to Install I get the following error message:
1364 Field 'configuration_title' doesn't have a default value
in:
[REPLACE INTO configuration (configuration_key, configuration_value, configuration_group_id, date_added) VALUES ('MODULE_PAYMENT_WORLDPAY_VERSION', '2.04', '6', now())]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
Any help appreciated
PS I also noticed that the payment module name (in Payment Modules in Admin) says it's version 2.04 even though I downloaded v2.05. Is this relevant/does it matter?
Thanks!
Hmm now that's interesting you appear to have a very strict version of mysql. in your admin section go onto tools > install SQL patches and enter
ALTER TABLE configuration MODIFY COLUMN configuration_title text DEFAULT NULL;
in the Enter the query
to be executed: box, and that should sort that out, BUT it's not a worldpay problem per se that's a problem with your setup and zen cart in general and I'm rather surprised that things haven't fallen to pieces in other places.
And yes, I know about the 2.04 problem, it's been fixed for 2.06 which comes out this week.
Oh and you may also have to enter
delete from configuration where configuration_key like 'MODULE_PAYMENT_WORLDPAY%';
into that SQL box to clear all the worldpay values out, sine it may have half installed.
Philip - thanks for your lightning quick response.
Have done as you said (had to do it for some other fields as well) and all is well now. THANK YOU :)
Erm, unless you knew what column types that were set in the original table creation, you probably shouldn't have modified any columns as they could have been varchar, float or int. If you need to please PM me to confirm the column types of the values you have changed.
Philip.
New version 2.06 has been released details below. Please read the section http://YOUR_SERVER/docs/worldpay/ very carefully after installation.
New Function, possible bug fixes
5th March 2009
Bug fix, on heavily overloaded servers the variable credit_covers appears to be being set, this then allows the buyer to go through to worldpay but the when they return it has removed their shopping cart as if they had a gift voucher or special discount. This "bug" has been fixed although it is why it happens (and it is a zen-cart thing outside of the worldpay module) is outstanding
Forum user Khalil suggested some code and an idea to select the credit/ debit cards before going to worldpay, so skipping one of those ugly screens, it was a very good one and has been incorporated although in a slightly different format. Khalil's idea was to modify the templates to put in a select box. The "select box" option still exists and looks neater, but the user would only know what credit cards were accepted if he/she clicked the box. An additional Radio Button layout has been added so that the user can clearly see the accepted cards (which means Khalil's idea was even better as showing the correct accepted ards on the confirmation screen saves the user going to worldpay and finding his/ her card isn't accepted). Also the templates do not have to modified to use now use this options, it is select in admin, as are the cards that are accepted, so there is no editing of PHP pages required.
If you have applied Khalil's modification to the checkout template, you will have to remove it
The file has been submitted to Zen cart but you can get the same copy from
http://########################.co.uk/WorldPay_ZC1.3.x_v2.06.zip
until Zencart put it up on their downloads page.
Hi,
As i'm sure you're aware, Worldpay are changing at the end of this month. I think the extent of the changes for most users will be the worldpay url needs to be changed. Do you know anything about this?
Thanks
Yes several people have mentioned it and forwarded the notification. I assume as worldpay is owned by RBS that is now majority owned by our government, they are pooling their resources in an efficiency drive. The memo looks to me like they are either going to
change the domain name where the info is sent (bad idea, this forum will be filled with 100's of people),
but more likely
change from where the computer posts a successful transaction.
I am guessing that some shops limit the posting of data to ip range (it is possible) but we don't so that won't affect us.
What will affect is that with version 2.0 of ZC on the horizon, the whole module will have to be re-programmed.
Chink chink anyone (that's the sound of me rattling a bucket for donations).
Philip.
Hi,
I have WorldPay 2.06 installed and am trying out some test transactions before I go live. I've just carried out a test transaction and whilst the payment seems to have gone through OK (have checked via WorldPay admin screens) I wasn't redirected back to my site at the end of the transaction and I don't have anything showing up on the Payment response page.
I'm sure I'm doing something really dumb but not sure what.
Thank you.
Have you turned on the debug emails ?
The queickest way to test a return is to go through and not pay but hit "cancel" and that should return you, then you don't have to go through the bother of actually paying.
Common reasons for not being redirected back include not hanve clicked the save settings at the bottom of the WorldPay screen when setting up your account. Not having transferred the details from the test account to your live world pay account (this does happen sometimes), not having set a payment repsonse password or having got it wrong. Sometimes worldpay can take ten minutes to update it's passwords it sends out, as there appears to be some sort of caching going on at their end.
Philip.
Thanks Philip - yes it was indeed a password problem. For some reason WorldPay admin was not saving my payment response password (database error message appeared, then WorldPay test server went down completely into maintenance mode). Anyhow, everything seems to be up and running now on the WorldPay side, I successfully saved a password and WorldPay is successfully redirecting to my site! Hurray.
Many thanks.
Hi
Have WorldPay 2.06 installed and am having a problem with the redirect to my site. Have read every post in this thread and know I must be missing something simple.
Initially I had a password problem but that seems to have gone as now I'm only getting Transaction Status Success debug emails from my own server. The WorldPay Callback Failure Alerts are always NOT OK, recevied HTTP status: 302.
Any ideas?
That sounds interesting, that's a redirect that has appeared further down the chain than the password check. Since you get the success email then a) worldpay is talking to the server, b) the password is correct.
So have you checked if you have suhosin installed on the server (in admin > modules > payment > worldpay) it should tell you.
What happens if you put something in your cart, do all the select shipping things and then cancel in worldpay before you "pay" do you get back to the site with a cancellation message or are you re-directed to a login screen to re-establish the session. The most likely cause for a 302 is that your site has not re-established the session when worldpay sent through the details. "OR" and I have seen this once before, sometimes the website doesn't store the payment method in the session and it re-establishes the sessions then goes, oops not payment method and throws worldpay back to a login screen. As yet the cause of this one is unknown, the site it was seen on was a very busy one, so if suhosin is not causing the problems then I'd like to see the site (PM) me, to try and get to the bottom of it.
Philip.
The above problem was solved earlier on today, it was not a worldpay bug, it was a session configuration idosyncracy.
For wordpay to work sessions should be configured in admin (admin > configuration > sessions) as follows
because worldpay tries to re-establish the session to mark up the orders as paid. Worldpay doesn't use cookies, it is connecting through a differeing SSL connection, it connects a a browser that identifies itself as a java object and from a different ip address to the user's shopping cart, so any one of these items set to true will cause a session to collapse and although worldpay will take the money, the order will remain marked up as unpaid.Code:Force Cookie Use False
Check SSL Session ID False
Check User Agent False
Check IP Address False
Attached is an image showing the correct configuration.
Philip.
zencart 1.3.8
worldpay payment module 2.0.4
simple seo url
The worldpay installation test area does not hold most of the details I give it. The following do record:
description
customer description
store builder used / other
enable recurring payment response
enable shopper response
payment response failure email address
payment response password
md5 secret for transactions
since the test page does not record the payment response url I am not getting beyond the authorised payment / thanks page on worldpay. no errors are recorded, but worldpay is not recording the test transactions either.
I spoke to technical support at worldpay and was told that the test area setup isn't supposed to record the payment response url etc as once the ability to process a payment is complete, the response can be checked using a minimal live payment in the production area... This seems like a crazy situation to me if it is correct. Can anyone else confirm/deny it's accuracy?
Transactions record in the worldpay test area, but I can't test the full work flow. I am stumped and don't want to have to change store item prices, shipping costs etc in order to do cheap live tests...
Any help gratefully received!
Jim :lamo:
Okay I'm a little confused. Have you got worldpay on your ZC shop with the debug emails turned on (do not post them to the list).
With regards to the "payment response url" this is sent from your shop to worldpay so isn't stored on their site, so Worldpay can then redirect back to wherever you want since different shops have different pages or you may want to run multiple shops off your worldpay account so you'd send worldpay a different return page each time.
After turning on debug emails, The first test you do is put ZC into worldpay test mode and then start paying and then click cancel in worldpay, if theis doesn't return you to the store, you have a problem in ZC.
There is no need to change your shop to run in test mode. Turn on the debug emails, NEVER post one to the forum, and if you aren't getting debug emails than 99% of the time you have something set up wrong in worldpay. When you've been through the instructions and saved everything on worldpay and then if you are still not getting debug emails then email me so that I can have a look from the outside.
Hi Philip, thanks for replying. I am afraid I am still a bit lost and confused by some things. If you could set me straight on those I would be very grateful. If answers to these queries don't solve my problem I will gratefully email you.
I have 'enable debugging' set to true in the admin/modules/payment/worldpay area and a valid email address in the 'debugging list' field there too. I receive no debugging emails.
I understand what you are saying about the payment response url, and yet the field exists in the worldpay setup screen in test and production areas (between store builder and payment response enabled). I made an assumption based on your installation text where it says:
---------------------------------------------
2. In the WorldPay Control Panel screen click 'Configuration Options' for the installation i.d. Enter the Callback URL exactly as follows (including case):
https://<wpdisplay item="MC_callback">
--------------------------------------------
I thought that meant put that code into payment response url field in worldpay as there is no field named callback that I can see (and it makes sense to call the response url a callback url because of the handshaking role it provides). As that instruction directly preceeds setting the payment response checkbox amongst others that still seems likely. If this is not used but sent each time by the cart, I don't get what this bit is for?
Cancelling a payment in progress does not return me to the store, it just shows a 'cancelled' message on worldpays pages.
Do you mean there is no need to set the worldpay module to run in test mode? Worldpay suggest I will just get error codes if I don't so I assume you mean there is no need to set up the test area on worldpay?
Okay let's start with the basics.
Worldpay needs to be able to talk to your web server, so if the site is not on the internet or password protected then nothing is going to work and you wouldn't receive any debugging emails.
The payment response url should be set to https://<wpdisplay item="MC_callback"> or http://<wpdisplay item="MC_callback"> and that is correct MC_callback is actually generated by your website to tell worldpay where to go and is sent through with the "how much to pay" information, so you can use multiple shops with the same merchant account as each shop would send a different code through (that worldpay then changes to the correct thing, you physically do not set MC_callback).
If cancelling a payment does not send you back then something is wrong with the way worldpay is talking to the webserver, most probably that the server is not online without a password. Until you can cancel and get back to your website there is no point in doing anything else other than fixing that first bit.
Worldpay has a test account and a live account. You should be entering your details into worldpay's test account, and the zencart admin should be set to test mode so that zencart is sending the things to the test account.
checklist:
a) your server should be online with no password protection
b) your server should be set to test mode
c) you should have entered all the details into worldpay's text account.
d) cancelling in worldpay should get you back to your website
e) debugging on zen cart should send you emails.
If cancelling doesn't get you back, you would never receive a debug email if you put a payment through.
Philip.
Many thanks for your clarification Philip. I understand now the distinction you were drawing between entering the response variable rather than a constant. That was what was throwing me before. I believe based on your evidence (and further discussion with worldpay) that the problem is simply that their test area is not allowing me to set it up properly (as it keeps throwing a database error at me when I enter the response url) and that the customer services advisor was totally incorrect about the lack of need to fully set up the test area.
I forgot to say in my original request, thanks a million for providing this module and for your open and generous support / updating of it. I'm sure you hear it a lot, but it can't hurt to say it again!
Jim
Sometimes their test area seems to disappear, also there does appear to be some form of caching or distribution problem that means that when updated it sometimes takes up to ten minutes for the information to filter through, so you can be testing/ beating your head against a wall, and it suddenly starts working.
When you get their side of things set up, and if things don't go smoothly feel free to PM me, if it's a consistent bug I always post a follow up to the forum for the serach engines anyway.
Philip.
Hi
I'm using the latest version of zen cart, with this modue installed.
Am in test mode at the moment.
I seem have a random drop down on select payment page with just via and mastercard on. If I have 'display accepted cards' as false, they are there, if it is set any of the other two options, they are still there in a separate drop down, if I try and choose maestro, for example, from the other drop down, when i go though to worlpay it is set up to accept visa, as the 'random' drop down has visa selected.
Why is the drop down, I don't understand!? can i hide it, lose it?
thanks
Matt
1) I will need to see it
2) I need to know which browser
3) I need to see the admin side of things
4) I need to know which cards your worldpay set up accepts
5) does it work with the list.
6) did you do khalil's modifications to the web page and then install world pay on top ? as the latest version negates the need for any scripting by the individual.
Hi
I just took out the code below from tpl_checkout_payment_default.php. It seems to be ok now, drop down has gone. Do you thik this code adjustment will be ok for the long term?
Code:<?php
//This assumes that the Worldpay is your FIRST in your sort order in the ADMIN > Payment > Modules
//If not then change the value of $i to match where in the order you want it
if ($i==0)
{
//Create the array of credit cards as per Worldpay documentation
$cc1[] = array('id' => 'VISA', 'text' => 'Visa');
$cc1[] = array('id' => 'MSCD', 'text' => 'MasterCard');
echo zen_draw_pull_down_menu("paymentType", $cc1,'','','');
}
?>
Yes it will work for the long term, you got a bit confused by history. Khalil came up with the idea to add a dropdown to go through worldpay quicker, he did some excellent work to find a not easily discovered feature in the non-standard worldpay documentation. He suggested that the template be modified. I thought the concept was good, but didn't cover the differences between the UK and USA/ CA. Also the majority of users are not comfortable with modfiying code in the templates, so I wrote it into the module itself which then replaces the need to do Khalil's modifications, plus adds a couple of features and add the selected card type to the SESSION variable so that it can be recreated if someone decides to leave the checkout process half way through.
So yes you are fine now.
brilliant, thanks for your help :[FONT=Arial]~))[/FONT]
Is there a possibility of the module to display avs code next to the order on super orders page??? same applies to transaction id. Please advise. I am quite familiar with php just cannot figure out how to implement it.
Please advise
Worldpay state that you can put in the callback URL http://<wpdisplay item="username:password@MC_callback"> to get around basic http authentication on apache, but I've no idea what your exact setup is, or whether this will work, as really you should know if your server's connected to the internet.
Thanks Philip. I just upgraded to 1.3.8 and the new worldpay module. before i was using the older worldpay module on 1.3.7 but i didn't change anything else. should that be affected by just using newer versions of these 2?
all my setup is still the same as before, and i haven't changed anything on my worldpay installation admin settings.
Depends on how old a version you were using, the module now needs a callback password because there was a security hole so if you haven't got one then you need to add one to both the ZC admin and to worldpay's admin. There's also a debug feature in the new module that should help you by emailing you details of what worldpay is sending (and if don't get the email then worldpay is not taking to your server) but don't post a debug email to the forum as it contains details of your private mecrhant account.
yep~ i did get an email everytime i test it. where shall i email the bug report to?
[note to the forum]
This is a password issue to do with installation and has been answered off forum.
i'm trying to remove the other currency options on the worldpay card selection page and leave only the default currency showing. Is there a way to do this?
I do not think this question is related to this module, more that it is a worldpay configuration issue and you should probably consult the knowledgebase.
Thank you
Philip
Hello
I have just become aware of an announcement to Worldpay changes
http://www.worldpay.com/support/cont...e=news#bimpact
Can you confirm the Worldpay module does not '...if your system validates and accepts incoming communications from specified peer hostnames only'?
We can't see anything in the code but thought we'd check with you the module doesn't validate hostnames and therefore won't be affected by the change?
Thanks
Francis
No one will be affected by the change, the module does not rely on hostnames since the majority of people run on budget hosting which sometimes has performance issues, I decided not to implement any reverse DNS look ups rather than risk communication between WorldPay and people's shops timing out.
Thank you
Philip.
Thanks for the reply!!! Good news :-)
Using the Worldpay 2.04 addon with zencart 1.8
and noticed today the we accept logo sidebox isn't working.
I assume its because of the overnight Worldpay change?
Basically the logo urls are invalid and they are not displaying.
Almsot certainly, since they've been shifting around nameservers and things, there's been no mention about moving the images, but it's highly likely. I'll try and find out where they've put them and then release another version.
Philip.
I am sure i read on their site that they would email us the new logo were abouts but i have had no email this morning.
I have disabled the sidebox for the time being.
the only logo i have found is their own on their new website.
all i can find is this
Quote:
If you are using the payment method logo generator to display card logos on your website, please ensure you are using the following URL:
http://select.wp3.rbsworldpay.com/wcc/logo?instId=XXXXX
The full tag you need to code into your website is:
Valid Installation ID Required!
<script language="JavaScript" src="http://select.wp3.rbsworldpay.com/wcc/logo?instId=XXXXX"></script>
That's going to be a bit of a bugger for me to test then, since they refused to give me an account.
If i do get an email with the new logo urls i will let you know..
You can find them here
http://www.rbsworldpay.com/support/b...osdetails&c=UK
I am a bit worried something is not working right. I have had a email confirmation from rbsworldpay today as someone has purchased from my shop but my shop has no record of a sale , i think the callback is broken, i hope its nothing serious. Has anyone else had any sucessful transactions today ?
Just for reference.
Code:To source the images directly from RBS WorldPay's payment server, copy the code from the table below. Each line represents an individual card logo image, which can be distinguished by the last part of the file URL (i.e. /visa.gif, /maestro.gif etc)
<!-- Individual logos-->
<img src=http://www.rbsworldpay.com/images/cardlogos/VISA.gif border=0 alt="Visa Credit payments supported by RBS WorldPay">
<img src=http://www.rbsworldpay.com/images/cardlogos/visa_debit.gif border=0 alt="Visa Debit payments supported by RBS WorldPay">
<img src=http://www.rbsworldpay.com/images/cardlogos/visa_electron.gif border=0 alt="Visa Electron payments supported by RBS WorldPay">
<img src=http://www.rbsworldpay.com/images/cardlogos/mastercard.gif border=0 alt="Mastercard payments supported by RBS WorldPay">
<img src=http://www.rbsworldpay.com/images/cardlogos/maestro.gif border=0 alt="Maestro payments supported by RBS WorldPay">
<img src=http://www.rbsworldpay.com/images/cardlogos/amex.gif border=0 alt="American Express payments supported by RBS WorldPay">
<img src=http://www.rbsworldpay.com/images/cardlogos/diners.gif border=0 alt="Diners payments supported by RBS WorldPay">
<img src=http://www.rbsworldpay.com/images/cardlogos/JCB.gif border=0 alt="JCB payments supported by RBS WorldPay">
<img src=http://www.rbsworldpay.com/images/cardlogos/SOLO.gif border=0 alt="Solo payments supported by RBS WorldPay">
<img src=http://www.rbsworldpay.com/images/cardlogos/laser.gif border=0 alt="Laser payments supported by RBS WorldPay">
<img src=http://www.rbsworldpay.com/images/cardlogos/ELV.gif border=0 alt="ELV payments supported by RBS WorldPay">
<!-- Powered by RBS WorldPay logo-->
<a href=http://www.rbsworldpay.com/><img src=http://www.rbsworldpay.com/images/poweredByRBSWorldPay.gif border=0 alt="Powered By RBS WorldPay"></a>
Thank you, that will be very helpful and I'll try and release and update later on tonight.
Philip.
Right I have some more info on the sidebox, at the moment there seems to be massive overloading of the worldpay servers, dropping connections etc.. I am going to create two new sideboxes though. One is going to use the code that Bigenuf helpfully provided except that the WorldPay code provided by him from that page raises a problem (not from Him, Worldpay have screwed up). The other box will automatically have the cards that you accept in it, but you will need to edit it first.
The explanation.
Worldpay haven't thought things through, they have said "manually" put these things up in the sidebox, and they are all http:// e.g. they are not secure. Lots of people run a secure shop, so when the shop is displayed as a https:// Internet explorer puts a great big "there are some items that are not secure on this page" warning up, and the other thing that RBS haven't thought through is that their server has an invalid security certficate for the secure versions of the images, so that would display an even worse warning, at the moment this can be demonstrated by trying to pull up this image:
https://www.rbsworldpay.com/images/cardlogos/diners.gif
The correct sidebox
The only way to avoid displaying security errors when using the worldpay sidebox, will be to manually edit a box that I will be calling tpl_wp_cc_accept_RECOMMENDED.php and you'll need to put your installation ID in unless I can find a way to pull it from the system automatically (could be possible depends on whether the payment modules are loaded in the background on all pages or not).
If it helps any, this is what I have for their secure url for the Powered By logo:
https://secure.wp3.rbsworldpay.com/j...BSWorldPay.gif
I get a 404 if I try to pull up any of the actual card images there, but the powered by image is there at least lol
Until the add-ins page is updated, this is the location
http://########################.co.uk/versions/W....3.x_v2.07.zip
Ignore my previous posting about a new sidebox
What has happened is that by borrowing some people's installation ID's I've managed to find all of the secure logos (published below). Previously I thought it would be a good idea to used the javascript to install the logos into the sideboxes and the theory worked fine, unfortunately the output coming from RBS WorldPay is incompatible with Zen Cart's layout and results in a table going outside of the sidebox column layout. Since the program is on WorldPay's servers their is nothing I can do about this, although I am considering whether a top or bottom banner may be an option.
With regards to problems people are having with missed payments, there is also nothing I can do. It appears that when RBS merged WorldPay in and have moved the servers into one building, they have under estimated the bandwidth required. This means that worldpay is now a lot slower and does not appear to be keeping up with the number of requests. This is resulting in the system timing itself when trying to post the information to the shops to say that a cart has been paid. Once again there is nothing I can do about this, and we all have to wait and expect the odd missed order or payment until RBS sorts itself out. I expect they are all sitting around congratulating themselves over a smooth transfer and not realising that they've cocked up their instructions, their secure server certificate is out of date, and they don't have the bandwidth out to mark a shopping cart as paid.
The secure code for all the logos available is below, you will need to remove the images from includes/templates/template_default/sideboxes/tpl_wp_cc_accept.php to match with credit cards you can accept.
HTML Code:<!-- Individual logos-->
<img src="https://secure.wp3.rbsworldpay.com/jsp/shopper/icons/WP_VISA.gif" border="0" alt="VISA payments supported by WorldPay" />
<img src="https://secure.wp3.rbsworldpay.com/jsp/shopper/icons/WP_VISA_DELTA.gif" border="0" alt="VISA/Delta payments supported by WorldPay" />
<img src="https://secure.wp3.rbsworldpay.com/jsp/shopper/icons/WP_VISA_ELECTRON.gif" border="0" alt="VISA/Electron payments supported by WorldPay" />
<img src="https://secure.wp3.rbsworldpay.com/jsp/shopper/icons/WP_ECMC.gif" border="0" alt="Mastercard payments supported by WorldPay" />
<img src="https://secure.wp3.rbsworldpay.com/jsp/shopper/icons/WP_ECMC_DEBIT.gif" border="0" alt="Mastercard payments supported by WorldPay" />
<img src="https://secure.wp3.rbsworldpay.com/jsp/shopper/icons/WP_AMEX.gif" border="0" alt="American Express payments supported by WorldPay" />
<img src="https://secure.wp3.rbsworldpay.com/jsp/shopper/icons/WP_DINERS.gif" border=0 alt="Diners payments supported by WorldPay">
<img src="https://secure.wp3.rbsworldpay.com/jsp/shopper/icons/WP_JCB.gif" border="0" alt="JCB" />
<img src="https://secure.wp3.rbsworldpay.com/jsp/shopper/icons/WP_LASER.gif" border=0 alt="Laser payments supported by WorldPay" />
<img src="https://secure.wp3.rbsworldpay.com/jsp/shopper/icons/WP_SOLO_GB.gif" border="0" alt="Solo payments supported by WorldPay" />
<img src="https://secure.wp3.rbsworldpay.com/jsp/shopper/icons/WP_MAESTRO.gif" border="0" alt="Maestro payments supported by WorldPay" />
<img src="https://secure.wp3.rbsworldpay.com/jsp/shopper/icons/WP_ELV.gif" border="0" alt="ELV payments supported by WorldPay" />
<!-- Powered by WorldPay logo-->
<a href="http://www.worldpay.com/" target="_blank"><img src="https://secure.wp3.rbsworldpay.com/jsp/shopper/icons/../pictures/poweredByRBSWorldPay.gif" border="0" alt="Powered By WorldPay" /></a>
The servers are certainly timing out a lot more, one thing I've noticed is that instead of going straight to the "select yor credit card" page the shops are now mainly going to a secure transaction page with a padlock that pauses for a few seconds as it tries to find another available server. The knowledge base has also slowed down and I was getting timeouts last night while trying to cross-reference the information that had been posted here, with the need to find the SSL versions of the graphics.
Worldpay and Zen cart always lived on the brink of a timeout anyway because the limit for a zen cart shop to respond to having completed the transaction was 30 seconds, as the bandwidth into worldpay is currently overloaded I think we'll see a lot more incomplete orders BUT GOOD NEWS IS AT HAND
This link is to a module Recover cart sales
http://www.zen-cart.com/index.php?ma...roducts_id=100
you'll need to put the module on and then cut and paste the sql in (it's not my module btw). The aim of that module is to follow up on abandonded shopping carts but I think it's should help you lot at least see, what was on the orders that don't complete because ZC does not mark them as paid. I think I once saw a module that allows the total rescue of an incomplete cart (this one does not do that) but at least this one gives an idea of what was ordered if the zen cart email does not give you enough information.
Philip.
Thanks for the helpful link philip i will install it now, hopefully i can recover the lost order, if you have any news on the situation getting any better please post here. No doubt i will have an order throughout the day so we will just have to see if it has settled down
Cheers :)
very very helpful people. Thanks to you all i have my logos backup. thank you
Dan:clap:
Ive been reading and reading on how to set this up, and it almost works, but im getting a callback failed message from RB Worldpay and its pulling my hair out.
Now the docs say you need to put you password into the settings, but where?????? I have put up a screenshot of my module settings with the important bits greened over.
There is also an image of the email from RBS Worldpay.
This is a new instilation of the module on a fresh install of Zencart.
Can someone please help me here, as this is the last problem before going live today.
Regards,
Rufus
http://www.belltent.co.uk/wp_settings.jpg http://www.belltent.co.uk/wp_callback_failed.jpg
First thing to do is always to not buy anything, hit cancel when you get to worldpay to check that it is sending you back to your site.
Attached is a picture of a faked up module, and you should have payment response password, if you do not, then remove and install your module again as something is incorrect with that image since there are a lot of fields missing.
Thank you
Philip
Thanks for that, as there are lots of boxes to fill in but nothing telling you what to put in them, I will remove it all and re-intall the modules then.
That must be the problem I guess.
Thanks for the amazingly speedy reply.
:hug:
I'd like to add the credit card logos at step 2 of the payment process. I can take the code from the sidboxes that displayes the logos, but I'm not too sure where abouts to put it
Thank you
Suekay
I don't quite understand the question
Thank you
Philip.
Hi Philip,
At the checkout payment stage at step 2 I have these options with radio buttons but no credit card logos next to them. How can I add them?
Credit Card via WorldPay
I'll select a card later
Master Card
Solo
Maestro
Visa
Visa Delta
Visa Electron
Thanks
suekay
There's a line 141 in includes/modules/shipping/worldpay.php
you would to have the images mapped to an array in PHP mapped to the credit card names and then put them between the </label></li>. I could do it, but it's a little beyond most people's PHP skills, the "issue" is that the array is dynamic as people can choose to remove carsd they don't accept through the admin interface.Code:$string .= ' id="' . strtolower($key . '-paymentType"'). ' onclick="document.getElementById(\'pmt-worldpay\').checked=\'true\';"><label for="'.strtolower($key . '-paymentType').'" class="radioButtonLabel" onclick="document.getElementById(\'pmt-worldpay\').checked=\'true\';">' . $val . '</label></li>';
Philip.
Has it worked yet ? I reckon something went wrong with the SQL connection to the database when it was installing as each box should have a description. The number of boxes is in the PHP code, but the descriptions are in the database.
Philip.
Wow! That does look hard and beyond my php. I could work out how to do an array, could I fudge it and fix it to the cards I use rather than dynamic, I guess that would make it a whole lot easier??
Or perhaps a better way to add all the logos at the title: Credit Card via WorldPay?
Thanks
suekay
It would make it easier, but by the magic of updating your installation, you'd overwrite it and lose all of your work, I could have a go if you send me the images and a token sum, though it would have to be "switchable" so that people could choose whether they wanted the images displayed.
Thank you
Philip.
Woo fantastic the reinstall worked its now doing its thing and sending a payment response back to the site.
My final question for now, (im sure it wont be the last), is after :-
How do I get the customer to come back to my site to a thank you for ordering page etc??? Is this possible?Code:Thank You.
This was NOT a live transaction - no money has changed hands
Thank you, your payment was successful
Merchant's Reference: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
RBS WorldPay Transaction ID: xxxxxxxxxxxxxxxxxxxxxx
Please contact RBS WorldPay immediately if there has been a problem making your payment.
The problem with the images in the title are twofold,
a) some people may not accept the cards on display (in the UK we have a card called Meastro/ Solo or Switch)
b) people would click on the pictures.
It should have gone back to your site automatically, if the cancel is returning you then so shoud the rest which means either 2 things normally, a) your site is not publicly accessible and password protected, b) you didn't fill out the http://<wpdisplay item="MC_callback"> or https://<wpdisplay item="MC_callback"> over a worldpay.
Did you get a transaction appear in Admin in your worldpay reporting ?
Thank you
Philip.
Yes all transactions now report in the admin section, and get changed to my custom tag - Worldpay - Authorized...
So I guess it should be working, I must have missed something small...
Probably ticking a box or something at worldpay to do with the payment response URL, I do not have an account, so on that side of things I can only provide educated guesses. One thing I have noted is that if everything is working, save the settings and transfer them to your production environment. Then wait about 10 minutes before doing anything else, because worldpay has some kind of caching mechanism that takes a little while to filter through
If everything is appearing in the worldpay reporting on your zen cart site (Admin section > Customers > Worldpay Payment), then worldpay is communicating with your machine it just isn't doing the final "pull" where it displays your website and that's an area where I have no control.
Philip.
Enable the Shopper Response - (Tick)
Thanks, that deserves to be in bold just in case anyone else had a fully working shop but doesn't get the clients sent back to their shop.
Hi Philip,
I'll cross your palm with silver to do the mod then as this seems the the most sensible option. Can you send the details?
As an aside I had an email from Worldpay about going live and they advised that I should change the URL in the code and some other codes stuff. I'll pm you as I'm not sure how sensitive the info is.
Thanks
Suekay
Suekay has just sent me a very important piece of information, Worldpay are changing the address used for accepting payment, this means that Everyone will need to upgrade when I release a new module shortly.
Thank you
Philip.
There is now a new version of the worldpay module available at:
http://########################.co.uk/versions/W....3.x_v2.08.zip
until it becomes available in the download area. This version changes the URL that WorldPay payments are submitted to, for both test and live transactions. This is a very important upgrade as there is no timescale for when RBS will turn off the old worldpay websites.