Skip to content

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

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

Closed
glenelkinsdev opened this issue Feb 20, 2025 · 5 comments
Assignees
Labels
Issue: needs update Additional information is require, waiting for response 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
@github-project-automation github-project-automation bot moved this to Ready for Confirmation in Issue Confirmation and Triage Board Feb 24, 2025
@rhoerr
Copy link

rhoerr commented Apr 1, 2025

Other payment methods are able to refund online without issue (including custom ones I've done), so I think this is an implementation issue, not a platform bug.

Make sure you hit Credit Memo on an invoice, rather than on an order. You can only do an online refund of a specific invoice/payment.

@engcom-Hotel engcom-Hotel self-assigned this Apr 7, 2025
Copy link

m2-assistant bot commented Apr 7, 2025

Hi @engcom-Hotel. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Hotel
Copy link
Contributor

Hello @glenelkinsdev,

Thanks for the report and collaboration!

Thanks @rhoerr for your inputs on this issue. I hope @glenelkinsdev your issue has been resolved. Please let us know, meanwhile moving this issue in Needs Update bucket.

Thanks

@engcom-Hotel engcom-Hotel added Issue: needs update Additional information is require, waiting for response and removed Issue: ready for confirmation labels Apr 7, 2025
@engcom-Hotel engcom-Hotel moved this from Ready for Confirmation to Needs Update in Issue Confirmation and Triage Board Apr 7, 2025
@engcom-Hotel
Copy link
Contributor

Dear @glenelkinsdev,

This issue is being closed since it has not been updated in a long time. Please feel free to reopen or raise a new ticket if the issue still exists.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: needs update Additional information is require, waiting for response 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

4 participants