digitalhydra / clipclap-magento-gateway
Extencion para agregar la Billetera ClipClap como metodo de pago
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Type:magento2-module
pkg:composer/digitalhydra/clipclap-magento-gateway
Requires
- php: ~5.5.0|~5.6.0|~7.0.0
- magento/framework: *
- magento/magento-composer-installer: *
- magento/module-checkout: *
- magento/module-payment: *
- magento/module-sales: *
This package is not auto-updated.
Last update: 2025-10-31 23:11:26 UTC
README
Extencion para agregar la Billetera ClipClap como metodo de pago
Technical feature
Configuracion del modulo
- El modulo se instala atraves de composer
- Se debe modificar el archivo composer.json
Gateway configuration
Let's look into configuration attributes:
debugenables debug mode by default, e.g log for request/responseactiveis payment active by defaultmodelPayment Method Facadeused for integration withSalesandCheckoutmodulesmerchant_gateway_keyencrypted merchant credentialorder_statusdefault order statuspayment_actiondefault action of paymenttitledefault title for a payment methodcurrencysupported currencycan_authorizewhether payment method supports authorizationcan_capturewhether payment method supports capturecan_voidwhether payment method supports voidcan_use_checkoutcheckout availabilityis_gatewayis an integration with gatewaysort_orderpayment method order position on checkout/system configuration pagesdebugReplaceKeysrequest/response fields, which will be masked in logpaymentInfoKeystransaction request/response fields displayed on payment information blockprivateInfoKeyspaymentInfoKeys fields which should not be displayed in customer payment information block
Dependency Injection configuration
To get more details about dependency injection configuration in Magento 2, please see DI docs.
In a case of Payment Gateway, DI configuration is used to define pools of Gateway Commands with related infrastructure and to configure Payment Method Facade (used by Sales and Checkout modules to perform commands)
Payment Method Facade configuration:
<!-- Payment Method Facade configuration --> <virtualType name="ClipClapGatewayFacade" type="Magento\Payment\Model\Method\Adapter"> <arguments> <argument name="code" xsi:type="const">\Magento\ClipClapGateway\Model\Ui\ConfigProvider::CODE</argument> <argument name="formBlockType" xsi:type="string">Magento\Payment\Block\Form</argument> <argument name="infoBlockType" xsi:type="string">Magento\ClipClapGateway\Block\Info</argument> <argument name="valueHandlerPool" xsi:type="object">ClipClapGatewayValueHandlerPool</argument> <argument name="commandPool" xsi:type="object">ClipClapGatewayCommandPool</argument> </arguments> </virtualType>
codePayment Method codeformBlockTypeBlock class name, responsible for Payment Gateway Form rendering on a checkout. Since Opepage Checkout uses knockout.js for rendering, this renderer is used only during Checkout process from Admin panel.infoBlockTypeBlock class name, responsible for Transaction/Payment Information details rendering in Order block.valueHandlerPoolValue handler pool used for queries to configurationcommandPoolPool of Payment Gateway commands
Pools
! All
Payment\Gatewayprovided pools implementations use lazy loading for components, i.e configured with component type name instead of component object
Value Handlers
There should be at least one Value Handler with default key provided for ValueHandlerPool.
!-- Value handlers infrastructure --> <virtualType name="ClipClapGatewayValueHandlerPool" type="Magento\Payment\Gateway\Config\ValueHandlerPool"> <arguments> <argument name="handlers" xsi:type="array"> <item name="default" xsi:type="string">ClipClapGatewayConfigValueHandler</item> </argument> </arguments> </virtualType> <virtualType name="ClipClapGatewayConfigValueHandler" type="Magento\Payment\Gateway\Config\ConfigValueHandler"> <arguments> <argument name="configInterface" xsi:type="object">ClipClapGatewayConfig</argument> </arguments> </virtualType>
Commands
All gateway commands should be added to CommandPool instance
<!-- Commands infrastructure --> <virtualType name="ClipClapGatewayCommandPool" type="Magento\Payment\Gateway\Command\CommandPool"> <arguments> <argument name="commands" xsi:type="array"> <item name="authorize" xsi:type="string">ClipClapGatewayAuthorizeCommand</item> <item name="capture" xsi:type="string">ClipClapGatewayCaptureCommand</item> <item name="void" xsi:type="string">ClipClapGatewayVoidCommand</item> </argument> </arguments> </virtualType>
Example of Authorization command configuration:
<!-- Authorize command --> <virtualType name="ClipClapGatewayAuthorizeCommand" type="Magento\Payment\Gateway\Command\GatewayCommand"> <arguments> <argument name="requestBuilder" xsi:type="object">ClipClapGatewayAuthorizationRequest</argument> <argument name="handler" xsi:type="object">ClipClapGatewayResponseHandlerComposite</argument> <argument name="transferFactory" xsi:type="object">Magento\ClipClapGateway\Gateway\Http\TransferFactory</argument> <argument name="client" xsi:type="object">Magento\ClipClapGateway\Gateway\Http\Client\ClientMock</argument> </arguments> </virtualType> <!-- Authorization Request --> <virtualType name="ClipClapGatewayAuthorizationRequest" type="Magento\Payment\Gateway\Request\BuilderComposite"> <arguments> <argument name="builders" xsi:type="array"> <item name="transaction" xsi:type="string">Magento\ClipClapGateway\Gateway\Request\AuthorizationRequest</item> <item name="mockData" xsi:type="string">Magento\ClipClapGateway\Gateway\Request\MockDataRequest</item> </argument> </arguments> </virtualType> <type name="Magento\ClipClapGateway\Gateway\Request\AuthorizationRequest"> <arguments> <argument name="config" xsi:type="object">ClipClapGatewayConfig</argument> </arguments> </type> <!-- Response handlers --> <virtualType name="ClipClapGatewayResponseHandlerComposite" type="Magento\Payment\Gateway\Response\HandlerChain"> <arguments> <argument name="handlers" xsi:type="array"> <item name="txnid" xsi:type="string">Magento\ClipClapGateway\Gateway\Response\TxnIdHandler</item> <item name="fraud" xsi:type="string">Magento\ClipClapGateway\Gateway\Response\FraudHandler</item> </argument> </arguments> </virtualType>
ClipClapGatewayAuthorizeCommand- instance of GatewayCommand provided byPayment\Gatewayconfigured with request builders, response handlers and transfer clientClipClapGatewayAuthorizationRequest- Composite of request parts used for AuthorizationClipClapGatewayResponseHandlerComposite- Composite\List of response handlers.
Installation
This module is intended to be installed using composer. After including this component and enabling it, you can verify it is installed by going the backend at: STORES -> Configuration -> ADVANCED/Advanced -> Disable Modules Output Once there check that the module name shows up in the list to confirm that it was installed correctly.
Tests
Unit tests could be found in the Test/Unit directory.
Contributors
Magento Core team