Administration and tweaks

Normally you should not need to edit many settings in the configuration for this plugin. The defaults has intentions to work as best practice. By default, your configuration looks like something like this.

Notes

  • In prior release of the plugin gateway, a Resurs-logo was usually injected into the configuration tab with a javascript as other ways of doing this was prohibited. The last fix that was intended to go live could do this naturally by internal calls to the label. This has however changed somewhere in the WooCommerce-journey, and in v4.x this is no longer possible as WooCommerce uses $pages data in a different way than the other releases.

Basic Resurs Bank API Settings

Currently you can't change the merchant country, it is set by your woocommerce store defaults.

The first "subtab" is written to be simplistic. This is the page where you edit your webservice credentials for Resurs Bank. You also choose which checkout type you want to use. Nothing else than this. What about the payment methods? Well, they are on the next "subtab" and to make sure they are updated as soon as possible, the update of payment methods and callbacks are being made the same time when you push the button "validate and save credentials".

If you push this button, your credentials will be validated, if they can be used or not. Entering wrong password will for example not update any credentials. You can of course also instantly save the changes by pressing the save-button. Again, also here we will try to update payment methods and callbacks, but we will ignore validation errors for the credentials. This makes it easier to proceed without getting stuck somewhere.

Payment methods and settings

This configuration tab contains settings for how the checkout normally should work. Here, you can choose to use the default order id reference or if you want to go with WooCommerce incremental post-id's as order numbers. At the bottom of the page you also  have a list of which payment methods you have available for the moment. This can be updated manually on this page, but will usually update when you enter or change credentials on the first page.

Outdated callback URLs

One problem that can be very common is when we are testing our platform before deploying it to production. If your site have två different urls, the admin interface has the opportunity to warn you (globally in admin) when the callbacks starts to differ with the expected URL's. The part of the plugin uses a similarity comparison to decide whether the plugin urls are desynched or not. The URLs has to be more less than 90% similar to the currently registered callback (discovered at Resurs Bank, not the plugin) to before you get this kind of pop up (which is delayed for five seconds after the page load).

Clicking "Cancel" will abort this update and the popup will come back on next reload, until the problem is fixed. This is written to avoid that orders are not handled in the storefront properly. If you choose to click "OK", which is similar to "Yes", you will after the synchronization be informed with an alert, unless you're on the same page as the callbacks. In that case, the page will instead reload.

Fraud Control

The next configuration page is much smaller. You usually don't have to care about this at all and all settings works best disabled. This setup decides how fraud control should work and normally "all disabled" also means asynchronous flow. Those settings enabled only works in simplified and hosted flow. Then why are they present? Well, if you work with for example tickets and travels, you may want to make sure that people really can pay for them. By enabling the fraud control you also enter synchronous mode, meaning you can instantly annul all payments that are denied by Resurs Bank. And if the payments are booked and successful, you can make Resurs Bank finalize the payments instantly.

This is also good for digital products where the payment is instant.

Advanced Settings

We won't touch much of the settings since they are normally used as "merchant corner cases". Sometimes you need a bit more than the plugin supports in "normal cases". This is where you do the "merchant tweaks". For example, you sometimes need different rounding rules than the platform recommends, or allows. This is where you enable such settings. However, rounding is a great example of what you really should not touch. You can read more about it below.

The advanced settings is also the place where you enable logging, and extended logging.

Logging enabled

When logging is enabled, you will find all logs generated by the plugin under wp-admin's /wp-admin/admin.php?page=wc-status&tab=logs - or probably under directly under the directory /wp-content/uploads/wc-logs. Merchan logs can look like this and the purpose is to make orders furthermore traceable than they normally are. For example you will be able to log if customers are redirected - this log belongs to Resurs Checkout, so there is no such redirect, but on the other hand you will be able to see when the customer returns after a successful purchase (See the row: "Customer returned from Resurs Bank to complete order" and the following row where the plugin is "finishing" the purchase). You will also be able to follow the callbacks. Here, you can also see that callbacks won't update any order to order statuses that is already set.

The technical errors in the beginning are a part of some other validations that has to do with updating meta data.

The rounding problems - Is this still a thing?

Yes. Krokedil has further information (swedish) on the subject here! English version is here. Klarna is also mentioning decimal handling in their system requirements here.

Roundings usually comes with trouble and most plugins actually do not fully support them (see Krokedil above). Neither do this plugin, but there's an on-demand-feature available, ready to destroy your shop's orders and pricing logics. It very much solves Resurs Bank rounding problems by simply ignore decimal-setups lower than 2. By means, you can still set your shop to round with 0 decimals, but the plugin will proceed to handle the payments itself with at least two decimals. This may have effect on printed invoices but for payment flows as "simplified" and "hosted" this solution might help.

This plugin comes with a special tweak though. In the advanced merchant settings section, there is a built in function that prevents what we call "rounding panics", which enables half-way support for rounding with 0 decimals, unless you choose to use Krokedil's solution.

With this setting enabled, the plugin will try to override the decimal setup as long as it is set to lower than 2. If you use this feature, you also confirm that you are willingly using a, for the platform, unsupported feature. If you've not already done it, it is recommended to instead increase the number of decimals to 2 or higher.

When rounding error prevention is enabled you will also get an extra warning in the "General" tab just under the "Number of decimals" setting.


Two commits that includes rounding fixes:

https://github.com/Tornevall/wpwc-resurs/commit/ef3619d45556a36409ff16a0575f7f22a0efa3c6
https://github.com/Tornevall/wpwc-resurs/commit/81f707809256619ca440043fa9a55166cc72a3b4


Support

The "subtab" Support has only one purpose. If you need to contact the developer or the support, this is a page you may want to copy and paste from (screenshots works aswell) and send with your error reports, aswell as the logs if they are available.

The Tweaker

The tweaker is as you can see at the first screenshot not available nor visible in the configuration. There are however developer tweaks available also, but they have to be enabled first.

This is done at the bottom in the advanced section. When saving settings, make sure you reload the adminpage an extra time for the section to become available (this is not fixed yet).

When this documentation is written there are not much tweaks available in this section, but there may come furthermore in the future.

Deleting callbacks

When developer settings are enabled you're can to do other magics than normally is available for anyone at all.

Enabling the advanced tweaking section however, also enables other things in the admin. For example, the callback section will become "configurable". In this mode, you can - if you for example are working with troubleshooting - selectively remove callback urls (the X-button). If you by mistake try to remove callbacks without the developer section enabled, callbacks can not be removed, which is a extra security layer for this feature.


To be continued...