Nickh Posted February 8, 2016 Share Posted February 8, 2016 Hi - first time using CubeCartv6 had been waiting for WorldPay to complete the installation on the payment gateway and at the moment i'm in the payment gateway test mode. I have two issues that I cant see mentioned anywhere: 1, When transferring to WorldPay 'country' => $this->_basket['billing_address']['country'], should be defined as "The shopper's country, as 2-character ISO code, uppercase." this is mandatory, currently 'United Kingdom' is sent to WorldPay. If I hardcode to 'country' => 'GB' this works OK, is there a translation page that can translate the country name to 2-charactrer ISO code? 2, with https://secure-test.worldpay.com/wcc/purchase the return URL to CubeCart has the following: http://test.mysite.com/index.php_a=complete&orderKey=123456789^123456789^3043418930&paymentStatus=AUTHORISED&paymentAmount=4500&paymentCurrency=GBP&mac=aaabbbcccdddeeefff111222333&source=WP However the order doesn't change from 'pending' to 'processing' - can anyone tell me why this is? Quote GET: 'Before Sanitise:' => '_a' => complete 'orderKey' => 123456789^123456789^3043418930 'paymentStatus' => AUTHORISED 'paymentAmount' => 4500 'paymentCurrency' => GBP 'mac' => aaabbbcccdddeeefff111222333 'source' => WP 'After Sanitise:' => '_a' => complete 'orderKey' => 123456789^123456789^3043418930 'paymentStatus' => AUTHORISED 'paymentAmount' => 4500 'paymentCurrency' => GBP 'mac' => aaabbbcccdddeeefff111222333 'source' => WP Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 8, 2016 Share Posted February 8, 2016 1. I'll make a post on the Github to have the programmers address this. In the meantime, edit that line to read:'country' => $this->_basket['billing_address']['country_iso'], 2. According to the WorldPay gateway for CubeCart, what is expected is: 'cartId' and 'transStatus'. This gateway is not going to use any of the key/value pairs being returned as you have listed above. Could it be the case where WorldPay has completely revamped its API in the past year? Quote Link to comment Share on other sites More sharing options...
Nickh Posted February 8, 2016 Author Share Posted February 8, 2016 Ah, perfect, I'll make the change to item one.. as for two, this is what WorldPay has sent to me as the integration http://support.worldpay.com/support/kb/bg/pdf/rhtml.pdf i'm hoping it's the correct product.. thanks Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 8, 2016 Share Posted February 8, 2016 In one part of that manual, it mentions to use "AUTHORISED" as the 'name' during testing. In other parts, it mentions just "Y" or "C". I am also reading this:http://support.worldpay.com/support/kb/bg/paymentresponse/pr0000.html Quote Link to comment Share on other sites More sharing options...
Nickh Posted February 13, 2016 Author Share Posted February 13, 2016 Ok, so expected behaviour in test, I would have hoped that the plugin would support the 'authorised'.. Can we adjust the tranStatus to treat 'AUTHORISED' as 'Y' when the plugin is in test mode? Thanks Nick Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 13, 2016 Share Posted February 13, 2016 I think the documentation was saying, "In test mode, for the customer's name in the data sent to us, make it AUTHORISED so that we will send back a transStatus of Y." That tells me there is no control panel setting that would be necessary if the testing was done on an order where the customer was named AUTHORISED. But I could be wrong. On the other hand, it makes excellent sense to incorporate this as how could a new store owner know to do this with regards to testing their new WorldPay merchant account? Quote Link to comment Share on other sites More sharing options...
[email protected]. Posted March 9, 2016 Share Posted March 9, 2016 I am still having problems with the order status not updating from pending to processing when customers pay by WP! The callback URL is https://www.my website.co.uk/modules/gateway/WorldPay/return.php but nothing happens, any thoughts appreciated as ever. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 9, 2016 Share Posted March 9, 2016 That file, return.php, loads the $_GET array with needed values, then has PHP run CubeCart's main startup file, index.php. Those $_GET values will have CubeCart process the $_RESPONSE which should have the 'cartId' (important!), the 'transId', and the transStatus' values. For an order you know was transacted by WorldPay, please look in that order's Edit screens, Transaction Logs tab. If there aren't any entries in the Transaction Logs table, then either 1) the payment processor is not making a proper request to your_store/return.php or 2) there is a problem with how return.php is running index.php. 1) To determine if WorldPay is making contyact with your store, you will need to find your store's web server access logs. You typically find these logs in your hosted site's control panel (Cpanel?). Examine the logs for requests made to /modules/gateway/WorldPay/return.php. 2) The command to run index.php is: require('..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'index.php'); where DIRECTORY_SEPARATOR is PHP's constant value for the character the server's operating system uses for separating folder names: '\' for Windows, '/' for any others. The result is: require('../../../index.php'); Some server admins have implemented a server security feature where a multiple "../" sequence is forbidden. You will need to consult your hosting provider if this extended path traversal denial is what is happening. PHP may also have logged an error if denied. It is sometimes difficult to find PHP's error_log. If there are entries in the Transactions Logs table, the Notes column may explain why an order is still at Pending. Quote Link to comment Share on other sites More sharing options...
[email protected]. Posted March 9, 2016 Share Posted March 9, 2016 Will investigate further with the help of Havenswift Quote Link to comment Share on other sites More sharing options...
Nickh Posted March 12, 2016 Author Share Posted March 12, 2016 Hi - I'm still having problems with the WorldPay module, can i add somewhere in the debug output of the array for $_RESPONSE thats used in the 'function process' in gateway.class.php? The CubeCart_Transactions table is empty Can we test extended path traversal is enabled? - or can we put the full path to index.php? Thanks Nick Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted March 15, 2016 Share Posted March 15, 2016 Looking at the server logs for our customer, Worldpay is making contact back to the server OK (status 200) using the expected POST (point 1) and then the index.php is being called correctly (again status 200) immediately afterwards (various sensitive information changed to XXXXX's) followed by a number of other GETs for resources (304 or 200) - all appears fine but the order is not updated to Processing nor any transaction recorded 195.35.90.68 - - [14/Mar/2016:16:14:35 +0000] "POST /admin.php?installation=XXXXXXX&_g=plugins&module=WorldPay&msgType=authResult&type=gateway HTTP/1.0" 200 2535 "-" "WJHRO/1.0 (WorldPay Java HTTP Request Object)" 82.17.59.245 - - [14/Mar/2016:16:14:37 +0000] "GET /index.php?_a=complete&orderKey=XXXXXXXXXXXXXX&paymentStatus=AUTHORISED&paymentAmount=1735&paymentCurrency=GBP&mac=d908373b7ebdfbbecc898517e0754c5d&source=WP HTTP/1.1" 200 8720 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko" Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 15, 2016 Share Posted March 15, 2016 The first log entry is weird. The standard URL for the admin to bring up the module's settings screen is, for example: /admin.php?_g=plugins&type=gateway&module=2Checkout There is the strange installation and msgType keys in the querystring. I do not recognize those. Receiving communication by an outside party should never be through the admin.php (although, getting a report using a 'feed access key' does happen this way). Quote Link to comment Share on other sites More sharing options...
NickyF Posted December 14, 2017 Share Posted December 14, 2017 Did anyone ever get to the bottom of the order status not updating from pending to processing and the lack of transaction information when customers pay by WorldPay? We have recently moved over to Worldpay from paypal and it's proving to be a challenge as our staff that look after cubecart and webshop orders don't have access to the payments account on worldpay, so with no change from pending to processing and also not putting any transaction details in place ( as paypal did ) is creating a lot of leg work between our warehouse and sales office staff checking payments and getting further information. Thanks in advance, Nick Quote Link to comment Share on other sites More sharing options...
bsmither Posted December 15, 2017 Share Posted December 15, 2017 (edited) Please verify the version of the WorldPay module you are using. There was a syntax error in version 1.0.7 and earlier. Fixed in 1.0.8. Edited December 15, 2017 by bsmither Quote Link to comment Share on other sites More sharing options...
[email protected]. Posted December 15, 2017 Share Posted December 15, 2017 Thank you so much! I was still running version 1.0.6!!! 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.