Paytrail payment processor

Development Status
Stable
Active Installs
Downloaden

Last updated: 2014-03-31

Works with CiviCRM 4.4. It might not be supported anymore.

CiviCRM Payment Processor for Paytrail (formerly Suomen Verkkomaksut). It uses Paytrail REST API and includes Paytrail REST PHP Module file. Default Paytrail API mode is E1. This payment processor support embedded payment buttons /default mode) and full page redirect to Paytrail payment selection page.

This payment processor is only tested with Dupal 7 and CiviCRM 4.4.

Version history

  • v1.4 Added configurations settings page
  • v1.3 Added embedded payment buttons support
  • v1.2 Added E1 API mode support and configuration support
  • v1.1 Licence change to GNU Affero General Public License
  • v1.0 Initial realease

Information sent to Paytrail

This payment processor can use S1 or E1 version of payment API.

In S1 version only order number (CiviCRM invoice id) and amount is sent to Paytrail. This means there is no information about contribution or event visible in Paytrail admin site other than CiviCRM invoice id.

In E1 version there is a lot more info that is sent to Paytrail. Required fields by E1 API:

  • Order number (CiviCRM invoice id)
  • First name
  • Last name
  • Email
  • Street address
  • Post code
  • Post office
  • Country
  • Product title
  • Product quantity
  • Product price
  • Tax (VAT)

Transaction identification

CiviCRM contribution invoice id is sent to Paytrail as transaction identification ORDER_NUMBER-field. This order id/invoice id is visible in CiviCRM contribution information. This links Paytrail transaction to CiviCRM transaction.

Restrictions

  • Paytrail only supports payments in Euros
  • Paytrail and this payment processor does not support recurring payments

Installation

  1. Create com.github.anttikekki.payment.paytrailfolder to CiviCRM extensiondirectory and copy files into it. Extension directory has to be configured in Administer->Configure->Global Settings->Directories->CiviCRM Extensions Directory.

  2. Copy PaytrailIPN.php, PaytrailNotify.phpand Verkkomaksut_Module_Rest.phpto CiviCRM externdirectory. Extern directory is in [JOOMLA_DIRECTORY]/administrator/components/com_civicrm/civicrm/externin Joomla and [DRUPAL_DIRECTORY]/sites/all/modules/civicrm/externin Drupal. There must also be copy of Verkkomaksut_Module_Rest.phpin com.github.anttikekki.payment.paytrail(yep, same file in two places).

  3. Configure payment processor CiviCRM common settings in Administer->System Settings->Payment processors. You need to insert Merchant idand information that Paytrail has provided. URL field can be left blank. To test payment processor you can use test id from Paytrail docs.

  4. Configure Paytrail spesific settings in Administer->Paytrail->Settings

Licence

GNU Affero General Public License

Embedded payment buttons

Embedded payment buttons require product price and unique invoice id (in S1 mode. A lot more info is required in E1 mode). This means that embedded buttons can not be shown in main Contribution or Event page. Buttons are embedded to confirmation page because of this limitation. Confirmation page has to be enabled in Contribution page settings. All other content in confirmation page is removed.

Embedded buttons are enabled by default. Full page redirect to Paytrail payment selection page can be activated in configuration.

Configuration

Payment processor can be configured and customized by adding rows to civicrm_paytrail_payment_processor_configtable in settings page at Administer->Paytrail->Settings. Payment processor default configurations are visible in settings page.

Configuration allows to customize data sent to Paytrail in E1 API mode. Default values for all payments are handy if all required values are not in Contribution page form or Event page form.

Configurations have priority: 1. Values in database 2. Values in Contribution or Event page form 3. Default values in PaytrailConfigHelper.php

This priority order means that database configuration always overwrites other values. If value from database is not found then value from Contribution or Event page is used. PaytrailConfigHelper.php defaults are used only if everything else fails.

Full list of all configuration keys is in this payment processor homepage.