Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2009
    Posts
    8
    Plugin Contributions
    0

    Default Wrong order number in checkout_success page with RealEx payment module

    Hi,
    I'm having real trouble completing my transaction after re-directing to Realex for secure payment. (see Realex thread for details - http://www.zen-cart.com/forum/showth...115#post805115)

    Anyway, I managed to successfuly complete the payment and return to the checkout_success page but the shopping cart still contains the items that the client bought and the order number is the order number the client last ordered.
    Is it possible to get checkout_success to remove the cart items and add them to the database as a new order and then display the correct order number.

    thanks.

    Using Zencart v1.3.8a

  2. #2
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: Wrong order number in checkout_success page

    What you really need to do is figure out why the cart isn't completing the order as it should when the payment is made. It sounds like the response from your payent gateway isn't being processed correctly.
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  3. #3
    Join Date
    Nov 2009
    Posts
    8
    Plugin Contributions
    0

    Default Re: Wrong order number in checkout_success page

    Hi,
    Well what I was doing initially was posting the response from my payment provider see code below, but this results in a blank page. However, if I post it to checkout_success instead I get a valid page on my website but the order is not added to the database as a new order even though the payment has been processed successfully.
    thanks

    include('includes/application_top.php');
    //$orderid = $_POST['ORDER_ID'];

    $process_button_string =
    zen_draw_hidden_field('MERCHANT_ID', $_POST['MODULE_PAYMENT_REALEX_ID']) .
    zen_draw_hidden_field('ORDER_ID', $_POST['ORDER_ID']) .
    zen_draw_hidden_field('TIMESTAMP', $_POST['TIMESTAMP']) .
    zen_draw_hidden_field('AUTHCODE', $_POST['AUTHCODE']) .
    zen_draw_hidden_field('MESSAGE', $_POST['MESSAGE']) .
    zen_draw_hidden_field('RESULT', $_POST['RESULT']) .
    zen_draw_hidden_field('PASREF', $_POST['PASREF']) .
    zen_draw_hidden_field('MD5HASH', $_POST['MD5HASH']);

    echo "<form action='" . zen_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL') . "' method='post' name='completeprocess'>";
    echo $process_button_string;
    echo "</form>";
    ?>


    <script>
    document.completeprocess.submit();
    </script>

  4. #4
    Join Date
    Nov 2009
    Posts
    8
    Plugin Contributions
    0

    Default Re: Wrong order number in checkout_success page

    I should point out this code does work, in that it adds the order to the database and sends the customer an email, so something is being processed but for some reason it just displays a blank page with "equetriangifts" on it - so it looks to the customer like it has failed.

  5. #5
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: Wrong order number in checkout_success page

    What you need to be doing is initially processing the response from your payment provider - it the response is valid (payment successful), proceed to the checkout_process page (which creates the order, clears the cart and then redirects to the checkout_success page). If the response is invalid (ie payment not successful), go back to checkout_payment page and display appropriate payment errors. Perhaps the best way to achieve this is to create a new handler page for your payment provider to post the response to (similar to ipn_main_handler.php).
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  6. #6
    Join Date
    Apr 2010
    Posts
    15
    Plugin Contributions
    0

    Default Re: Wrong order number in checkout_success page

    Hi Stuart,
    I'm wondering if you can help me, I am using realex myself and am hitting a wall with the payments side, I am using the test side of things with realex and after I put in the test card details I get an error saying that there was a problem connecting back to the merchant's web site. I'm just checking (since you also use the realex shipping module) if you could tell me if you have the before_process.php in your root folder, or is there somewhere else I should have it? If you don't know off hand, don't worry. Realex said today that they have added that URL so it should be working but I'll be getting on to them again tomorrow.
    Thanks
    Alex

    PS love the site :)

 

 

Similar Threads

  1. Realex RealDirect Payment Module.
    By hem in forum Addon Payment Modules
    Replies: 94
    Last Post: 17 Nov 2017, 01:46 PM
  2. v153 Order number on checkout page is wrong
    By joecooper in forum General Questions
    Replies: 3
    Last Post: 5 Nov 2015, 04:02 AM
  3. Realex Redirect Payment Module Issue; 'Hases don't match'
    By paddyohanlon in forum Addon Payment Modules
    Replies: 2
    Last Post: 23 Aug 2011, 03:15 PM
  4. Issue with realex payment module
    By alfrizmartin in forum Addon Payment Modules
    Replies: 6
    Last Post: 7 Oct 2010, 07:51 PM
  5. checkout_success is showing wrong order with Paypal Standard
    By Istarin in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 29 Oct 2009, 06:26 AM

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