This is the PHP SDK for PayZippy Merchant API.
-
Clone the repository to get php-sdk folder having index.php file, examples and payzippy-sdk folders.
-
To use the sample code, copy the payzippy files & directories to a directory of your choice. It can be server's document root of you web server. (i.e. where your current php files, for your website, are stored)
-
Open php-sdk/payzippy-sdk/Config.php file and set up your config details such as Merchant ID, Secret Key, Callback URL. The examples won't work without setting up the config details. You can also set the UI mode to redirect or iframe (details in point 6).
-
For the examples included, the callback url should point to the charging_response.php file under examples/response folder. So, if you access your site locally as http://localhost/, then callback url http://localhost/php-sdk/examples/response/charging_response.php
-
You can see SDKs brief documentation by browsing to http://localhost/php-sdk. All the example will be available there in the "SDK Integration Examples" link in the header.
-
There are 3 examples included for using the Charging API.
charging-redirect - Using this example, when the user clicks on Buy button, he would be redirected to Payzippy's website to enter his card details.
charging-iframe - Using this example, when the user clicks on Buy button, the form to enter his card details would be displayed inside your HTML iframe element.
charging-master - This is the master example and has all parameters that you can pass to the charging API.
-
Further documentation on creating a charging request, parsing the response are included in the corresponding code files.