Skip to content

Commit

Permalink
Update Sample App and Instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
zamzar-miked committed May 7, 2021
1 parent f59c447 commit 2e5bee5
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 91 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 1.00 - 2021-05-07
## 1.0.1 - 2021-05-07
* Updated the sample app and instructions

## 1.0.0 - 2021-05-07
* Initial release of the Zamzar SDK for PHP
* Consolidated documentation
22 changes: 2 additions & 20 deletions examples/zamzar-php-sampler/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,14 @@
"api"
],
"homepage": "https://www.zamzar.com/",
"license": "MIT",
"license": "Apache-2.0",
"authors": [
{
"name": "Zamzar",
"homepage": "https://github.com/zamzar/zamzar-php/examples/zamzar-php-sampler"
}
],
"require": {
"php": ">=7.2.5",
"ext-json": "*",
"guzzlehttp/guzzle": "^7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.5"
},
"autoload": {
"psr-4": {
"Zamzar\\": "lib/"
},
"files": [
"init.php"
]
},
"autoload-dev": {
"psr-4": {
"Zamzar\\": "tests/"
}
"zamzar/zamzar-php": ">=1.0.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

return array(
'document-root' => $_SERVER['DOCUMENT_ROOT'],
'init-php' => $_SERVER['DOCUMENT_ROOT'] . '/init.php',
'autoload' => $_SERVER['DOCUMENT_ROOT'] . '/vendor/autoload.php',
'project-folder' => '',
'api-key' => '',
Expand Down
61 changes: 0 additions & 61 deletions examples/zamzar-php-sampler/init.php

This file was deleted.

39 changes: 31 additions & 8 deletions examples/zamzar-php-sampler/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,37 @@ The SDK Sampler App was built using the PHP-SDK to demonstrate all the key areas

## Installing the App

1. Download the <code>zamzar-php-sampler</code> folder
2. <code>cd</code> to <code>zamzar-php-sampler</code>
2. <code>composer require zamzar/zamzar-php</code>
3. Rename <code>config_template.php</code> to <code>config.php</code>
4. Update the <code>config.php</code> file with your <code>api-key</code> and indicate if you want to use the <code>sandbox</code> or <code>production</code> environment
4. Start <code>php -S localhost:8000</code>
5. Open http://localhost:8000 in your browser
1. Download the [latest release](https://github.com/zamzar/zamzar-php/releases) of the library which includes the sample app.

2. In a console window, navigate to the sample app folder:

```
cd downloads/zamzar-php-x.x.x/examples/zamzar-php-sampler
```
3. Install the Zamzar Library and associated dependencies using composer:
```
composer require zamzar/zamzar-php
```
4. Update the <code>config.php</code> in the root of the app:
```
'api-key' => 'your_api_key',
'environment' => 'sandbox', // or production
```
5. Start a PHP Server
```
php -S localhost:8000
```
6. Open [http://localhost:8000](http://localhost:8000) in your browser
The home page of the app explains the features.
## Additional Information
View the [SDK Code Samples](/docs/samples.md) for more examples or view the [SDK Guide](/docs/guide.md) for more in-depth information.
View the [SDK Code Samples](/samples.md) for more examples.

0 comments on commit 2e5bee5

Please sign in to comment.