1. Documentation /
  2. Payson

Payson

Payson is a gateway plugin that extends WooCommerce, allowing you to take payments via Payson. Payson cooperates with Visa, MasterCard and the Swedish online banks Swedbank, Handelsbanken, SEB and Nordea.

General information

↑ Back to top
When the order goes through, the user is taken to Payson to make a secure payment. No SSL certificate is required on your site. After payment the order is confirmed and the user is taken to the thank you page. The Payson plugin acts as two separate payment methods, one for Payson Direct (credit card payment & online bank payment) and one for Payson Invoice. In order to use the Payson gateway you need a Payson merchant account and also request a AgentID and a MD5-hash from Payson. To utilize Payson Invoice you need to activate this feature in your Payson account. Contact Payson for further information about this. Note that the plugin only works if the currency is set to Swedish Krona or Euros and the Base country is set to Sweden or Finland. To use the Payson Invoice feature, your store currency must be set to Swedish Krona.

Payson Direct

↑ Back to top
Direct Payments means that you easily can take credit card payments as well as direct payments via any of the associated banks. Direct Payments supports Payson Guarantee (this can be turned on and off). Payson Guarantee means that the buyer will have the opportunity to inspect and approve or deny the merchandise before the payment is finally transferred to the seller.

Payson Invoice

↑ Back to top
The Payson gateway also offers Payson Invoice – let your customers receive their order first and pay by invoice later.

Installation

↑ Back to top

  • Purchase and download the plugin zip file from WooCommerce.com
  • Login to your WordPress Admin. Click on Plugins | Add New from the left hand menu
  • Click on the “Upload” option, then click “Browse” to select the zip file from your computer. Once selected, press “OK” and press the “Install Now” button.
  • Activate the plugin.

Configuration: Payson Direct

↑ Back to top
  • To configure the plugin, click on WooCommerce | Settings from the left hand menu, then the top tab “Payment Gateways”. You should see “Payson Direct” as an option in the list.
  • Optionally you can select the radio button next to this option to make it the default gateway.
  • You should see “Payson Direct” displayed across the top of the page as a link also. Click on this to configure the plugin, and you will see a list of options:
    • Enable/Disable checkbox for this gateway.
    • The “Title” option allows you to determine what your customers will see this payment option described as on the checkout page.
    • The “Description” box controls the message that appears under the payment fields on the checkout page.
    • Payson email address – the email address tied to your Payson account.
    • Agent ID – Requested from Payson (Login to your Payson account and navigate to –> My account –> Integration to retrieve your AgentID).
    • MD5 – Requested from Payson (Login to your Payson account and navigate to –> My account –> Integration to retrieve your MD5-key).
    • Payson Guarantee – Whether Payson Guarantee is offered or not. More information about Payson Guarantee can be found here.
    • Language – Set the language in which the page will be opened when the customer is redirected to Payson.
    • Debug – If this option is checked then details of communication with Payson are stored in a debug log at location /wp-content/plugins/woocommerce/logs/payson.txt.
    • Press Save changes to save your changes.
 

Configuration: Payson Invoice

↑ Back to top
  • Navigate to –> WooCommerce –> Settings from the left hand menu, then choose the top tab “Payment Gateways”.
  • You should see “Payson Invoice” displayed across the top of the page as a link also. Click on this to configure the plugin, and you will see a list of options:
    • Enable/Disable checkbox for this gateway.
    • The “Title” option allows you to determine what your customers will see this payment option described as on the checkout page.
    • The “Description” box controls the message that appears under the payment fields on the checkout page.
    • Payson email address – the email address tied to your Payson account.
    • Agent ID – Requested from Payson.
    • MD5 – Requested from Payson.
    • Language – Set the language in which the page will be opened when the customer is redirected to Payson.
    • Invoice fee – Enter the Invoice fee product ID in this text field if you want to utilize the Invoice fee feature.
    • Debug – If this option is checked then details of communication with Payson are stored in a debug log at location /wp-content/plugins/woocommerce/logs/payson.txt.
    • Press Save changes to save your changes.

Invoice fee setup

↑ Back to top
The Invoice Fee for Payson Invoice is added as a simple (hidden) product. To create a Invoice fee product:
  1. Add a simple (hidden) product. Mark it as a taxable product.
  2. Go to the Payson Invoice settings page and add the ID of the Invoice Fee product in the field Invoice fee. The ID can be found by hovering the Invoice Fee product on the Products page in WooCommerce. Notedo not add SKU or price of the invoice fee. Add the product ID in the settings field for the Invoice fee.

Testing

↑ Back to top
A separate test system is available that can be used to test your integration. It has the same functionality as the live API including IPN, but no real money will be moved. For bank and credit card payments a bank simulation page will be shown in place of the live bank page which allow you to simulate an OK or denied bank response. When placing test orders you need to activate Test mode in the payment gateway settings and use the merchant and customer credentials displayed below.

Test Agent

↑ Back to top
The test system does not share accounts with the live site. A test agent has been setup that can be used in place of the live agent account. The agent is approved for both credit card/bank payments and invoice payments. API User ID (AgentId): 4 API Password (MD5-key): 2acab30d-fe50-426f-90d7-8c60a7eb31d4 Receiver Email: testagent-1@payson.se

Test Credit Card

↑ Back to top
Any card with a a valid checksum digit and valid prefix will work. In case you do not have a card available a generated card is specified below. Card number: 4581 1111 1111 1112 Expiration Date: Any Cvc: Any

FAQ

↑ Back to top
Q. When I try to Place order and proceed to the Payson payment window, I get this message: {"result":"failure","messages":"","refresh":"false"} What is wrong? A. Most often this error appears because you are trying to make a purchase with the same email address as the registered Payson seller email. Payson interpret this as the seller and the buyer are the same person.
Q. I receive this error message when trying to order multiple items of one product: array ( 0 => PaysonApiError::__set_state(array( 'errorId' => '590001', 'message' => 'The total amount specified for receivers does not match the total amount specified by the order items.', 'parameter' => 'orderItemList+receiverList', )), ) What is wrong? A. This error concerns ONLY the Payson Invoice feature in the plugin. You need to have your shop set to “2” Number of Decimals to work properly with taxes and how they are calculated. You will find the setting here: WooCommerce –> Settings –> Generell –> Number of Decimals If you do not want to show decimals in your prices to your customers we recommend you to use this snippet in your functions.php file or in a separate plugin: /** * Trim zeros in price decimals **/ add_filter( 'woocommerce_price_trim_zeros', '__return_true' );