alperragib / ticimax-php-service
A PHP library for integrating with the Ticimax SOAP API.
Package info
github.com/alperragib/TicimaxPhpServiceProject
pkg:composer/alperragib/ticimax-php-service
v1.1.0
2025-08-04 16:08 UTC
Requires
- php: >=7.4
- ext-mbstring: *
- ext-soap: *
README
A modern PHP SDK for interacting with Ticimax E-commerce Web Services. Built with modern PHP practices, strict typing, and clean architecture.
Features
- π Modern PHP 7.4+ with strict typing
- π― PSR-4 autoloading compliant
- π Comprehensive API service coverage
- π‘οΈ Robust error handling and responses
- π¦ Consistent model structure
- π§ Easy configuration and setup
Installation
composer require alperragib/ticimax-php-service
Quick Start
use AlperRagib\Ticimax\Ticimax; // Initialize the client $ticimax = new Ticimax('https://your-store.com', 'your-api-key'); // Get product service $productService = $ticimax->productService(); // Fetch products with filters $filters = [ 'Aktif' => 1, // -1: no filter, 0: false, 1: true 'Firsat' => -1, // -1: no filter, 0: false, 1: true 'Indirimli' => -1, // -1: no filter, 0: false, 1: true 'Vitrin' => -1, // -1: no filter, 0: false, 1: true 'KategoriID' => 0, // 0: no filter 'MarkaID' => 0, // 0: no filter 'UrunKartiID' => 0, // 0: no filter 'ToplamStokAdediBas' => null, // Starting stock amount (double) 'ToplamStokAdediSon' => null, // Ending stock amount (double) 'TedarikciID' => 0, // 0: no filter 'Dil' => 'tr', ]; $pagination = [ 'BaslangicIndex' => 0, 'KayitSayisi' => 10, 'KayitSayisinaGoreGetir' => true, 'SiralamaDegeri' => 'Sira', 'SiralamaYonu' => 'ASC', ]; $response = $productService->getProducts($filters, $pagination); if ($response->isSuccess()) { foreach ($response->data as $product) { echo ( ($product->UrunAdi ?? '[No UrunAdi]') . ' (ID: ' . ($product->ID ?? '[No ID]') . ', ToplamStokAdedi: ' . ($product->ToplamStokAdedi ?? '[No ToplamStokAdedi]') . ")\n" ); } }
Available Services
- ποΈ Products (
ProductService)- Product management
- Variations
- Favorite products
- π Categories (
CategoryService) - π’ Brands (
BrandService) - π¦ Orders (
OrderService) - π₯ Users (
UserService) - π Locations (
LocationService) - πͺ Suppliers (
SupplierService) - π Menus (
MenuService)
Detailed Usage
User Operations
// User authentication $userService = $ticimax->userService(); $loginResponse = $userService->login('user@example.com', 'password'); ## Error Handling The SDK uses a consistent response structure through the `ApiResponse` class: ```php if ($response->isSuccess()) { $data = $response->getData(); } else { echo "Error: " . $response->getMessage(); }
Configuration
Create a configuration file:
// config.php define('TICIMAX_MAIN_DOMAIN', 'https://your-store.com'); define('TICIMAX_API_KEY', 'your-api-key');
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
- Check the examples directory for more usage examples
- Submit issues through GitHub
- Follow PSR-12 coding standards when contributing
Requirements
- PHP 7.4 or higher
- SOAP extension
- JSON extension
- Composer