Re: WorldPay Module for ZenCartv1.3x
Ok we are getting somewhere after that lead.
I actually had the result page show up on our website, but saying that the transaction was cancelled, only once though
Ill test more over he weekend and see how i get on as i want to try it with everything turned off again (seo mod, SSL etc) then Ill get back to you with full results
Re: WorldPay Module for ZenCartv1.3x
dasonix,
You may need the 'just add quotes' fix as well.
http://www.zen-cart.com/forum/showpo...6&postcount=63
Glad you are making progress.
Regards,
Alan
Re: WorldPay Module for ZenCartv1.3x
Just to clarify the code for secure and non-secure callback.
For non-secure callback in the WorldPay control panel set the callback url to:
Code:
http://<wpdisplay item="MC_callback">
and in includes/modules/payment/worldpay.php at lines 128 and 129 the code should be:
Code:
$callback_url = zen_href_link(FILENAME_WPCALLBACK, $zenId);
$worldpay_callback = explode('http://', $callback_url);
For secure callback in the WorldPay control panel set the callback url to:
Code:
https://<wpdisplay item="MC_callback">
and in includes/modules/payment/worldpay.php at lines 128 and 129 the code should be:
Code:
$callback_url = zen_href_link(FILENAME_WPCALLBACK, $zenId, 'SSL');
$worldpay_callback = explode('https://', $callback_url);
Sorry for any confusion my previous post on this may have caused.
Alan
2 Attachment(s)
Re: WorldPay Module for ZenCartv1.3x
This is where I have got to.
All systems striped back to STD (no SEO mod, All in HTTP mode) following recommended mods done
if(isset($_POST['transId'])) {$transId = $_POST[transId];}
if(isset($_POST['transStatus'])) {$transStatus = $_POST[transStatus];}
if(isset($_POST['cartId'])) {$cartId = $_POST[cartId];}
if(isset($_POST['name'])) {$name = $_POST[name];}
if(isset($_POST['address'])) {$address = $_POST[address];}
if(isset($_POST['postcode'])) {$postcode = $_POST[postcode];}
if(isset($_POST['country'])) {$country = $_POST[country];}
if(isset($_POST['tel'])) {$tel = $_POST[tel];}
if(isset($_POST['email'])) {$email = $_POST[email];}
if(isset($_POST['authAmountString'])) {$authAmountString = $_POST[authAmountString];}
if(isset($_POST['cardType'])) {$cardType = $_POST[cardType];}
if(isset($_POST['testMode'])) {$testMode = $_POST[testMode];}
if($transStatus == "Y")
$worldpay_callback = explode('http://', $callback_url);
if ($testMode !== "0") {echo WP_TEST_HEADING . "<br /><br />";} x2
RESULT = CALLBACK FAIL (WP Cpanel callback disabled + callback fail counter +1) Emails as below
Our systems have detected that your callback has failed.
This callback failure means we were unable to pass information
to your server about the following transaction:
Transaction ID: 236225406
Cart ID: d9b79c65698a6b7c9de440611f2d2f15
Installation ID: ******
Error reported: Callback to
http://www.bunnybasics.net/index.php...440611f2d2f15:
NOT OK, recevied HTTP status: 302
Server Reference: mggaeq4a:callbackFailureEmail-21248837:MerchReq-353
Also, if you usually return a response page for us to display to the Shopper
within the time allowed (1 minute), this will not have been displayed.
WorldPay will have displayed to the Shopper the response page file
(resultY.html or resultC.html) held for your installation on the WorldPay
server. This will be your own custom version, if you have supplied one, or,
if not, the WorldPay default version.
REQUEST.TXT File + RESPONCE.TXT attached
NEXT TEST
All above mods done with system is HTTPS mode
RESULT Callback fail stops at WP conf page (NO Counter +1 in WP CPANEL and NO E-mails) page output as below
[FONT=Verdana,Geneva,Arial,Helvetica,Sans-Serif]This was NOT a live transaction - no money has changed hands[/FONT] [FONT=Verdana,Geneva,Arial,Helvetica,Sans-Serif]Thank you, your payment was successful[/FONT]
[FONT=Verdana,Geneva,Arial,Helvetica,Sans-Serif]Merchant's Reference: [/FONT][FONT=Courier]d9b79c65698a6b7c9de440611f2d2f15[/FONT]
[FONT=Verdana,Geneva,Arial,Helvetica,Sans-Serif]WorldPay Transaction ID: [/FONT][FONT=Courier]236226274[/FONT]
[FONT=Verdana,Geneva,Arial,Helvetica,Sans-Serif]Please contact WorldPay immediately if there has been a problem making your payment.[/FONT]
NEXT TEST
if($transStatus == "Y") set to if($transStatus == "")
RESULT SAME AS ABOVE, no increase in fail count, no e-mails ref fail
cart stops at select.worldpay.com with result below
[FONT=Verdana,Geneva,Arial,Helvetica,Sans-Serif]This was NOT a live transaction - no money has changed hands[/FONT] [FONT=Verdana,Geneva,Arial,Helvetica,Sans-Serif]Thank you, your payment was successful[/FONT]
[FONT=Verdana,Geneva,Arial,Helvetica,Sans-Serif]Merchant's Reference: [/FONT][FONT=Courier]c07d9e51794e58a133af01696089fe7d[/FONT]
[FONT=Verdana,Geneva,Arial,Helvetica,Sans-Serif]WorldPay Transaction ID: [/FONT][FONT=Courier]236228644[/FONT]
[FONT=Verdana,Geneva,Arial,Helvetica,Sans-Serif]Please contact WorldPay immediately if there has been a problem making your payment.[/FONT]
Where do we now go from here?
Re: WorldPay Module for ZenCartv1.3x
Have you got an URL where I can put through a test transaction to see what is happening - PM me if you would rather not post.
I did try on your site but the WorldPay module is not enabled at present. Perhaps you have a test site I can access.
The second set of test results shows that the callback is being successful.
As customer you should have got an email from both WorldPay and your store.
As Merchant you should also have received an email from both.
The order should also have appeared in Admin.
In /includes/templates/template_default/templates/tpl_wpcallback_default.php you should not change this code:
Code:
if($transStatus == "Y")
In /includes/modules/payment/worldpay.php for non-secure callback leave as is i.e. lines 128 and 129:
Code:
$callback_url = zen_href_link(FILENAME_WPCALLBACK, $zenId);
$worldpay_callback = explode('http://', $callback_url);
For secure callback these lines should be changed to:
Code:
$callback_url = zen_href_link(FILENAME_WPCALLBACK, $zenId, 'SSL');
$worldpay_callback = explode('https://', $callback_url);
Of course the setting for the callback URL in the WorldPay control panel should be either 'http://...' or 'https://...' as appropriate.
I think you are almost there so keep at it.
Alan
Re: WorldPay Module for ZenCartv1.3x
will have to leave this until tonight, as everythign is going wrong today. I will PM you
Re: WorldPay Module for ZenCartv1.3x
Duncan, I have now changed gateways as Worldpay was costing tooooo much to run, I have changed to Protx VSP Direct v2.0.0 and all worked right first time.
If you still want to use my system to debug/test that is cool I'll copy the shop to a new domain so you can play. Let me know
Re: WorldPay Module for ZenCartv1.3x
The module works really well thanks for the hard work.
I read earlier in this thread that you can not check the Worldpay transaction ID on the admin order page..
You explained that it would be necessary to change things such that the WorldPay Transaction ID is stored in the ZenCart database and displayed within the 'Orders' page in ZenCart Admin. A task for a future version of the WorldPay module.
Any idea if this is going to be implemented soon?
For now it would be handy to have the worldpay purchase transaction number for cross-reference in the subject line in the store cconfirmation e-mail.
Any idea how can I implement this ?
cheers,
Marco
Re: WorldPay Module for ZenCartv1.3x
for PHP 5.2 people and error message see if this helps - thread
Re: WorldPay Module for ZenCartv1.3x
I have installed worldpay and it is now in test mode.so far so good it was quite straightforward.I have read right through this thread and used the url for callback suggested too.The test works as customers end but stops on worldpay page, doesn't redirect back to site.
I receive an email from worldpay but no email from zencat and no record of any order shows up in my admin?
Anyone able to tell me where I am going wrong?
I am soooooooo near:blink: