Skip to content

Commit

Permalink
[ECP-8729] Add Mobilepay payment method (#2512)
Browse files Browse the repository at this point in the history
  • Loading branch information
khushboo-singhvi authored Feb 16, 2024
1 parent 3f63047 commit b6780c3
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 1 deletion.
24 changes: 23 additions & 1 deletion etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1952,7 +1952,29 @@
<is_wallet>0</is_wallet>
<group>adyen-alternative-payment-method</group>
</adyen_klarna_b2b>
<adyen_vipps>
<adyen_mobilepay>
<active>0</active>
<model>AdyenPaymentMobilepayFacade</model>
<title>MobilePay</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>1</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>1</is_wallet>
<group>adyen-alternative-payment-method</group>
</adyen_mobilepay>
<adyen_vipps>
<active>0</active>
<model>AdyenPaymentVippsFacade</model>
<title>Vipps</title>
Expand Down
28 changes: 28 additions & 0 deletions etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3910,6 +3910,16 @@
<argument name="methodCode" xsi:type="string">adyen_klarna_b2b</argument>
</arguments>
</virtualType>
<virtualType name="AdyenPaymentMobilepayFacade" type="Adyen\Payment\Model\Method\Adapter">
<arguments>
<argument name="code" xsi:type="string">adyen_mobilepay</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">AdyenPaymentMobilepayValueHandlerPool</argument>
<argument name="validatorPool" xsi:type="object">AdyenPaymentValidatorPool</argument>
<argument name="commandPool" xsi:type="object">AdyenPaymentCommandPool</argument>
</arguments>
</virtualType>
<virtualType name="AdyenPaymentVippsFacade" type="Adyen\Payment\Model\Method\Adapter">
<arguments>
<argument name="code" xsi:type="string">adyen_vipps</argument>
Expand All @@ -3920,6 +3930,23 @@
<argument name="commandPool" xsi:type="object">AdyenPaymentCommandPool</argument>
</arguments>
</virtualType>
<virtualType name="AdyenPaymentMobilepayValueHandlerPool" type="Magento\Payment\Gateway\Config\ValueHandlerPool">
<arguments>
<argument name="handlers" xsi:type="array">
<item name="default" xsi:type="string">AdyenPaymentMobilepayConfigValueHandler</item>
</argument>
</arguments>
</virtualType>
<virtualType name="AdyenPaymentMobilepayConfigValueHandler" type="Magento\Payment\Gateway\Config\ConfigValueHandler">
<arguments>
<argument name="configInterface" xsi:type="object">AdyenPaymentMobilepayConfig</argument>
</arguments>
</virtualType>
<virtualType name="AdyenPaymentMobilepayConfig" type="Magento\Payment\Gateway\Config\Config">
<arguments>
<argument name="methodCode" xsi:type="string">adyen_mobilepay</argument>
</arguments>
</virtualType>
<virtualType name="AdyenPaymentVippsValueHandlerPool" type="Magento\Payment\Gateway\Config\ValueHandlerPool">
<arguments>
<argument name="handlers" xsi:type="array">
Expand All @@ -3938,3 +3965,4 @@
</arguments>
</virtualType>
</config>

3 changes: 3 additions & 0 deletions etc/events.xml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@
<event name="payment_method_assign_data_adyen_klarna_b2b">
<observer name="adyen_klarna_b2b_gateway_data_assign" instance="Adyen\Payment\Observer\AdyenPaymentMethodDataAssignObserver" />
</event>
<event name="payment_method_assign_data_adyen_mobilepay">
<observer name="adyen_mobilepay_gateway_data_assign" instance="Adyen\Payment\Observer\AdyenPaymentMethodDataAssignObserver" />
</event>
<event name="payment_method_assign_data_adyen_vipps">
<observer name="adyen_vipps_gateway_data_assign" instance="Adyen\Payment\Observer\AdyenPaymentMethodDataAssignObserver" />
</event>
Expand Down
1 change: 1 addition & 0 deletions etc/frontend/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
<item name="adyen_bcmc" xsi:type="string">bcmc</item>
<item name="adyen_cashapp" xsi:type="string">cashapp</item>
<item name="adyen_klarna_b2b" xsi:type="string">klarna_b2b</item>
<item name="adyen_mobilepay" xsi:type="string">mobilepay</item>
<item name="adyen_vipps" xsi:type="string">vipps</item>
</argument>
<argument name="customMethodRenderers" xsi:type="array">
Expand Down
1 change: 1 addition & 0 deletions etc/graphql/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
<item name="adyen_bcmc" xsi:type="object">Adyen\Payment\Model\Cart\Payment\AdditionalDataProvider\AdyenPm</item>
<item name="adyen_cashapp" xsi:type="object">Adyen\Payment\Model\Cart\Payment\AdditionalDataProvider\AdyenPm</item>
<item name="adyen_klarna_b2b" xsi:type="object">Adyen\Payment\Model\Cart\Payment\AdditionalDataProvider\AdyenPm</item>
<item name="adyen_mobilepay" xsi:type="object">Adyen\Payment\Model\Cart\Payment\AdditionalDataProvider\AdyenPm</item>
<item name="adyen_vipps" xsi:type="object">Adyen\Payment\Model\Cart\Payment\AdditionalDataProvider\AdyenPm</item>
</argument>
</arguments>
Expand Down
3 changes: 3 additions & 0 deletions etc/payment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@
<method name="adyen_klarna_b2b">
<allow_multiple_address>1</allow_multiple_address>
</method>
<method name="adyen_mobilepay">
<allow_multiple_address>1</allow_multiple_address>
</method>
<method name="adyen_vipps">
<allow_multiple_address>1</allow_multiple_address>
</method>
Expand Down
1 change: 1 addition & 0 deletions view/base/web/images/logos/mobilepay.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 @@ -287,6 +287,9 @@
<item name="adyen_klarna_b2b" xsi:type="array">
<item name="isBillingAddressRequired" xsi:type="boolean">true</item>
</item>
<item name="adyen_mobilepay" xsi:type="array">
<item name="isBillingAddressRequired" xsi:type="boolean">true</item>
</item>
<item name="adyen_vipps" xsi:type="array">
<item name="isBillingAddressRequired" xsi:type="boolean">true</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 @@ -92,6 +92,7 @@
<item name="adyen_bcmc" xsi:type="string">Adyen_Payment::form/multishipping/abstract-form.phtml</item>
<item name="adyen_cashapp" xsi:type="string">Adyen_Payment::form/multishipping/abstract-form.phtml</item>
<item name="adyen_klarna_b2b" xsi:type="string">Adyen_Payment::form/multishipping/abstract-form.phtml</item>
<item name="adyen_mobilepay" xsi:type="string">Adyen_Payment::form/multishipping/abstract-form.phtml</item>
<item name="adyen_vipps" xsi:type="string">Adyen_Payment::form/multishipping/abstract-form.phtml</item>
</argument>
<argument name="cacheable" xsi:type="boolean">false</argument>
Expand Down

0 comments on commit b6780c3

Please sign in to comment.