Symfony External Library - Payone

Has anyone ever used Symfony in conjunction with payone (payone.de)?

I got the SDK and it has js, locale and php folders.

My problem: I really don't know how to include / use them in my project (inexperienced in Symfony), because I don't know where I should put it and how to include it. I read about startup, but since the SDK does not meet the standards necessary (regarding the folder structure), I think this is not the way to go.

+4
source share
1 answer

You can automatically load all classes using psr-0 if the classes follow a non-naming convention of type WPAR.

To control the loading of the provider through the composer, you can directly define the package in composer.json .

 { "repositories": [ { "type": "package", "package": { "name": "payone/php-sdk", "version": "1.0.0", "dist": { "url": "http://github.com/PAYONE/PHP-SDK/archive/master.zip", "type": "zip" }, "autoload": { "psr-0": { "Payone_": "php/" } } } } ], "require": { "payone/php-sdk": "1.0.*" } } 

Note. This type of repository has several limitations and should be avoided when possible:

  • Composer will not update the package unless you change the version field.
+4
source

Source: https://habr.com/ru/post/1491828/


All Articles