diff --git a/README.md b/README.md index 9ebd418..6b2b605 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,49 @@ maksekeskus-php =============== +#Installation + +## Composer + +``` json +{ + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/maksekeskus/maksekeskus-php" + } + ], + "require": { + "maksekeskus/maksekeskus-php": "v1.1" + } +} +``` + +## Prebuilt packages + Download the packaged library form the repository [releases] (https://github.com/maksekeskus/maksekeskus-php/releases/). Unpack it into your project folder (i.e. /htdocs/myshop/ ) -and include the libarary file ( i.e. /htdocs/myshop/Maksekeskus-1.0/Maksekeskus.php ) +and include the libarary file ( i.e. /htdocs/myshop/Maksekeskus-1.1/Maksekeskus.php ) Get your API keys from [merchant.maksekeskus.ee](https://merchant.maksekeskus.ee) or [merchant-test.maksekeskus.ee](https://merchant-test.maksekeskus.ee) -And off you go: +# Example + ``` php "; ?> - - ``` See more examples on https://maksekeskus.ee/api-explorer/intro.php diff --git a/bin/createdist.sh b/bin/createdist.sh index 115b6d6..43d1ae6 100755 --- a/bin/createdist.sh +++ b/bin/createdist.sh @@ -14,10 +14,11 @@ VERSION=$1 rm -rf maksekeskus-$VERSION mkdir maksekeskus-$VERSION/ -cp -rp lib/* maksekeskus-$VERSION/ +cp -rp lib maksekeskus-$VERSION/ +cp composer.json maksekeskus-$VERSION/ cd maksekeskus-$VERSION/ -composer install +composer install --no-dev rm composer.lock composer.json cd .. diff --git a/lib/composer.json b/composer.json similarity index 80% rename from lib/composer.json rename to composer.json index 5c5ed09..68f9db8 100644 --- a/lib/composer.json +++ b/composer.json @@ -2,6 +2,7 @@ { "name": "maksekeskus/maksekeskus-php", "description": "Maksekeskus PHP SDK", + "type": "library", "keywords": [ "maksekeskus", "billing", @@ -23,6 +24,9 @@ "ext-json": "*" }, "autoload": { - "classmap": [""] - } + "psr-4": { + "Maksekeskus\\": "lib/" + } + }, + "minimum-stability": "dev" } diff --git a/lib/Maksekeskus.php b/lib/Maksekeskus.php index 1d40896..8cb2d9a 100644 --- a/lib/Maksekeskus.php +++ b/lib/Maksekeskus.php @@ -1,8 +1,7 @@