Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/check available gateways from api #78

Merged
merged 25 commits into from
Jan 29, 2025

Conversation

malmo-monei
Copy link
Collaborator

  • Introduction of autoloader, remove part of hardcoded require of files
  • Use of PSR folder structure, Standardized class names to follow consistent naming conventions
  • Added PHP-DI as the dependency injection container to streamline dependency resolution.
  • Implemented ContainerProvider as a singleton for global access to the DI container.
  • Dynamically registered services and classes, including gateways and block support classes:
    • Services: PaymentMethodsService, BlockSupportService
    • Gateways: Automatically resolved WCGatewayMonei[PaymentMethod]
    • Blocks: Automatically resolved Monei[PaymentMethod]BlocksSupport
  • Improved scalability and maintainability by removing hardcoded instantiations and centralizing dependency management.
  • Refactored existing code to resolve dependencies via the container.
  • Implement repository to fetch payment method availability via API so checks are dynamically fetched based on merchant data
  • Use the availability method in frontend admin, and both checkout pages

# Conflicts:
#	includes/MoneiBizumBlocksSupport.php
#	includes/MoneiMBWayBlocksSupport.php
#	includes/MoneiMultibancoBlocksSupport.php
#	includes/class-monei-cc-blocks.php
#	includes/payment-methods/class-wc-gateway-monei-cc.php
# Conflicts:
#	src/Gateways/Abstracts/WCMoneiPaymentGatewayHosted.php
…m-API' into fix/wp-code-standards

# Conflicts:
#	assets/js/monei-cc-classic.js
#	composer.json
#	composer.lock
#	includes/AppleGoogleBlocksSupport.php
#	includes/MoneiBizumBlocksSupport.php
#	includes/MoneiMBWayBlocksSupport.php
#	includes/MoneiMultibancoBlocksSupport.php
#	includes/class-monei-cc-blocks.php
#	includes/payment-methods/MoneiAppleGoogleGateway.php
#	includes/payment-methods/MoneiMBWay.php
#	includes/payment-methods/MoneiMultibanco.php
#	includes/payment-methods/class-wc-gateway-monei-cc.php
#	includes/payment-methods/class-wc-gateway-monei-hosted-bizum.php
#	includes/payment-methods/class-wc-gateway-monei-hosted-cofidis.php
#	includes/payment-methods/class-wc-gateway-monei-hosted-paypal.php
#	src/Gateways/Abstracts/WCMoneiPaymentGateway.php
#	src/Gateways/Abstracts/WCMoneiPaymentGatewayComponent.php
#	src/Gateways/Abstracts/WCMoneiPaymentGatewayHosted.php
#	src/Settings/MoneiSettings.php
@malmo-monei malmo-monei marked this pull request as ready for review January 29, 2025 17:01
@malmo-monei malmo-monei merged commit 34170df into master Jan 29, 2025
1 check passed
@malmo-monei malmo-monei deleted the fix/check-available-gateways-from-API branch January 29, 2025 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant