Payson Checkout 2.0 – Introduction


Introduction


Payson Checkout 2.0 is a payment module that lets you receive payment through Pyasons new payment system of the same name in your WooCommerce store.

In Payson Checkout 2.0, Payson has discarded all the extra steps at checkout. The payment window is directly integrated into your e-shop and lets your customers pay with a single click. All purchases are based on the service Invoice by email. The customer can pay for their purchase later, or immediately by card or internet bank.


Limitations in functionality


Payson Checkout 2.0 is an embedded checkout, and a checkout solution that largely replaces the standard WooCommerce checkout system. This solution streamlines the experience for the customer so easily complete the purchase, and lets the seller offer several payment options at the same time.

An embedded checkout also comes with certain limitations.
Compatibility with other plugins that expand the checkout experience is limited.
Some features that are currently not supported by this module is:

  • Selecting delivery date.
  • Newsletter subscriptions.
  • Creating an account when ordering where the customer is allowed to select username and password. (This can be generated automatically in WooCommerce.)

For details on why these limitations exist, please see this article on the subject, though it has not yet been translated into English.


Payson Account


To get started with Payson Checkout 2.0 you will need an account with invoice purchasing activated. If you don’t have an account, you can open one here. Payson promises to have you up and running within 24 hours.


Test account


If you want to test the module before opening for actual purchases, you can create a test account here.

In addition to your test credentials from Payson you also need to activate Testmode in the module to complete testing purchases.

To mark a purchase as a test, you must use the following customer information:
Personal ID: 4605092222
Zip code: 99999

To complete a test purchase using a debit card, please use the following card details:
Card number: 4581 1111 1111 1112
Expiry date: Any date
CVC: Any number between 100 and 500


Installation


  1. Log in to WordPress Admin.
  2. Navigate to Plugins → Add New.
  3. Click Upload Plugin, and then Browse
  4. Browse your file system to where you downloaded the Zip file and select it.
  5. Click OK.
  6. Click Install Now.
  7. Activate the plugin.

Mandatory WordPress settings


To enable the callback functionality, enabling Payson to send data back to your store, you must ensure your settings comply with the following:

  • The Permalink setting must not be set to Plain. One of the other settings must be used so that mod_rewrite is activated, or the callback from Payson will generate a HTTP Error 404 response.
  • Callbacks do not work in a test environment that is not publically accessible. If you are using a local development environment we recommend using a service similar to ngrok.
  • In some cases, firewalls and security software, such as Wordfence, can block server-to-server communication. If you are experiencing problems, try to temporarily disable your security measures to see if they might be interfering with Payson callbacks.

Currency with two decimal points


To make sure prices and sales tax for your products is communicated correctly between WooCommerce and Payson you have to ensure that the currency settings in WooCommerce is set to use two (2) decimal points. This is set under WooCommerce → Settings, in the General tab. The setting is called Number of decimals.

If you do not want integer prices to be shown with two decimal places (i.e 200.00kr), we have a code snippet in the post below. 

For details on why this is the case, please see our blog post on the subject. (Not translated into English)


Configuration


  1. Navigate to WooCommerce → Settings → Payment
  2. Verify that Payson is now shown as an available payment method.
  3. Enable Payson in this list.
  4. Click the Manage button next to this payment method.
  5. Set up the fields according to your credentials and preferences.

Enable/disable Check this to enable Payson.
Title Specify how the payment method is presented to the customer.
Description The description presented to the customer.
Other payment method button text The button presented to select a different payment method will have this text. You can leave this empty to use the default text.
Agent ID Your Agent ID as given to you by Payson.
API Key The API Key given to you by Payson.
Testmode Check this to make test purchases.
Enable Order Management Check this if you want to activate order handling in Payson directly from WooCommerce. This means that transactions that have their status changed from Processing to Cancelled in WooCommerce are canceled in Payson, and that completed transactions trigger an invoice from Payson (if applicable) when the status is set from Processing to Completed in WooCommerce.
Color Scheme Select your favorite from among the color schemes available from Payson.
Debug log Check this to enable logging. The filename is shown next to the checkbox, and is also available from WooCommerce → Status → Logs
Request phone This setting is now a site-wide setting in WordPress. You can find it under Appearance → Customize → WooCommerce → Checkout → Phone field

Plugin order flow


This is how the order process is structured:

  1. The checkout page in WooCommerce is called.
  2. Information about the order and the shopping cart is sent to Payson.
  3. Payson returns information about the active transaction and the actual Payson checkout as an HTML string.
  4. The checkout page is rendered and the Payson Checkout is shown.
  5. The customer identify themselves to the Payson Checkout.
  6. A call is sent from Payson to the webshop containing the customer’s address.This information is stored in the WooCommerce customer data.
  7. If the change in address means a change in shipping costs, the change is automatically reflected in WooCommerce and Payson.
  8. When the customer clicks Pay in Paysons checkout, the checkout page is reloaded and the order is processed in WooCommerce (including posting WooCommerce’ own checkout form).
  9. The order is created in WooCommerce and an order confirmation email is sent from WooCommerce to the customer.

Order management


When an order is created in WooCommerce, and a reservation or transaction number exists in Paysons system, you can manage the order in Payson directly from WooCommerce. At present, it supports cancellation, activation and refunds. Partial refunds and order updates are not currently supported.

Get started with order management

To get started with order management, activate the setting Enable order management in the modules settings.

Cancel an order

  1. Order status in WooCommerce must be Processing and a transaction ID must be saved in the order.
  2. Navigate to the order you wish to cancel by going to WooCommerce → Orders and clicking the order.
  3. In the order details, select the field labeled Status. Set this to Cancelled.
  4. Click the button labeled Update in the top right of the page.

If the cancelation is successful, a note is added to the order with the text Payson Checkout reservation was successfully cancelled.

Activate an order

  1. Order status in WooCommerce must be Processing and a transaction ID must be saved in the order.
  2. Navigate to the order you wish to activate by going to  WooCommerce → Orders and clicking the order.
  3. In the order details, select the field labeled Status. Set this to Completed.
  4. Click the button labeled Update in the top right of the page.

If the activation was successful, a note is added to the order with the text Payson Checkout reservation was successfully activated.

Refunding an order

Payson only support refunding an entire order. Partial refunds are currently not supported.

  1. Order status in WooCommerce must be Completed and a transaction ID must be saved in the order.
  2. Navigate to the order you wish to refund by going to WooCommerce → Orders and clicking the order.
  3. Below the list of items in the order, click the button labelled Refund.
  4. Complete the form to refund all items. Partial refunds are not supported.
  5. Enter the refund amount, including shipping fees and tax.
  6. Click !!Återbetala via Payson

If the refund was successful, a note is added to the order with the text Payson Checkout reservation was successfully refunded.


Troubleshooting


If the checkout section is not shown after you have completed the steps as detailed here, and there are no error message, it is recommended that you temporarily enable WP_DEBUG in wp-config.php. Read more about WordPress debugging here.

This will provide more information that you can use to solve the problem, or that you can provide when reporting the problem to us. This information will help us assist you further.


Compatibility with themes and other plugins


The payment section of Payson Checkout 2.0 is integrated directly into your web store using an iframe solution, similar to that used by Klarna Checkout. Unlike Klarna, however, we have included Payson Checkout 2.0 in the regular checkout page for WooCommerce. This means the display if this iframe can vary between the different available themes. In some themes it might look strange or even broken. This is because the theme’s markup is different from the markup provided by WooCommerce.

This module is tested with the following WooCommerce specific themes:

If your theme or plugin is not listed here, we recommend you test it before using that theme in your live store. If required, contact the developer of your shop for assistance in making modification. 
Krokedil does not offer assistance in modifying your theme or plugin as part of our regular support.

Can I fix display problems myself?

If Payson Checkout is not displayed correctly with the theme you are using, you can compare the class names in your theme with the class names in the stock WooCommerce template file for checkout.

    #customer_details,
    #order_review_heading,
    #order_review,
    .woo-shipping,
    .woo-billing,
    .checkout-sidebar,
    .order-review

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.