Eliot Rayner Posted December 10, 2003 Share Posted December 10, 2003 Hi, I'm also having a problem with the currency update from WorldPay. Has anyone come across a solution ? :rolleyes: Quote Link to comment Share on other sites More sharing options...
Guest Posted December 10, 2003 Share Posted December 10, 2003 The have moved the currency download to https:// from http:// and not bothered to tell anyone. You will need to mod you scripts accordingly (something which I have not got round to yet) Quote Link to comment Share on other sites More sharing options...
Eliot Rayner Posted December 10, 2003 Share Posted December 10, 2003 Thanks for your reply Patrick. From what i can see we'll have to use cURL extension with an HTTPS URL. Plus it looks like the cURL extension will need access to an SSL library like OpenSSL. I'm going to have a look at doing it cheers Eliot Quote Link to comment Share on other sites More sharing options...
Ian-San Posted December 10, 2003 Share Posted December 10, 2003 The have moved the currency download to https:// from http:// and not bothered to tell anyone. You will need to mod you scripts accordingly (something which I have not got round to yet) Correct - but I don't think you can make the change as https should not allow automatic access in the way the currency update script currently works. The answer (for me at least) was to ask WP to add all my display currencies to my installation (which they did free of charge) and so the WP currency conversion is no longer required (as the displayed currency price is now used in WP without conversion). Quote Ian-san Flawlessnet Link to comment Share on other sites More sharing options...
Guest Posted December 11, 2003 Share Posted December 11, 2003 My way round this was to write a Visual Basic program that gets the currencies from worlpay then updates the database, I have been on about doing this for a while as it allows me to schedule the update from my PC. If anyone wants the Source / Binaries for this then I will add a contribution, or mail me and I will zip it up and send it to you. Quote Link to comment Share on other sites More sharing options...
Eliot Rayner Posted December 11, 2003 Share Posted December 11, 2003 Hi guys i did it in curl by changing the Download function in admin\includes\classes\currency_update.php to function Download(){ $fh = fopen('exchangerates.txt','w') or die($php_errormsg); $c = curl_init($this->url); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); curl_setopt($c, CURLOPT_FILE, $fh); curl_exec($c); curl_close($c); if (!$fh) { echo $errno; echo $errstr; exit; } fclose($fh); $fh = fopen('exchangerates.txt','r'); while (!feof($fh)) { $result = fgets($fh, 128); if( ereg( "rateDateString=", $result ) ){ $this->date = eregi_replace ( "rateDateString=", '', $result ); } // GBP_EUR=1.5613517146775129 if( ereg( '(' . $this->sourceISOCode . ')_([A-Z]){3,3}=[0-9].([0-9]){1,2}', $result ) ){ list ( $sourceISOCode, $destinationISOCode, $rate ) = split ('[_=]', $result ); //echo "sourceISOCode: $sourceISOCode; destinationISOCode: $destinationISOCode; rate: $rate<br>\n"; $n = array( 'destinationISOCode'=>trim( $destinationISOCode ), 'rate'=>trim( $rate ) ); array_push( $this->exchangeRates, $n ); } } fclose ( $fh ); } then i changed the $worldpayUrl in admin\currencies.php to $worldpayUrl = 'https://select.worldpay.com/wcc/info?op=rates&instId=' . $instId . '&infoPW=' . $infoPW; then i created a file called exchangerates.txt in the admin directory. You also need to be using the curl extension, and it needs access to an SSL library (i use OpenSSL) hth Quote Link to comment Share on other sites More sharing options...
alan_bab Posted December 14, 2003 Share Posted December 14, 2003 Hi Guys, I am running OS Commerce on my own PC (localhost) and it works great. I installed the Worldpay Module and got a test WP account. The problem is that the callback function is not getting called. I receive an email which says Error reported: Callback to http://localhost/catalog/wpcallback.php?language=en: NOT OK, received HTTP status: 404 (According to WP this error is caused by a page that does not exist) Just to test I copied the url into my browser and the page got executes so the page DOES exist. Is it because WP cannot resolve "localhost" perhaps? I tried changing localhost in my config files to the ip address of my pc (win 98 pc) and then I got:- Error reported: Callback to: http://xxx.xxx.xxx.xxx/catalog/wpcallback.php?language=en: failed CAUSED BY Timed socket connection failure - took more than 30000ms Any ideas or suggestions? :unsure: thanks, Alan Quote Link to comment Share on other sites More sharing options...
Ian-San Posted December 14, 2003 Share Posted December 14, 2003 As you say, localhost is the problem. Your page does not exist on the WP server (which is what using localhost implies) so you need to make sure that the callback is to a real, full, URL. WP probably do not allow callbacks to IP addresses either for security reasons (but not sure about this). Quote Ian-san Flawlessnet Link to comment Share on other sites More sharing options...
alan_bab Posted December 15, 2003 Share Posted December 15, 2003 thanks Ian, I guess I'll have to wait till I host my site on a real webserver before I can test this callback.... ;) Alan B. Quote Link to comment Share on other sites More sharing options...
Guest Posted December 15, 2003 Share Posted December 15, 2003 I have now done a bit more work on the Visual Basic Currency Update program, so that it can be run using command line parameters for DNS, InstID and Password etc. I am now running it as a scheduled task on my Win2K server so that it checks and updated the currencies automatically at regular intervals I cannot post it as a contribution as it is over the 300kb limit , so if anyone wants a copy let me know and I will stick it up on the net somewhere for download Quote Link to comment Share on other sites More sharing options...
Guest Posted December 18, 2003 Share Posted December 18, 2003 Hi guys. It appears that I'm not the only one still suffering from the customer not clicking on continue saga. We lose about 5 orders a week like this and there has to be a solution. We have the latest version of the payment module installed but still people close the window before the re-direct kicks in. For some reason there is also a warning box popping up about leaving a secure connection, then once you click "OK" you get another one saying you are being passed to a secure page? On another quick point. Is it possible to include the WP transaction ID somewhere to make doing refunds easier? When we receive goods back we have to find the e-mail from WP from the original purchase in order to find the transaction ID and do the refund. Much better if that info was on the invoice that we printed out, then we would have it to hand immediately. Quote Link to comment Share on other sites More sharing options...
Pharkie Posted December 18, 2003 Share Posted December 18, 2003 Yup, we still have an issue with people not waiting for the redirect. The order needs to be entered into the system from wpcallback.php not the final Order Complete page. That shouldn't be too hard to do but I don't have time myself! As for the security warnings, that could be since Worldpay being secure is calling in a page from your site which isn't secure (wpcallback.php) and then going back to Worldpay and then redirecting to your final page. So if warning are on you'll go in/out of secure mode, which again is less than ideal. The only real answer is to integrate OSC with something other than Select Junior and use a more sophisticated integration method. But again, I really can't afford time to do that myself :( Quote Link to comment Share on other sites More sharing options...
♥radders Posted December 18, 2003 Share Posted December 18, 2003 There are probably enough people interested to pay to get this done. We should probably post this as a job on the 'seeking commercial help' forum if that is still around. Quote Link to comment Share on other sites More sharing options...
Pharkie Posted December 18, 2003 Share Posted December 18, 2003 There's no forum for 'Commerical help' any more AFAIK. I could look into it next week, but anyone interested would have to move to Private Messages to have that conversation due to the board rules. I know everything I need to do it, but I can't justify the time for the project at the moment. I was hoping someone else would have the skills & time, but if not it may be worth asking me :) Quote Link to comment Share on other sites More sharing options...
Nossie Posted December 28, 2003 Share Posted December 28, 2003 (edited) Hey, I eventually decided to dump STS templates for the moment just to get worldpay to work... damn thing Anyways, before I used to almost get a 'callback' that screwed with the templates.... now I just get a huge error message... any guidance here ? :-| Warning: main(includes/languages/english/wpcallback.php): failed to open stream: No such file or directory in /home/gymwearx/public_html/store/wpcallback.php on line 29 Warning: main(includes/languages/english/wpcallback.php): failed to open stream: No such file or directory in /home/gymwearx/public_html/store/wpcallback.php on line 29 Fatal error: main(): Failed opening required 'includes/languages/english/wpcallback.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/gymwearx/public_html/store/wpcallback.php on line 29 1062 - Duplicate entry 'c86941c62884256c25fa80e86e4cbc4d' for key 1 insert into sessions values ('c86941c62884256c25fa80e86e4cbc4d?language=en', '1072633169', 'SESSION_USER_AGENT|s:45:\"WJHRO/1.0 ------ it then goes on to more code and more personal info about me------ and then at the bottom goes like this... [TEP STOP] Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0 All files are present and correct to my knowledge... athlough one thing I'm not sure about is the current lack of domain? The domain I'm meant to be using is already on a production shop so I cant just redirect and see what happens... I'm using the main domain with the account name as the site addy... any help here would be great... I'm just about pulling what hair I have left out here... cheers, Ian. Edited December 28, 2003 by Nossie Quote Ian Harvie Link to comment Share on other sites More sharing options...
Ian-San Posted December 28, 2003 Share Posted December 28, 2003 On the face of it, I would say it is a file system permission problem - is your php setup for safe mode and so maybe cannot open the application_top file? Quote Ian-san Flawlessnet Link to comment Share on other sites More sharing options...
Nossie Posted December 29, 2003 Share Posted December 29, 2003 it could very well be other files with the wrong permissions..... I never checked them all when I reinstalled OSc I'll check it out tomorrow... cheers :blink: :rolleyes: Quote Ian Harvie Link to comment Share on other sites More sharing options...
Guest Posted December 30, 2003 Share Posted December 30, 2003 Hi, Im going around circles with the worldpay module. Maybee one of you kind souls could help me?? I have everything installed and working o.k but im having two errors... 1) The first one is after a payment has been made it appears as if something is trying to put a double entry in to the sessions table. Although everything seems to be fine both at my end and the world pay end. It is outputing a duplicate error which looks a mess and Im sure it shouldn't be happening?? 2) When I try to update my currencies using the new button in admin. It takes ages then I get the following error Warning: fsockopen(): unable to connect to select.worldpay.com:80 in /home/freeride/public_html/admin/includes/classes/currency_update.php on line 48 110Connection timed out After this the currencies seem to update but again I'm sure this shouldn't be happening. If anyone has any ideas on how I might be able to solve either of these issues Please let me know as im going mad!! THanKs iN adVaNCe Nimmit Quote Link to comment Share on other sites More sharing options...
Ian-San Posted December 30, 2003 Share Posted December 30, 2003 On the second point, WP recently changed its currency server from http to https - so if you are using the unmodified WP currency update contribution it will not work - the delay is probably due to waiting for it to time out. Someone posted some changes to this mod recently - not sure where. Quote Ian-san Flawlessnet Link to comment Share on other sites More sharing options...
241 Posted December 30, 2003 Share Posted December 30, 2003 Can someone give me a link to the latest worldpay contribution Thanks in advance Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
♥radders Posted December 30, 2003 Share Posted December 30, 2003 The confusingly titled Worldpay 4 MS1 is the latest version for MS2 Quote Link to comment Share on other sites More sharing options...
241 Posted December 30, 2003 Share Posted December 30, 2003 The confusingly titled Worldpay 4 MS1 is the latest version for MS2 Thanks RADDERS Your answer was spot on That was what was confusing me the search revealed the contribution for 2.2 but then the contribution itself was saying MS1 Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
Nossie Posted December 31, 2003 Share Posted December 31, 2003 On the face of it, I would say it is a file system permission problem - is your php setup for safe mode and so maybe cannot open the application_top file? Hi.. I just realised that there were no files to chmodd with osc? last time I installed osc via fantastico .... I then went back here and your talking about safemode... not the file permissions lol... no my server doesnt run in safemode :) any other thoughts? :blink: Quote Ian Harvie Link to comment Share on other sites More sharing options...
Guest Posted January 2, 2004 Share Posted January 2, 2004 Hi Ian I'm getting a similar problem to you. It apears as if its trying to insert another session of the same name into the sessions table when it returns back to my server from worldpay. 1062 - Duplicate entry 'e87cb00d1c18c8ac90d0f2cb81ad15fa' for key 1 insert into sessions values ('e87cb00d1c18c8ac90d0f2cb81ad15fa?language=en', '1073074226', 'cart|O:12:\"shoppingcart\":4:{s:8:\"contents\";a:0:{}s:5:\"total\";i:0;s:6:\"weight\";i:0;s:12 - etc etc I cant figure it out for the life of me! if anyone has any ideas please let me know I have spent soooo much time trying to sort this one out!! Sam Quote Link to comment Share on other sites More sharing options...
Guest Posted January 4, 2004 Share Posted January 4, 2004 Hello All, Have upgraded my site to 2.2ms2 and have tried to install the latest WorldPay Payment module Worldpay 4.0 - V1.0 (with download Worldpay_MS1_version_a.zip). When I copy the files into their correct places I lose the Install Remove & Edit options on the right hand side of the payment module screen. If I remove the WorldPay files all is ok. Does anyone have any ideas on what would cause this? Cheers, Simon. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.