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:
- Initializing the database
- Adding a workflow and setting up a trigger
- 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
- Bring up a system command line / shell.
- Navigate into the "sql" directory of the "Paynet Direct" extension.
- 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
- Bring up a system command line / shell.
- Navigate into the "sql" directory of the "Paynet Direct" extension.
- 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
- Log into the administration interface.
- Click on the "Setup" tab.
- Click on "Workflows" in the menu on the left.
- Navigate into one of the existing workflow groups or create a new group.
- Create a new workflow.
- Enter a suitable name, for example "Paynet Direct Workflow".
- Select the "Paynet / Direct Payment" event using the dropdown menu.
- Click the "Add event" button.
- Click "OK".
Adding the trigger
- Log into the administration interface.
- Click on the "Setup" tab.
- Click on "Triggers" in the menu on the left.
- Select the previously created workflow ("Paynet Direct Workflow") for the "shop/checkout/before" trigger.
- 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)
Comments
There are no comments.