mollie / WooCommerce

Official Mollie extension for WooCommerce
https://wordpress.org/plugins/mollie-payments-for-woocommerce/
Other
130 stars 53 forks source link

Status “pending payment” via Sofort Banking in test mode with payment status “payed” #171

Closed borisdiakur closed 6 years ago

borisdiakur commented 6 years ago

Steps to reproduce:

  1. Enable Mollie - SOFORT Banking in test mode.
  2. Put product in cart and use Mollie - SOFORT Banking in Checkout.
  3. In the Mollie payment screen, choose the payment status “payed” and click on “Continue”.

Expected behaviour: Order gets status “processing”.

Actual behaviour: Order gets status “pending payment”. In the order notes it says:

Mollie – SOFORT Banking payment started (tr_asdf1234 – test mode).

Mollie logs:

2017-12-09T15:36:11+00:00 DEBUG mollie_wc_gateway_sofort: Create payment for order 3448 2017-12-09T15:36:11+00:00 DEBUG mollie_wc_gateway_sofort: Payment tr_asdf1234 (test) created for order 3448 2017-12-09T15:36:11+00:00 DEBUG For order 3448 redirect user to payment URL: https://www.mollie.com/paymentscreen/testmode/?method=sofort&token=yxcvb 2017-12-09T15:36:15+00:00 DEBUG Mollie_WC_Plugin::onMollieReturn: Redirect url on return order mollie_wc_gateway_sofort, order 3448: https://staging.mysite.com/en/checkout/order-received/3448?key=wc_order_qwertzui&utm_nooverride=1

Note that everything works as expected when using the Mollie - Bank Transfer method (order gets status “processing”).

davdebcom commented 6 years ago

@borisdiakur I can't reproduce this on my test environment.

Can you check your logs again, and around the same time (same day) search for a log entry like Mollie_WC_Gateway_Abstract::onWebhookPaid called for order 3448

And

mollie_wc_gateway_sofort: Mollie payment tr_asdf1234 (test) webhook call for order 3448.

borisdiakur commented 6 years ago

Hello David, thanks for the support.

There are no such log entries. The logs I’ve posted are the only ones I have in the mollie-payments-for-woocommerce-etc-etc.log file - only four lines. I don’t have any suspicious log entries in the error log either. 😟

borisdiakur commented 6 years ago

I think I got it! On https://www.mollie.com/dashboard/?testmode=true I can see that the payment actually took place. Though under History on the left side it says:

Webhook failed with status code 0 (SSL: certificate subject name 'Plesk' does not match target host name 'staging.mysite.com') December 9, 2017 at 7:14 PM

So it’s a certificate issue. I suppose there is no way around? I wonder why it worked nicely when I was using the Mollie - Bank Transfer method. 😕

davdebcom commented 6 years ago

That you don't have those log entries, shows that the Mollie Webhook can't reach your website.

Your second message gives me the impression you are working on some kind of staging site, locally and/or without an official SSL certificate? Is that correct?

It probably works for Bank transfer because you set that status yourself in the gateway settings, did you not?

borisdiakur commented 6 years ago

That you don't have those log entries, shows that the Mollie Webhook can't reach your website.

Right.

Your second message gives me the impression you are working on some kind of staging site, locally and/or without an official SSL certificate? Is that correct?

Correct. I’m working on a staging site.

It probably works for Bank transfer because you set that status yourself in the gateway settings, did you not?

I don’t think so, I haven’t done anything differently.

I’ve just tried out the plugin on the production site, where I have a valid SSL certificate. Everything worked as expected. 🎉

Thank you David! Great plugin and support! 🚀

davdebcom commented 6 years ago

Oke, let me know if you need anything else.

You don't need a valid certificate, you could do a quick test with http. But if you use https, the certificate should be valid.

If you like the plugin and support, please consider leaving a review: https://wordpress.org/support/plugin/mollie-payments-for-woocommerce/reviews/#new-post

borisdiakur commented 6 years ago

Here you go: https://wordpress.org/support/topic/great-plugin-16134/ ⭐️ ⭐️ ⭐️ ⭐️ ⭐️

davdebcom commented 6 years ago

Thank you!!