Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default order thru keyclient payment module not showing up in admin, or mail

    Hi

    Orders made with credit card (keyclient payment module https://www.zen-cart.com/downloads.php?do=file&id=922) don't show up in admin or in mail; I do get the payment confirmation mail.

    As per the customer side the payment goes thru correctly, customer is charged, and gets the mail that payment has been done.

    Last record of order by cc dates back in March 2016.
    Note it did happen both with v.1.5.1 and currently with 1.5.4.

    I did test COD and the order is shown.

    php v.5.4.45
    mariadb v.5.5.53

    I don't know if it is related, when testing the payment at the time of redirecting from gateway to the site I got 403

    Code:
    https: // www dot cadante dot com/index.php?main_page=checkout_process&mail=mailname%40gmail.com&data=20161112&orario=131429&messaggio=Message+OK&cognome=LastName&divisa=EUR&importo=110&languageId=ITA&session_id=null&nome=MyName&tipoTransazione=SC_FULL&mac=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx&codTrans=4-20161112-121103&codAut=584761&esito=OK&alias=payment_278542&OPTION_CF=&brand=MasterCard
    Thank you

    When loging back the order is still in cart.
    Last edited by keneso; 12 Nov 2016 at 01:49 PM.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: order thru keyclient payment module not showing up in admin, or mail

    Lines 15-53 of /includes/application_top.php deal with preventing unexpected URL parameters from being abused to target your site. It also rejects requests that contain very long parameter values, because those are commonly used to trick insecure servers into crashing.

    Your payment module is using the nowadays-unconventional approach of passing all its response parameters as GET parameters in the URL (instead of fields in a form POST), and might be getting caught in that protection system.

    Do your server's access-logs or error-logs show any "406" responses to any hits on index.php?main_page=checkout_process ? If so, then that may be tripping things up for your module.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: order thru keyclient payment module not showing up in admin, or mail

    Thank you.

    server's access-logs or error-logs
    Do you mean the error_log in public_html?
    I don't see 406, only this (3 triplets with slight time difference):
    Code:
    [11-Nov-2016 00:06:37 Europe/London] PHP Warning:  require(includes/application_top.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/cadante/public_html/index.php on line 26
    [11-Nov-2016 00:06:37 Europe/London] PHP Warning:  require(includes/application_top.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/cadante/public_html/index.php on line 26
    [11-Nov-2016 00:06:37 Europe/London] PHP Fatal error:  require() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/application_top.php' (include_path='.:/opt/alt/php53/usr/share/pear:/opt/alt/php53/usr/share/php') in /home/cadante/public_html/index.php on line 26
    And as you can see date is yesterday, whereas the issue happened today.

    Are the two issues (no order in admin, and the 403) related?

    Like added when I got back into the account the order was still on the cart, where is that in the database, so that I can check when I get a payment, and no order in admin, until I get to fix it?

    To be honest I haven't understood much of what you said, I mean I got it, but don't know how to use the info you kindly shared to solve it.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: order thru keyclient payment module not showing up in admin, or mail

    The unsaved order problem is caused by the fact that your store is not properly receiving the payment confirmation from the Keyclient gateway, and therefore doesn't complete the steps of storing the payment confirmation and then storing the order. Once you fix the problem of the confirmation being received, the orders will store properly again.

    The "missing application_top" warnings may or may not be related to the unsaved orders: you will need to determine what's causing those PHP errors first to know whether they're connected.

    The points in my previous comment may be irrelevant to your problem. They were based on initial observations of the symptoms as you reported them. You could use them to attempt some debugging by perhaps temporarily removing the lines mentioned and testing whether payments suddenly work again.
    But it would be better to get your payment gateway to use POST responses instead of GET responses (and edit the payment module to respond to $_POST data instead of $_GET), as that would be more secure and less likely to trigger the spam-protection defenses.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: order thru keyclient payment module not showing up in admin, or mail

    Thank you.

    I'll look into it and see what I can do, I'll report back; may take some days.

  6. #6
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: order thru keyclient payment module not showing up in admin, or mail

    I edited the module files (please see attached zip) to use _POST - I am not sure I done it correctly though (not a coder). Anyhow with this I still got the 403, and the card was charged.

    I reverted back to the original module files, and removed the lines 15-53 of application_top.php, retried and got the same 403, and card charged.

    Of course in both cases no order was passed to admin.

    keyclient_v0.2_POST.zip

  7. #7
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: order thru keyclient payment module not showing up in admin, or mail

    A bit more info from the sslaccesslog where there is the 403 (HTTP/1.1" 403 1139 "https://ecommerce.keyclient.it/ecomm/ecomm/MerchantServlet.....)
    Code:
    2.234.145.206 - - [14/Nov/2016:22:58:52 +0000] "GET /index.php?main_page=checkout_process&mail=xxxxxxx%40gmail.com&data=20161114&orario=235851&messaggio=Message+OK&cognome=Lastname&divisa=EUR&importo=90&languageId=ITA&session_id=null&nome=Name&tipoTransazione=SC_FULL&mac=YKfmtHTfrjI2MjPgtRDjaPHjYWQxODgtMNGpekk4MjA%253D&codTrans=4-20161114-221142&codAut=643757&esito=OK&alias=payment_274532&OPTION_CF=&brand=MasterCard HTTP/1.1" 403 1139 "https://ecommerce.keyclient.it/ecomm/ecomm/MerchantServlet;jsessionid=Mfd0peb+Vgf8jjFErsngrGEh.ecomas6" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0"

  8. #8
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: order thru keyclient payment module not showing up in admin, or mail

    1. Don't change the PHP code to use $_POST until AFTER you've found out how to get the gateway to send POST responses. (That means you have to talk to their tech staff, to determine if they offer that, and then find out how to enable it.)
    This change to POST is only a recommendation for things being more secure. If the gateway doesn't support it, then it's moot and you'll have to live with it.

    2. The response you posted above shows a field "mac=YKfmtHTfrjI2MjPgtRDjaPHjYWQxODgtMNGpekk4MjA%253D" ... which is longer than the 43 characters I mentioned that application_top is protecting against.
    So,edit /includes/application_top.php by adding the highlighted change:
    Code:
          $len = (in_array($key, array('zenid', 'error_message', 'mac', 'payment_error'))) ? 255 : 43;
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: order thru keyclient payment module not showing up in admin, or mail

    Thank you for your patience.

    I changed the application_top.php line as you suggested, double checked by downloading it back, but I got 403 again, basically same log line.

  10. #10
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: order thru keyclient payment module not showing up in admin, or mail

    Any other ideas please?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v153 Payment Module shows fine in Admin but not showing on checkout page
    By evosmash in forum Addon Payment Modules
    Replies: 6
    Last Post: 18 Sep 2015, 06:09 AM
  2. v150 Swipe HQ payment module - Order confirmation E-mail
    By mikecnz in forum Addon Payment Modules
    Replies: 1
    Last Post: 29 Jul 2013, 03:40 AM
  3. Purchase Order not showing up in payment module
    By jerryhutchings in forum Addon Payment Modules
    Replies: 2
    Last Post: 11 Mar 2011, 07:22 PM
  4. Payment Module Options Not Showing in Admin
    By dmon_ng2 in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 27 Jan 2009, 11:45 PM
  5. Orders not showing in admin orders module - using Setcom SA payment module
    By brucehere in forum Managing Customers and Orders
    Replies: 7
    Last Post: 16 Nov 2007, 02:24 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