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

[ECP-9203]- Add support for UPI Payment Method India. #2646

Merged
merged 3 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2159,6 +2159,28 @@
<is_wallet>1</is_wallet>
<group>adyen-alternative-payment-method</group>
</adyen_wallet_IN>
<adyen_upi>
<active>0</active>
<model>AdyenPaymentUpiFacade</model>
<title>UPI Payment Method India</title>
<allowspecific>0</allowspecific>
<sort_order>0</sort_order>
<payment_action>authorize</payment_action>
<can_initialize>1</can_initialize>
<can_use_checkout>1</can_use_checkout>
<can_capture>1</can_capture>
<can_capture_partial>0</can_capture_partial>
<can_use_internal>0</can_use_internal>
<can_refund_partial_per_invoice>1</can_refund_partial_per_invoice>
<can_refund>1</can_refund>
<can_void>1</can_void>
<can_cancel>1</can_cancel>
<supports_recurring>0</supports_recurring>
<supports_manual_capture>1</supports_manual_capture>
<supports_auto_capture>1</supports_auto_capture>
<is_wallet>0</is_wallet>
<group>adyen-alternative-payment-method</group>
</adyen_upi>
</payment>
</default>
</config>
27 changes: 27 additions & 0 deletions etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4155,4 +4155,31 @@
<argument name="methodCode" xsi:type="string">adyen_wallet_IN</argument>
</arguments>
</virtualType>
<virtualType name="AdyenPaymentUpiFacade" type="Adyen\Payment\Model\Method\Adapter">
<arguments>
<argument name="code" xsi:type="string">adyen_upi</argument>
<argument name="formBlockType" xsi:type="string">Magento\Payment\Block\Form</argument>
<argument name="infoBlockType" xsi:type="string">Adyen\Payment\Block\Info\PaymentMethodInfo</argument>
<argument name="valueHandlerPool" xsi:type="object">AdyenPaymentUpiValueHandlerPool</argument>
<argument name="validatorPool" xsi:type="object">AdyenPaymentValidatorPool</argument>
<argument name="commandPool" xsi:type="object">AdyenPaymentCommandPool</argument>
</arguments>
</virtualType>
<virtualType name="AdyenPaymentUpiValueHandlerPool" type="Magento\Payment\Gateway\Config\ValueHandlerPool">
<arguments>
<argument name="handlers" xsi:type="array">
<item name="default" xsi:type="string">AdyenPaymentUpiConfigValueHandler</item>
</argument>
</arguments>
</virtualType>
<virtualType name="AdyenPaymentUpiConfigValueHandler" type="Magento\Payment\Gateway\Config\ConfigValueHandler">
<arguments>
<argument name="configInterface" xsi:type="object">AdyenPaymentUpiConfig</argument>
</arguments>
</virtualType>
<virtualType name="AdyenPaymentUpiConfig" type="Magento\Payment\Gateway\Config\Config">
<arguments>
<argument name="methodCode" xsi:type="string">adyen_upi</argument>
</arguments>
</virtualType>
</config>
3 changes: 3 additions & 0 deletions etc/events.xml
Original file line number Diff line number Diff line change
Expand Up @@ -296,4 +296,7 @@
<event name="payment_method_assign_data_adyen_paypo">
<observer name="adyen_paypo_gateway_data_assign" instance="Adyen\Payment\Observer\AdyenPaymentMethodDataAssignObserver" />
</event>
<event name="payment_method_assign_data_adyen_upi">
<observer name="adyen_upi_gateway_data_assign" instance="Adyen\Payment\Observer\AdyenPaymentMethodDataAssignObserver" />
</event>
</config>
1 change: 1 addition & 0 deletions etc/frontend/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
<item name="adyen_wallet_IN" xsi:type="string">wallet_IN</item>
<item name="adyen_onlinebanking_IN" xsi:type="string">onlinebanking_IN</item>
<item name="adyen_paypo" xsi:type="string">paypo</item>
<item name="adyen_upi" xsi:type="string">upi</item>
</argument>
<argument name="customMethodRenderers" xsi:type="array">
<item name="adyen_cc" xsi:type="string">Adyen_Payment/js/view/payment/method-renderer/adyen-cc-method</item>
Expand Down
1 change: 1 addition & 0 deletions etc/graphql/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
<item name="adyen_onlinebanking_IN" xsi:type="object">Adyen\Payment\Model\Cart\Payment\AdditionalDataProvider\AdyenPm</item>
<item name="adyen_wallet_IN" xsi:type="object">Adyen\Payment\Model\Cart\Payment\AdditionalDataProvider\AdyenPm</item>
<item name="adyen_paypo" xsi:type="object">Adyen\Payment\Model\Cart\Payment\AdditionalDataProvider\AdyenPm</item>
<item name="adyen_upi" xsi:type="object">Adyen\Payment\Model\Cart\Payment\AdditionalDataProvider\AdyenPm</item>
</argument>
</arguments>
</type>
Expand Down
3 changes: 3 additions & 0 deletions etc/payment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -257,5 +257,8 @@
<method name="adyen_paypo">
<allow_multiple_address>1</allow_multiple_address>
</method>
<method name="adyen_upi">
<allow_multiple_address>1</allow_multiple_address>
</method>
</methods>
</payment>
1 change: 1 addition & 0 deletions view/base/web/images/logos/upi.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions view/frontend/layout/checkout_index_index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@
<item name="adyen_paypo" xsi:type="array">
<item name="isBillingAddressRequired" xsi:type="boolean">true</item>
</item>
<item name="adyen_upi" xsi:type="array">
<item name="isBillingAddressRequired" xsi:type="boolean">true</item>
</item>
</item>
</item>
</item>
Expand Down
1 change: 1 addition & 0 deletions view/frontend/layout/multishipping_checkout_billing.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
<item name="adyen_wallet_IN" xsi:type="string">Adyen_Payment::form/multishipping/abstract-form.phtml</item>
<item name="adyen_onlinebanking_IN" xsi:type="string">Adyen_Payment::form/multishipping/abstract-form.phtml</item>
<item name="adyen_paypo" xsi:type="string">Adyen_Payment::form/multishipping/abstract-form.phtml</item>
<item name="adyen_upi" xsi:type="string">Adyen_Payment::form/multishipping/abstract-form.phtml</item>
</argument>
<argument name="cacheable" xsi:type="boolean">false</argument>
</arguments>
Expand Down
Loading