-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat(core): enhance DataVault integration, certificate handling, and test suite #12
Conversation
- Added new `config.ts` for centralized configuration management - Added `check-certificates.ts` example for certificate validation - Updated API client to support certificate configuration - Enhanced `.env.sample` with certificate-related variables This improves certificate handling and provides better examples for users implementing certificate-based authentication.
- Update DataVault schemas to include required fields (channel, store) - Add proper type definitions for Create and Delete operations - Improve ProcessPaymentSchema to handle DataVault tokens correctly - Split into BasePaymentSchema, CardPaymentSchema and TokenPaymentSchema - Add proper validation for token-based payments - Update field constraints (altMerchantName: 25 chars, dataVaultToken: 36 chars) - Remove DataVaultTransaction enum in favor of literal types - Fix documentation comments and typos
- Add test card fixtures with consistent test data - Create utility functions for common test assertions: - expectSuccessfulPayment - expectSuccessfulVerification - expectSuccessfulVaultResponse - expectSuccessfulVoid - expectValidationError - expectOrderIds - Update all integration tests to use shared test cards and assertions - Add proper type guards and response type definitions - Handle temporary system errors (91) gracefully with warnings - Improve test descriptions and organization
- Create new example script for end-to-end payment processing - Demonstrate key Azul API workflows: hold, post, and verification - Include environment configuration logging and error handling - Use test card fixture and random order ID for realistic scenario
- Replace hardcoded environment variables with CONFIG import - Leverage centralized configuration for test API instance setup - Improve consistency with recent configuration management changes
- Remove test case for non-PEM certificate file - Simplify test suite by eliminating redundant error handling scenario - Maintain core certificate error testing logic
- Add environment and channel configuration options - Clarify certificate and key input methods - Update payment method example with more detailed parameters - Improve documentation for API initialization and usage
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i was review this changes and test working really well an exception for 3ds example apper a validation error PostInputMode when i test, i fixed it and created a example workflow to data-vault
Feel free to open a PR, I'll review & merge it 💯 |
This PR introduces major improvements to the core functionality and test infrastructure:
DataVault Integration
channel
,store
,saveToDataVault
cardNumber
andexpiration
when using tokensCertificate Management
src/config.ts
:examples/check-certificates.ts
)Schema Improvements
CardPaymentSchema
andTokenPaymentSchema
Test Suite Enhancements
Error Handling
Documentation
.env.sample
with certificate configurationThis update significantly improves the reliability and maintainability of the codebase, particularly in areas of DataVault integration, certificate handling, and test infrastructure.