iyzico-iyzipay-client
Description
A TypeScript client for the iyzipay API.
Note: Project doesn't cover all scenarios, only covers some subscription functionalities.
Features
- Request Interception: Custom interceptors for modifying and handling outgoing requests.
- Header Generation: Dynamic header generation strategies for different versions.
- Utility Functions: Common utilities for request handling and header generation.
File Structure
src
├── constants.ts
├── interceptors
│ └── iyzicoRequestInterceptor.ts
├── index.ts
├── utils
│ ├── headerGenerator
│ │ ├── IyzicoHeaderGenerator.ts
│ │ ├── IyzicoHeaderGenerator.types.ts
│ │ ├── strategies
│ │ │ ├── v1.ts
│ │ │ └── v2.ts
│ └── utils.ts
constants.ts
Contains constant values used across the project.
index.ts
The entry point of the application, initializing and running the core functionalities.
interceptors/iyzicoRequestInterceptor.ts
Defines an interceptor to handle and modify Iyzico API requests.
utils/utils.ts
Contains utility functions that are commonly used throughout the project.
utils/headerGenerator/IyzicoHeaderGenerator.ts
Implements the logic for generating authorization headers required by Iyzico.
utils/headerGenerator/IyzicoHeaderGenerator.types.ts
Defines types and interfaces used by the header generator.
utils/headerGenerator/strategies/v1.ts
Implements version 1 strategy for header generation.
utils/headerGenerator/strategies/v2.ts
Implements version 2 strategy for header generation.
Installation
To set up the project locally, follow these steps:
Clone the repository:
git clone https://github.com/centrual/iyzico-iyzipay-client.git cd iyzico-iyzipay-client
Install dependencies:
yarn install
Usage
Compile the project:
yarn compile
Lint the project:
yarn lint
Fix linting issues:
yarn fix
Run the tests:
yarn test
Contributing
- Fork the repository
- Create a new branch (
git checkout -b feature-branch
) - Make your changes
- Commit your changes (
git commit -m 'Add some feature'
) - Push to the branch (
git push origin feature-branch
) - Open a pull request
License
This project is licensed under the MIT License.
Author
{'name': 'Oğuz Özcan', 'email': 'oguz.ozcan@vennyx.com', 'url': 'https://github.com/centrual'}