4

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

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

My problem: I don't really know how to include/use them in my project(inexperienced in Symfony) because I don't know where I should place it and how to include it. I read about the auto loader but since the SDK doesn't follow the standards needed(concerning folder structure) I guess it's not the way to go.

Simon H
  • 2,495
  • 4
  • 30
  • 38
Evo_x
  • 2,997
  • 5
  • 24
  • 40
  • if the classes are following the PEAR-style non-namespaced convention, you can use psr-0 autoloading too. See my edited answer. – Emii Khaos Jul 17 '13 at 10:40
  • Do you use really payone.com or the SDK from payone.de it sound a bit like the payone.de SDK. – René Höhle Jul 17 '13 at 11:14
  • Well, I just looked it up and it's actually the one from payone.de - sorry for the confusion. – Evo_x Jul 17 '13 at 11:27

1 Answers1

4

You can autoload all classes with the psr-0 too if the classes are following the PEAR-style non-namespaced convention.

To manage the vendor download via composer, you can define a package in your composer.json directly.

{
    "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 repository type has a few limitations and should be avoided whenever possible:

  • Composer will not update the package unless you change the version field.
Emii Khaos
  • 9,983
  • 3
  • 34
  • 57