Strange problems with Omnikassa 2.0

WPPizza – A Restaurant Plugin for WordPress Support Add-Ons Gateways Omnikassa Strange problems with Omnikassa 2.0

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #40861
    Denise
    Participant

      Hi,
      Since I switched to Omnikassa 2.0 within the plugin, I am stuck with some 2 problems which I have been unable to resolve.

      1. Some customers can pay by IDEAL without problems.
      But others experience issues with following occurrences:
      – they do not receive a confirmation email, nor does the restaurant
      – their shopping cart do not get emptied after payment
      – the amount does get deducted from their account (I checked with a customer)
      – when I try to place an order in the Omnikassa Sandbox, all goes well.

      I receive following error mail from the website:
      quote>>>

      ERROR – CRITICAL: 30007 | order not found using order id
      WPDB LAST QUERY (*might* be related): SELECT * FROM wp_wppizza_orders WHERE id=[redacted by admin] AND payment_status IN (‘COMPLETED’)
      LAST PHP ERROR (*might* be related): Undefined property: PHPMailer::$AltBody IN FILE: “/var/www/clients/client4/web22/web/wp-includes/class-phpmailer.php” ON LINE: “2236”

      PARAMETERS RECEIVED
      Array
      (
      [signature] => [redacted by admin]
      [moreOrderResultsAvailable] =>
      [orderResults] => Array
      (
      [0] => Array
      (
      [merchantOrderId] => [redacted by admin]
      [omnikassaOrderId] => [redacted by admin]
      [poiId] => [redacted by admin]
      [orderStatus] => COMPLETED
      [orderStatusDateTime] => 2019-01-06T17:05:02.118+01:00
      [errorCode] =>
      [paidAmount] => Array
      (
      [currency] => EUR
      [amount] => 2525
      )

      [totalAmount] => Array
      (
      [currency] => EUR
      [amount] => 2525
      )

      )

      )

      )
      <<< unquote

      2. Since switching to Omnikassa 2.0 there are problems with the ADD-INGREDIENTS plugin.
      – ingredients do not show up in the confirmation email to customer, nor in the email to the restaurant.
      – this happens only when customer chooses Ideal (Omnikassa).
      (without omnikassa, e.g. Cash on Delivery, the ingredients show up fine every time. )
      – when checking order history in Admin, the ingredients are also missing.
      – BUT, when I click on the print button, the ingredients DO show in the print layout.
      – I have tried switching from HTML to Plaintext email with same result. No ingredients in both versions.
      – I have tried placing an order within the Omnikassa sandbox. Same result, no ingredients in email.
      – I have checked and re-checked the webhook which corresponds to your setup instructions (https://www.pizza-service.nl/wp-content/plugins/wppizza-gateway-omnikassa/ipn/ipn.php)
      – I have tried switching back to an older version of the ingredients plugin but the issue remains the same.

      The orderpage from the restaurant is: https://pizza-service.nl/online-bestellen/

      The website has been in use for years without any problems.

      The only things changed since the last time when everything worked :
      – updated the ingredients plugin to latest version
      – switched to Omnikassa 2.0 (the plugin was already running Omnikassa 1.0)

      WP debug is not mentioning any errors.
      I am running WP 5.0.2 with PHP 7.0 on Ubuntu 16.04

      I hope you can help me out.

      #40866
      Olly
      Admin & Mod

        first of all:
        before approving this post i have redacted some possibly sensitive information you probably should not post publicly !
        in the future, write a reply to your own post with that sort of data and set it to private

        the rest i will reply to tomorrow

        #40870
        Olly
        Admin & Mod

          re 2 (ingredients not showing):
          that should be fixed now with v3.4 of the omnikassa plugin.
          thanks for flagging that issue

          re 1 :
          the plugin behaves *exactly* the same way between sandbox and live (other than simply using another url to send an order to)
          so if it always works in sandbox but you have issues with live orders, the error is elsewhere.
          from what you are describing this sounds very much like either omnikassa does not send any data back (check/compare your settings between your sandbox/and live setup in your omnikassa account especially your WebhookUrl ) or something is throwing an error when receiving the data from omnikassa .
          *anything* – wppizza or not – throwing an fatal error on your site would stop execution so check your debug.log for those too

          furthermore, do you have any files/logs in wp-content/plugins/wppizza/logs/ ? (other than htaccess, index, readme)
          if so, can you send them to me please (zipped ideally) at dev[at]wp-pizza.com

          #40871
          Olly
          Admin & Mod

            PS: there’s a – albeit very small – chance that the 3.4 update will fix the non-ingredients issue too.
            so definitely worth doing a dummy live order after you have updated if you still have an issue with it.

            #40880
            Denise
            Participant

              Thank you for your very fast response and support.

              I have updated to v3.4 and indeed, the ingredients issue seems to be resolved.

              Regarding the payment issue, I have sent you an email with a zipped file containing two logfiles found in wp-content/plugins/wppizza/logs/

              I have checked the Webhook in Omnikassa banking. There is only one entry which seems correct. No separate entry for sandbox.

              The restaurant is now open so I will wait and see if any more errors occur.

              #40881
              Olly
              Admin & Mod

                thanks
                can you send me your actual debug.log too please (as it’s not accessible publicly from https://pizza-service.nl/wp-content/debug.log )

                furthermore. when i go to
                https://pizza-service.nl/
                i get a “Sorry, our products are not available in your country !”

                so there is some block on this site which might well affect responses from omnikassa being blocked too
                you cannot be certain that the ipaddress omnikassa sends things from is in the NL – unless omnikassa specifically state this somewhere !!!
                i would suggest you take this block off and see if the problem persists

                additionally, the logs you sent me only have one single order that seemingly had an error. this might well also have been caused by some intermittent issue on the server
                for example when i went to https://pizza-service.nl/ last night, it was simply not available/offline. obviously , if this sort of thing happens, all sorts of things can suddenly not work.

                Are we sure this was not just a one-off issue cause by who knows ???
                i.e is this reproducable ?

                #40882
                Olly
                Admin & Mod

                  >The restaurant is now open so I will wait and see if any more errors occur.
                  sorry. did not read that line for some reason. so yes, please let me know if you get more problems (make sure you have the debug turned on too , just in case)

                  #40916
                  Denise
                  Participant

                    Hi,

                    Yes, the error is reproducable. It occurred again yesterday and today. Some payments are fine, but sometimes it throws an error.

                    >>ERROR – CRITICAL: 30007 | order not found using order id
                    WPDB LAST QUERY (*might* be related): SELECT * FROM wp_wppizza_orders WHERE id=3689 AND payment_status IN (‘COMPLETED’)
                    <<

                    There is indeed a block on the site using the IQ Block Country plugin. Only allowing connections from Belgium, Netherlands, Germany, Ireland, UK, USA. This was done to prevent attacks.

                    I have now deactivated that plugin for the time being. However, it has been running with the block for years without problem. And still, most payments are ok.

                    Over the last week, it seems like there are multiple connections attempts from Ukraine targeting the xmlrpc.php putting a load on the server. However, the timestamps do not correspond with the payment errors.

                    I have sent you the requested files.

                    #40923
                    Olly
                    Admin & Mod

                      >Some payments are fine, but sometimes it throws an error.
                      i’m actually not sure if this is a payment error as such or a false positive due to the way omnikassa sends notifications (hence why i asked you for a db dumb in an email, to drill down a bit)

                      >However, it has been running with the block for years without problem
                      yeah, i don’t think this is actually the issue anyway
                      i also get lots of attacks from the Ukraine here too (I shall refrain from posting my thoughts on why or from who that is here on the public forum..)
                      in any event. as some go through i think you can turn this on again. i really don’t think this has anything to do with it

                      #40924
                      Olly
                      Admin & Mod
                        This reply has been marked as private.
                        #40925
                        Olly
                        Admin & Mod

                          can please also enable – for the time being – “Log successful orders” in
                          WPPizza->Settings->Logging (this will write some more log files into wppizza/logs to perhaps allow us to compare a few things)

                          #40926
                          Denise
                          Participant
                            This reply has been marked as private.
                            #40931
                            Olly
                            Admin & Mod

                              hmm, i cannot be sure yet , but it seems that omnikasse – sometimes (*maybe* depending on payment method chosen – dunno for certain yet though) sends somewhat unexpected responses.

                              do me another favour please.
                              to be able to get what’s omnikassa sends (i.e the data that is actually received at the server before any kind of processing takes place) :

                              in …/wp-content/plugins/wppizza-gateway-omnikassa/ipn/ipn.php you will find the following at approx line 19/20

                              
                              //file_put_contents('../../wppizza/logs/ipn-rok-input_data.log', '[input_data '.date('Y-m-d H:i:s').']: '.print_r($input_data, true) . PHP_EOL . PHP_EOL, FILE_APPEND);
                              //file_put_contents('../../wppizza/logs/ipn-rok-access.log', '[input_data '.date('Y-m-d H:i:s').']: '.print_r($_REQUEST, true) . PHP_EOL . PHP_EOL, FILE_APPEND);
                              

                              please change this to

                              
                              file_put_contents('../../wppizza/logs/ipn-rok-input_data.log', '[input_data '.date('Y-m-d H:i:s').']: '.print_r($input_data, true) . PHP_EOL . PHP_EOL, FILE_APPEND);
                              file_put_contents('../../wppizza/logs/ipn-rok-access.log', '[input_data '.date('Y-m-d H:i:s').']: '.print_r($_REQUEST, true) . PHP_EOL . PHP_EOL, FILE_APPEND);
                              

                              (in essence simply omit the 2 leading // of each line)

                              so we can log that too

                              additionally, can you check something for me please (as i cannot see that and this info is only available in your omnikassa account)

                              are the payments that cause(d) problems all using the same payment method ? (i.e the are all VISA or all iDeal, or all [someotheroption] )
                              ?

                              just trying to narrow things down

                              #40932
                              Olly
                              Admin & Mod

                                oh, and one more question:
                                on what day/date (if you remember) did you switch to the api 2 of omnikassa in the plugin ?

                                #40943
                                Denise
                                Participant

                                  Ok, I uncommented the two lines in ipn.php debug section.

                                  All payments up to now were done using iDeal.

                                  If I remember well, I switched to api 2.x on December 24th.

                                  #40959
                                  Olly
                                  Admin & Mod

                                    ok, thanks for the info.

                                    i just did some 20 or so (sandbox – admittedly) orders here without any issues at all, so all i can think of is some unexpected data being sent to / received by the server.

                                    since you have now changed the file_put_contents.... , can you tell me if there are now some ipn-rok-access.log and ipn-rok-input_data.log in your wppizza/logs directory (and can you send them to me if so) – regardless of if you have had any other problematic orders for the time being ?
                                    (assuming you had some orders since changing those file_put_contents lines )

                                    thanks

                                  Viewing 16 posts - 1 through 16 (of 16 total)
                                  • The topic ‘Strange problems with Omnikassa 2.0’ is closed to new replies.