Graph-IT

The Payment-Api

Installation

composer create-project -s dev screwerk/payment-api <paymentApiDir>

Update apache.conf

Alias / "<paymentApiDir>/web"
  <Directory "<paymentApiDir>/web">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    require all granted
  </Directory>

Configuration services.json

paymentUser

Users that are granted to use the payment-API are listed by username and password hash. The hash has to be created with the PHP function password_hash() as authentication is done by the PHP function password_verify(). User and password have to be transmitted with every API request.

paymentMethods

Currently 3 payment methods are available in the payment-API: PayPal and two credit card providers: PayONE and Authorize.net

paymentService

Declare method and name in the paymentService section.

The services are configured in subject to the user and individual parameters of the payment method.

Translations

php-files for translations are stored in

translations/paymentapi.<locale>.php

Files are included.

Make sure that the destination path for the paymentapi is added in the push-script (if the translations should be pushed by the x.graph-it.com ameise-module)

ssh x.graph-it.com
cd /home/graph-it/graph/module/ameise/bin
nano push_translations.php

Run webpack to enable js

cd web-src
npm install
npm run build