Page 36 of 48 FirstFirst ... 26343536373846 ... LastLast
Results 351 to 360 of 475
  1. #351
    Join Date
    Apr 2008
    Posts
    6
    Plugin Contributions
    0

    Default Re: WorldPay Module for ZenCartv1.3x

    The callback is not working. I am using zen cart version 1.37 with php 4.4 .

  2. #352
    Join Date
    May 2008
    Posts
    3
    Plugin Contributions
    0

    Default Re: WorldPay Module for ZenCartv1.3x

    Re: Callback problem between Zen Cart and WorldPay (Workaround follows)

    After extensive testing, a terrific friend has confirmed the issue IS DEFINITELY the ZC session not existing for the WP call back... (the final thankyou page is actually called by the WP web server itself and sent to the user/browser. Thus, the request comes from a machine that has no active session).

    The following is a workaround to the problem that my friend has worked out for me. It’s not perfect (i.e. not 100% elegant) but does the job. If Alan and others who have their hands in the code would like extra (lengthy) observations/diagnostics that drove this workaround just let me know and I’ll forward my friends notes. Hopefully a more elegant solution will be incorporated into a future release.

    WORKAROUND:
    Create an "interim hack page" that echoes the callback info before it gets dropped. In the description below the hack page is called ‘wpcallbackhack.php’.

    Step 1. Make one mod in the system... in the file includes\modules\payment\worldpay.php --

    Line:
    Code:
    zen_draw_hidden_field('MC_callback', $worldpay_callback[1]);
    Now reads:
    Code:
    zen_draw_hidden_field('MC_callback', 'www.domain.com/store/wpcallbackhack.php?main_page=wpcallback' );

    Step 2,. Place the hack page in the referenced directory. Suggest the the page includes an appropriate text message explaining what is happening so users don't get alarmed. (comfortably addresses concerns about credit card info being passed.) Go to http://www.justkiddintheatre.com/sto...llbackhack.php to see mine.

    WP now calls the hack page... which then rebuilds the hidden form fields that WP would have posted in the call back... but we need to make the user click submit, so the request comes from the user's browser - which has an active session. Thus it works.

    I will leave my WP in test mode for a few days if you want to see how it works in a real situation. www.justkiddintheatre.com/store

    Hope this helps others out there.

    Andrie

    PS: Using ZenCart 1.3.8 with PHP 4.4.8

  3. #353
    Join Date
    Nov 2004
    Location
    Glasgow, Scotland
    Posts
    251
    Plugin Contributions
    0

    Default Re: WorldPay Module for ZenCartv1.3x

    Andrie,

    Your suggested changes to the WorldPay module takes things back several years to how this module originally worked when I first came across it. At that time no one wanted to use it because customers would not read the screen and mostly either closed their browser, or moved off elsewhere, without clicking the 'Click here to continue' button.

    Also I doubt whether it provides a solution at all - consider two customers who make a purchase around the same time. How does the script you suggest hold both customers details for retreivel later? How does it distinguish between customers? These issues are exactly what sessions are all about.

    I have documented the 'Loss of session' issue several times previously in this thread. Callback failure is almost invariably caused by the Zencart host server not maintaining the session. The session information is contained within the WP callback but some hosts for some reason are not able to re-establish the session. When the session is lost the core Zencart script redirects to the login page so that the customer can login and re-establish the session in that way. Worldpay, for security reasons, does not allow the callback to be re-directed. When WorldPay detects a re-direct it displays the standard WorldPay response page (which is user editable) rather than the Zencart response page.

    If you have callback failure you should first contact your host and ask whether their setup maintains sessions - tell them why you are asking the question. If they cannot help - change host. All other solutions are likely to be in-elegant and require at least some element of manual intervention.

    I have NEVER had a callback issue with my server. I host Zencart installations for both my own clients and on behalf of others - all using the WorldPay module 'out of the box'.

    Regards,

    Alan

  4. #354
    Join Date
    Apr 2008
    Posts
    8
    Plugin Contributions
    0

    Default Re: WorldPay Module for ZenCartv1.3x

    Code:
    Hello *****,
    
    We have been through a test and looking at the logs for your site it appears that worldpay are not attempting the callback. We would suggest speaking to both the shopping cart developers and worldpay for advise on this.
    
    Best Regards,
    Support
    I am totally stumped.

  5. #355
    Join Date
    May 2008
    Posts
    3
    Plugin Contributions
    0

    Default Re: WorldPay Module for ZenCartv1.3x

    Update to all interested in the broken callback issue.

    I was personally satisfied with the workaround I previously posted for my purposes but my friend has since produced a more elegant solution that I'm extremely pleased with (and works beautifully on my site). I'm forwarding below his note to me that describes what he did. Again, I will leave my worldpay part in test mode for a day or so for others to look at if they like.

    =======Notes from Steve==========

    1) I am sort of understanding the ISP PHP session issue thing a bit... while the ZC settings are to store sessions in the db... this does not store the ENTIRE session in the db, ZC still stores some values in memory. PHP has the capability to allow "transient" sessions... if your browser passes in a valid session id, you can have your program "connect" you back to your current in-memory session.... In my mind, quite a serious security issue -- but none-the-less, the functionality is there. It may be the case the some ISPs disable the functionality in PHP through the runtime config.

    2) That said, there is no reason why a session can't be reconstituted on the fly... if you know what the session vars&vals were before, just re instantiate them... Fortunately, there is a method in PHP to allow this to occur fairly easily. So this is what i did - knowing that transient sessions were not possible on your server.... the real effective changes meant only adding one line to worldpay.php and one line to tpl_wpcallback_default.php. I changed just one more line in tpl_wpcallback_default.php to clean up a "Continue" button issue.

    In worldpay.php, I inserted the line "zen_draw_hidden_field('MC_zcsession', session_encode()) ." in the code block that write the final confirm form before sending you off to world pay.

    From this:

    Code:
    $process_button_string .=    
            zen_draw_hidden_field('testMode', MODULE_PAYMENT_WORLDPAY_TEST_MODE) .
            zen_draw_hidden_field('name', $order->customer['firstname'] . ' ' . $order->customer['lastname']) .
            zen_draw_hidden_field('address', $address) .
            zen_draw_hidden_field('postcode', $order->customer['postcode']) .
            zen_draw_hidden_field('country', $order->customer['country']['iso_code_2']) .
            zen_draw_hidden_field('tel', $order->customer['telephone']) .
            zen_draw_hidden_field('myvar', 'Y') .
            zen_draw_hidden_field('fax', $order->customer['fax']) .
            zen_draw_hidden_field('email', $order->customer['email_address']) .
            zen_draw_hidden_field('lang', $_SESSION['languages_code']) .
            zen_draw_hidden_field('MC_callback', $worldpay_callback[1]);
    To this:

    Code:
          $process_button_string .=    
            zen_draw_hidden_field('testMode', MODULE_PAYMENT_WORLDPAY_TEST_MODE) .
            zen_draw_hidden_field('name', $order->customer['firstname'] . ' ' . $order->customer['lastname']) .
            zen_draw_hidden_field('address', $address) .
            zen_draw_hidden_field('postcode', $order->customer['postcode']) .
            zen_draw_hidden_field('country', $order->customer['country']['iso_code_2']) .
            zen_draw_hidden_field('tel', $order->customer['telephone']) .
            zen_draw_hidden_field('myvar', 'Y') .
            zen_draw_hidden_field('fax', $order->customer['fax']) .
            zen_draw_hidden_field('email', $order->customer['email_address']) .
            zen_draw_hidden_field('lang', $_SESSION['languages_code']) .
            zen_draw_hidden_field('MC_zcsession', session_encode()) .
            zen_draw_hidden_field('MC_callback', $worldpay_callback[1]);
    This converts the current session vars&vals to a string, and sends them over to WP in a custom field which WP will send back in it connection back to ZC.

    Then in tpl_wpcallback_default.php, I had to grab that session string, and reconstitute the session manually before additional processing by the server. My code is added before any other code in the file, right after the comment:

    // get values from WorldPay response - see http://support.worldpay.com/kb/custo...ageeditor.html

    Inserted code:
    Code:
       if(isset($_POST['MC_zcsession'])) {session_decode(str_replace('\"', '"', $_POST['MC_zcsession']));}
    Now, there is a slight side effect in this fix, and that is upon WPs call back to ZC, you end up getting logged out. I suspect that this is because I am attempting to reconstitute the session AFTER the native ZC session init code runs. Since the session init code runs before my code, it results in ZC thinking that the user is not logged in... This results in odd behaviour if the user clicks "My Account" link or the "Continue" button from the confirmation page....they see "Ooops, session timed out, please log in"....

    I resolved two issues with the Continue button on the final confirmation page... first, I converted it to a simple link, instead of a form submit -- this got rid of the "Warning:..." message given to the user since in this case they are submitting from a secure page at WP to a non-secure one on your site. The second issue was the re-login issue... to fix that, I just repointed the Continue link to the top of the store site... where you do not need to be logged in. If the user then wants to buy more, or check their account... they would have to log in again, but i would say that this will be far fewer users... and it won't seem so bad since they are now fully out of the purchase stream.

    The fix for the continue link changes code from:

    Code:
    <?php
          echo zen_image_submit(BUTTON_IMAGE_CONTINUE, BUTTON_CONTINUE_ALT);
    ?>
    To:

    Code:
    <?php
          echo '<a href="' . zen_href_link('/', '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CONTINUE, BUTTON_CONTINUE_ALT) . '</a>';
    ?>

    So... while this is not 100% PERFECT... it alleviates that nasty interim "Click to Continue" page....and I think is nearly perfect enough to satisfy your needs.

  6. #356
    Join Date
    Apr 2008
    Posts
    6
    Plugin Contributions
    0

    Default Re: WorldPay Module for ZenCartv1.3x

    I am using 1.37 version php 4.4. After making the payment when worldpay redirects to my site I get this message:
    Warning: Cannot modify header information - headers already sent by (output started at includes/templates/template_default/common/html_header.php:22) in /includes/functions/functions_general.php on line 44.
    Although this problem has been addressed many times in this forum but no one could find a solution for it.
    I have even uploaded all the templates files in a fresh manner but the same problem comes.
    If in tpl_wpcallback_default I replace

    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];}
    .........
    with $_GET I am taken back to my site with the following info:
    Transaction cancelled: No money changed hands. Trasaction ID...etc.

    To check if there was a server problem I uploaded a new Zen cart version 1.38a and the module works fine. Please help as starting with a new zen cart is not an option.

  7. #357
    Join Date
    Jun 2006
    Posts
    19
    Plugin Contributions
    0

    Default Re: WorldPay Module for ZenCartv1.3x

    Hi

    I'm pretty sure I've tried everything in this thread and i can't get callback to work. I can go through to Worldpay and pay fine but then nothing happens in zencart.

    I'm using zencart 1.3 php 4.4.8
    Can pm website addy.

    Here's what I've tried so far:
    1) I've reinstalled the module
    2) I've tried to https fix suggested
    3) I've tried the fix suggested by Andrie
    4) I've contacted my ISP (1and1) who disclaim any knowledge of session timeout.
    5) I've just installed the beta and that doesn't work either.

    Obviously it's going to be something really obvious that I haven't thought of but please can anyone help? I'm only vaguely teckie so keep it relatively simple.

    Thanks

    Coley

  8. #358
    Join Date
    Jun 2006
    Posts
    19
    Plugin Contributions
    0

    Default Re: WorldPay Module for ZenCartv1.3x

    Thanks to Andrie's friend Steve my worldpay module is now up and running.

    There were two things we (well he!) fixed. NB: I am using the beta module.

    1) In worldpay I have forgotten to set my payment response url to: https rather than http....so the correct link is:
    https://<wpdisplay item="MC_callback">

    This got it working fine except when I did a live purchase and was directed back to my website after payment the thank you page said 'Thank You! We Appreciate your Business!
    This was NOT a live transaction - no money has changed hands.'

    Which was not good as it WAS a live transaction.

    That was fixed by changing this file: >includes>templates>template default>template>tpl_modules_wp_checkout_success.php

    The previous code was:

    if ($testMode !== 0) {echo "<h2>" . WP_TEST_HEADING . "</h2>";}

    This was changed to:

    if ($testMode != "0") {echo "<h2>" . WP_TEST_HEADING . "</h2>";}

    Which has sorted it all out.

    Many MANY thanks to Stephen.

  9. #359

    Have a Drink Re: WorldPay Module for ZenCartv1.3x

    Quote Originally Posted by Andrie View Post
    Update to all interested in the broken callback issue.

    Send the man a large beer!

    Thank-you so, so, so, so much. This has fixed my problem, that I've been working through for the last few days solid.



    THANK-YOU!!

  10. #360
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,242
    Plugin Contributions
    20

    Default Re: WorldPay Module for ZenCartv1.3x

    Well, using the beta mod and the callback fixes above, everything works perfectly on php5.2.6 when I run a test transaction, but the moment I switch to live, I get this error immediately I arrive on the Worldpay site:
    [FONT=Verdana]Sorry, there was an error in processing this transaction:[/FONT] [FONT=Verdana]PCSAT.liveOnTest[/FONT]
    [FONT=Verdana]Server information[/FONT] [FONT=Verdana]10/Aug/2008 18:10:42[/FONT] [FONT=Verdana]Server ID mg1imscs5pa[/FONT] [FONT=Verdana](WPReq-156243)[/FONT]
    As Worldpay don't man support at the weekend(!), can anyone offer suggestions as to what the problem may be?

    Just thought - the site is 1.3.7 - could that be an issue?
    Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
    20 years with Zencart !

 

 
Page 36 of 48 FirstFirst ... 26343536373846 ... LastLast

Similar Threads

  1. v151 Worldpay module for 1.5.x is there one and where can I get it?
    By veronicathecow in forum Addon Payment Modules
    Replies: 26
    Last Post: 30 May 2015, 02:40 PM
  2. v153 WorldPay module for 1.5 ?
    By joecooper in forum Addon Payment Modules
    Replies: 2
    Last Post: 16 Mar 2015, 02:49 PM
  3. v150 WorldPay module
    By properjob in forum Addon Payment Modules
    Replies: 7
    Last Post: 16 Apr 2013, 11:55 AM
  4. Goldmine 8.5 and ZenCartv1.3.9d?
    By brackengirl in forum Managing Customers and Orders
    Replies: 0
    Last Post: 7 Jul 2010, 04:51 PM
  5. Worldpay Module
    By Steve B in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 10 Jul 2008, 02:12 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR