montazar
Forum Replies Created
-
The code example I sent is to have Klarna Payments set as the chosen payment method for WC, which should be set before redirecting the customer to the standard checkout page. I do not know how you’re handling this redirection, but if you could provide me with the code, I might be able to help you set this up.
You should be able to have both gateways enabled at the same time. On the payment settings page, have you tried placing Klarna Checkout at the bottom? This way, if an HTTP 4xx error occurs, you’ll be instead redirected to the topmost payment gateway instead of the cart page. I am not sure if this will still be the case, since Vipps Checkout redirects the customer to a completely different checkout page. Please give it a try!
Hello @blaudis !
I visited your store. The link on the Vipps checkout page seem to redirect the customer to the WC checkout page without setting the chosen payment method to one of the Klarna gateways like we do here.
Regarding the customer being redirected back to the cart page. I suspect an HTTP 4xx error was encountered. You should see a base64 encoded string in the browser’s address field or in the Klarna Checkout log in WC (provided you have logging enabled). We’re still working on finding a better solution for this issue.
Forum: Plugins
In reply to: [Klarna for WooCommerce] Compatibility with Fluid Checkout PROHello @diegoversiani ,
The fix is included in v3.0.6.
Forum: Plugins
In reply to: [Klarna for WooCommerce] Compatibility with Fluid Checkout PROHello @diegoversiani ,
It is odd that this started to be an issue after the update to v3 since we issue a similar logic, albeit slightly rewritten. However, it shouldn’t be an issue to pass the order object, as this is expected by the function. We’ll most likely be implementing your suggestion, but first we need to test to make sure this doesn’t break anything.
Forum: Plugins
In reply to: [Klarna Order Management for WooCommerce] Add filter for credentialsHello @pappgergely
You can override which credential to use by setting the auth component directly in the order’s metadata:
Will that work for you?
It is true that you’re using centimeters, but MPC, in this case, is using meter in the backend. You can verify this for yourself.
Open the Console tab in the inspector (Chrome: CTRL + SHIFT + I), paste and run this code (hit ENTER):
jQuery('.product_price').on('wc-measurement-price-calculator-product-price-change', function (e, measurement, price) { console.log("measurement: " + measurement) });
Now, change the amount, and observe the output in the console. As you’ll see, for example, 40 cm is represented as 0.40. And this is what we also receive, and send forward to Klarna.
Hello @ditzwerth,
Klarna requires that a quantity must be an integer, they don’t allow fractions. In your case, the customer has entered a fractional number, e.g., 0.5 cm, which MPC reports as 0.5 in quantity. I suggest that you use a smaller unit of measurement, such as millimeters.
Forum: Plugins
In reply to: [Klarna for WooCommerce] How translation works?Hello there,
Klarna uses your store’s locale to set the language of the form. You can either use a third-party plugin to dynamically set the locale or use the ‘kp_locale’ filter (available as of KP version 2.12.0). If you want to use a static locale, simply change the store’s locale in the WordPress general settings.
Forum: Plugins
In reply to: [Klarna Checkout for WooCommerce] HTTP Error 500 with PHP 8.0+Hello @roberthedlund !
We’ll be fixing the deprecation warning in an upcoming release.
I am not aware of a deprecation warning causing a fatal error though, since unlike an obsolete, it will still work for the time being. Is this a one time event, or can you reliably recreate it, and does it still happen if you downgrade to PHP 7.4? We haven’t encountered this issue in our testing when running PHP 7.3, 7.4, 8.0, and 8.1.
Forum: Plugins
In reply to: [Klarna Checkout for WooCommerce] Restrict shippingUnfortunately, that’s the limits of the checks that Klarna (and WooCommerce) performs before purchase validation. The customer will, however, be warned about their phone number, and postal code not being valid before proceeding.
WooCommerce does not verify the validity of the postal code (for some regions) either, and only checks if the country match (unless you explicitly list the allowed postal codes in shipping settings). In this case, since we automatically set the country to Sweden, WooCommerce will show the shipping options. Thus, we cannot rely on shipping options to limit shipping countries.
The only options that I can think of is to implement the ‘woocommerce_after_checkout_validation’ action hook, which allows you to define your own custom validation. If the hook generates an error, no Klarna order will be created.
Forum: Plugins
In reply to: [Klarna for WooCommerce] WP Admin breaks (jQuery is not defined) in 2.11.3Thank you for reporting this. Please, update to version 2.11.4. The issue should now be resolved.
Forum: Plugins
In reply to: [Klarna Checkout for WooCommerce] Restrict shippingHello @esbjornag,
If you’re only selling to Sweden, I suggest you set this in the WC settings (see screenshot):
Go to WC settings. In the “General tab”, set “Sell to specific countries”, and enter “Sweden”. Remember to save.
Result: https://ibb.co/k0Yqrqf
If the customer enter a non-Swedish address, this what they’ll see: https://ibb.co/yhVsqbn
Forum: Plugins
In reply to: [Nexi Checkout] Bug on order-received page and in error-reportingThanks for the information!
We’ll add additional checks to verify the data type of the message.
Do you think you can provide us with the logs generated by the Nets Easy plugin from the same date when the fatal error occurred? If you can, please send it to our support via mail.
Forum: Plugins
In reply to: [Nexi Checkout] Bug on order-received page and in error-reportingHello @iverok
The
dibs_easy_print_error_message
will fail safely if the chosen payment method is not Nets Easy. However, we’ve added a check to prevent it from running at all now for other payment methods.The
wc_print_notice
is problematic. We check for WP_Error and expect a string when we retrieve the error message, but like you’ve noticed, it is returning an array instead. Do you know if it there is a reliable way of recreating the issue?Sorry for the late reply @artomi !
While it is possible to send custom data to Klarna, they’re still the ones that will decide which data they’ll use or ignore. For this reason, you have to refer to Klarna’s API documentation.