PHP code example of esatic / interservice

1. Go to this page and download the library: Download esatic/interservice library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

esatic / interservice example snippets




namespace YourVendor\YourModule\Model;


class GetCityCode implements \Esatic\Interservice\Model\GetCityCodeInterface{


    /**
     * Get city code for use in shipping method
     * @param string $regionId
     * @param string $city the city name for search
     * @return string|null
     * @throws \Exception if the city has not been found
     */
    public function execute(string $regionId, string $city): ?string{
        //Here return your city code
        return '1234567';
    }
    

}