Installing SDK on windows Server with Integrated Development Enviroment(IDE)
These steps are dedicated to those who ❤️ to code on IDE.
Optional Note: This library will be sending HTTP calls to Pepipost server and hence if you're running any firewalls on your machine, then please whitelist the API base URL
api.pepipost.com
withport 443/80
-
Please Follow first 3 Steps of installation same as Windows without IDE
-
Install any IDE you Love to work with.
we will be using PHPstorm which is easily available on https://www.jetbrains.com/phpstorm/download/
-
The following section explains how to use the PepipostAPI library in a new project.
3.1. Open Project in an IDE: Open an IDE for PHP like PhpStorm. The basic workflow presented here is also applicable if you prefer using a different editor or IDE.
Click on
Open
in PhpStorm to browse to your generated SDK directory and then clickOK
.
3.2. Add a new Test Project: Create a new directory by right clicking on the solution name as shown below:
Name the directory as "test"
Add a PHP file to this project
Name it "testSDK"
Depending on your project setup, you might need to include composer's autoloader in your PHP code to enable auto loading of classes.
require_once "../vendor/autoload.php";
It is important that the path inside require_once correctly points to the file autoload.php
inside the vendor directory created during dependency installations.
After this you can add code to initialize the client library and acquire the instance of a Controller class. Sample code to initialize the client library and using controller methods is given in the subsequent sections.
3.3. Run the Test Project: To run your project you must set the Interpreter for your project. Interpreter is the PHP engine installed on your computer.
Select PHP
from within Languages & Frameworks
Browse for Interpreters near the Interpreter
option and choose your interpreter.
Once the interpreter is selected, click OK
Copy/Paste sample example from simpleUsage.md to the file and Save.
To run your project, right click on your PHP file inside your Test project and click on Run