Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

Installation

The requirements for using the "Paynet Direct" extension must be met. Please refer to the previous section if you are not sure about the requirements. The extension must be extracted and activated. Please refer to the "Extensions" section of the "Installation" chapter within the technical manual of eZ Publish for more information about these operations. This section will guide you through the following steps:

  1. Initializing the database
  2. Adding a workflow and setting up a trigger
  3. Configuring the extension

Initializing the database

The "Paynet direct" extension makes use of two custom database tables:

  • ezcreditcard_info
  • ezpaynetdirect_transaction

These tables must be added using the SQL scripts that come with the extension; they are located within the "sql" subdirectory of the extension (for example: "/path/to/ez_publish/extensions/ezpaynetdirect/sql"). Please refer to the instructions above for creating the tables on a MySQL or a PostgreSQL database.

MySQL database

  1. Bring up a system command line / shell.
  2. Navigate into the "sql" directory of the "Paynet Direct" extension.
  3. Run the "create-tables.sql" script:
    $ mysql -u <username> -p<password> <database> < create-tables.sql
    

username

The MySQL user (if no user is set up, use "root").

password

The password that belongs to the username.

database

The name of the database, for example "my_database".

PostgreSQL database

  1. Bring up a system command line / shell.
  2. Navigate into the "sql" directory of the "Paynet Direct" extension.
  3. Run the "create-tables.psql" script:
    $ psql <database> <username> < create-tables.psql
    

username

The PostgreSQL user.

database

The name of the database, for example "my_database".

Adding a workflow and setting up a trigger

The "Paynet Direct" extension integrates into eZ Publish through a workflow event. This means that a new workflow must be created and assigned to a trigger. The following text explains how this can be done.

Adding the workflow

  1. Log into the administration interface.
  2. Click on the "Setup" tab.
  3. Click on "Workflows" in the menu on the left.
  4. Navigate into one of the existing workflow groups or create a new group.
  5. Create a new workflow.
  6. Enter a suitable name, for example "Paynet Direct Workflow".
  7. Select the "Paynet / Direct Payment" event using the dropdown menu.
  8. Click the "Add event" button.
  9. Click "OK".

Adding the trigger

  1. Log into the administration interface.
  2. Click on the "Setup" tab.
  3. Click on "Triggers" in the menu on the left.
  4. Select the previously created workflow ("Paynet Direct Workflow") for the "shop/checkout/before" trigger.
  5. Click "Apply changes".

Modifying the certificate

From paynet you got one zip file with several certificates. Only the file that ends with: "keycert.pem" should be copied in the settings directory of the PaynetDirect extension. Hereafter rename this file so that it ends with php (For example: MySite-keycert.pem.php).

The next step is to add the php-opening, php-closing, and comment tags to this certificate file. Open the certificate with your favorite editor and
add the following two lines to the beginning of the file:

<?php
/*

At the end of the file add the following lines:

*/
?>

So the complete certificate should look like:

<?php
/*
-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQCkkaPKumTOGkYDYd1YnJKmsEINbkSfr/aSqBm4U0mS3W8DDtHn
...
< snip >
...
dICl058wh1492fFR36aW9f2Zx4lYD8y+V05RIUQcRMzb
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIICVjCCAb8CARUwDQYJKoZIhvcNAQEEBQAwdTELMAkGA1UEBhMCTk8xDTALBgNV
...
< snip >
...
lHoA0QkxCwUJ0ApaH6k5sP7OSF5XPw2qNCQ=
-----END CERTIFICATE-----
*/
?>

Raymond Bosman (31/03/2005 2:44 pm)

Julia Shymova (18/09/2007 2:53 pm)

Balazs Halasy, Raymond Bosman, Julia Shymova


Comments

There are no comments.