• Resolved nachtigall

    (@nachtigall)


    As recommended by WooCommerce, I use a staging/testing server (which is just my laptop running LAMP). The problem is that very often your paymill plugin “registers” the web hook and assigns my localhost address to it.

    This just happened now, when I upgraded all plugins.

    I just noticed because I got an email by paymill saying (in very bad german):

    [Info] Webhook Fehler
    
    Guten Tag, wir haben festgestellt, dass der Webhook "hook_XXX“ auf Fehler l?uft und haben ihn daher am 20.02.16 13:06 deaktiviert. Bitte prüfen Sie, ob Ihr Webhook wie gewünscht funktioniert - Sie k?nnen ihn jederzeit in Ihrem PAYMILL Konto reaktivieren. https://app.paymill.com/webhooks/hook_XXX Viel Erfolg Ihr PAYMILL Team

    Here is what the “Maintenance” tab said:

    Wartung
    Webhook Status Check
    Bitte beachte, dass Webhooks derzeit nur in WooCommerce unterstützt werden.
    Gespeicherter Webhook gefunden:
    ID: hook_XXX
    Live-Modus: ja
    Aktiv: no - please activate this webhook!
    Event Typen: subscription.created, subscription.deleted, subscription.failed, subscription.succeeded, subscription.canceled, transaction.failed, transaction.succeeded
    Adresse: https://meinlaptop.lan/fr-backup.2016-02-19-00-10-57/www.MY-SITE.de/htdocs/?wc-api=WC_Gateway_Paymill_Gateway
    Webhook Adresse nicht korrekt! Bitte aktualisiere die Webhook Adresse, indem du deine Paymill API Keys nochmals speicherst. Die korrekte Webhook Adresse sollte diese sein: https://www.MY-SITE.de/?wc-api=WC_Gateway_Paymill_Gateway

    I just saved the API keys again and now everything was ok again. But I guess this meant a (payment) downtime during which paymill could not be used for payment?

    Anyway, couldn’t you just somehow prevent that the web hooks gets registered to an unreachable localhost server? This automatic registration is really a pain during developing…

    https://www.ads-software.com/plugins/paymill/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author straightvisions GmbH

    (@matthias-reuter)

    Hi Nachtigall,

    as webhooks are required for proper functionality, you shouldn’t install paymill on a test environment not accessible from other server’s webhooks.

    While WooCommerce and I recommend using a DEV/staging server for testing, this means a testing environment should be as far as possible similar to live environment. A local testing evironment does not fulfill this, if behavior differs to live server.

    Kind regards,

    Matthias

    Thread Starter nachtigall

    (@nachtigall)

    Hi Matthias,

    thanks for the reply, not sure if I really understood it.

    I do not install paymill on a test environment. What I have is a working live server. Whenever I do big upgrades of WordPress, WooCommerce Core and plugins (among which is Paymill), I first test this on a dev system. This is what’s recommended: https://docs.woothemes.com/document/testing-updates-using-a-staging-environment/

    How can this still be done? Am I correct – from reading your reply – that Paymill has to be deinstalled from the test system as soon as the live system is dumped to the test system? If so, how can I make sure Paymill has not yet overridden/registered the working webhook with a wrong localhost URL?

    So basically, to be really sure that paymill never touches the test system I would need to
    1) deinstall paymill from live
    2) dump live (without paymill) to testing
    3) reinstall paymill to live

    Is this correct?

    I do not know what causes the overriding of the webhook in the first place. I did not take any action (except updating), it happened automatically. Wouldn’t it be easier in the first place if this automatic webhook overriding did not happen?

    Issue is not pressing, have a nice weekend ??

    Best regards,
    Jens

    Hi Jens,

    Are you using in your staging system the live or the test keys from PAYMILL? In case you are using the live ones then it will also overwrite the destination for the live Webhooks with the staging url once you save the keys.
    Might be important as well to keep this in mind, so that it will not generate unwanted side effects in your live system.
    It is not required to stop or deinstall PAYMILL on the live system, you only have to make sure that you use the proper (test)keys for the staging system.

    Hope this helps.
    Let us know if anything else is required.

    Have a great day.

    Lars

    Thread Starter nachtigall

    (@nachtigall)

    Hi Lars,

    Are you using in your staging system the live or the test keys
    from PAYMILL?

    Yes, sure. How else am I supposed to dump live to testing? That’s what the whole question is about in my last comment, you could just replace the term “deinstall paymill” with “remove live keys from live server” and have the same problem still.

    In case you are using the live ones then it will also overwrite the destination for the live Webhooks with the staging url once you save the keys. Might be important as well to keep this in mind, so that it will not generate unwanted side effects in your live system.

    As pointed out: This is exactly what happens.

    It is not required to stop or deinstall PAYMILL on the live system, you only have to make sure that you use the proper (test)keys for the staging system.

    So I do not have to deinstall paymill on the live system, but remove the live keys from there before dumping to a test system? See last comment. This is (almost) equally bad.

    Have a nice day, too ??

    Hi Jens,

    Thanks for pointing this out.
    For testing you can use the PAYMILL test keys and test credit card data. Then it will not interfere with the live system.
    In your case indeed you have to rewrite the keys to the live Plugin once testing is done, so that the keys and Webhooks are being set properly.

    Matthias, do you have a workaround for the scenario that Jens shows up?

    Best regards,

    Lars

    Thread Starter nachtigall

    (@nachtigall)

    I think I found a solution: Immediately after importing the mysql live dump to testing I could change the live key strings to the test keys (mysql update).

    I just need to know where these are store in MySql? (table, “row”/”id”). Can you let me know? I could not find it myself.

    Plugin Author straightvisions GmbH

    (@matthias-reuter)

    The settings are saved in table wp_options, fields:

    paymill_general_settings
    paymill_webhook_id

    Kind regards,

    Matthias

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Plugin registers web hook to local (unreachable) staging server during testing’ is closed to new replies.