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

Custom payment method with gatway integration is only showing "Refund Offline" on credit memo #39645

Open
glenelkinsdev opened this issue Feb 20, 2025 · 1 comment
Labels
Reported on 2.4.x Indicates original Magento version for the Issue report. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it

Comments

@glenelkinsdev
Copy link

glenelkinsdev commented Feb 20, 2025

I've created a custom payment method for using the clover gateway via fiserv api, everything is working apart from credit memo refunds, it only shows the "Refund Offline" button.

It appears to be related to the magento RefundAtapter passing $isOnline as false, and i haven't a clue why! There is nothing in the module config that tells magento it's an offline method.

Here is the config.xml, you can see it says is_gateway as true and nothing says it's an offline method:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
    <default>
        <payment>
            <pillbox_fiserv_clover>
                <active>0</active>
                <model>Pillbox\FiservCloverPayments\Payment\FiservCloverCard</model>
                <order_status>pending</order_status>
                <title>Clover Card Payment</title>
                <group>pillbox_group</group>
                <payment_action>authorize</payment_action>
                <fiserv_api_key></fiserv_api_key>
                <fiserv_api_secret></fiserv_api_secret>
                <fiserv_term_url></fiserv_term_url>
                <fiserv_method_url></fiserv_method_url>
                <challenge_window_size>04</challenge_window_size>
                <can_authorize_vault>1</can_authorize_vault>
                <can_capture_vault>1</can_capture_vault>
                <can_use_vault>1</can_use_vault>
                <can_use_checkout>1</can_use_checkout>
                <can_capture_partial>1</can_capture_partial>
                <can_authorize>1</can_authorize>
                <can_capture>1</can_capture>
                <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>
                <can_edit>1</can_edit>
                <can_review_payment>1</can_review_payment>
                <can_deny_payment>1</can_deny_payment>
                <environment>sandbox</environment>
                <is_gateway>1</is_gateway>
                <rest_key></rest_key>
                <active_3ds>1</active_3ds>
            </pillbox_fiserv_clover>
            <pillbox_fiserv_clover_vault>
                <active>0</active>
                <model>Pillbox\FiservCloverPayments\Payment\FiservCloverCardVault</model>
                <title>Clover Saved Cards</title>
                <group>pillbox_group</group>
                <require_cvv>1</require_cvv>
                <active_3ds>1</active_3ds>
            </pillbox_fiserv_clover_vault>
        </payment>
    </default>
</config>

It seems to be something to do with the magento RefundAdapter it passes $isOnline as false:

Image

So in the payment model refund() method $creditmemo->getDoTransaction() is returning false / null

Copy link

m2-assistant bot commented Feb 20, 2025

Hi @glenelkinsdev. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce.


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

@engcom-Bravo engcom-Bravo added Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it Reported on 2.4.x Indicates original Magento version for the Issue report. labels Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reported on 2.4.x Indicates original Magento version for the Issue report. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
None yet
Development

No branches or pull requests

2 participants