Skip to content

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

Closed
@glenelkinsdev

Description

@glenelkinsdev

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

Metadata

Metadata

Assignees

Labels

Issue: needs updateAdditional information is require, waiting for responseReported on 2.4.xIndicates original Magento version for the Issue report.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions