Skip to content

fix(framework): Add Gcash to PaymentMethodType to PaymentMethod Mapping - #2131

Open
Vani-1107 wants to merge 1 commit into
mainfrom
dlocal-refund-fix
Open

fix(framework): Add Gcash to PaymentMethodType to PaymentMethod Mapping#2131
Vani-1107 wants to merge 1 commit into
mainfrom
dlocal-refund-fix

Conversation

@Vani-1107

Copy link
Copy Markdown
Contributor

Description

Add Gcash to PaymentMethodType to PaymentMethod Mapping

Motivation and Context

Earlier the refunds were failing with the below error : Invalid data format: payment_method_type. This payment method type cannot be mapped to a high-level category

This is because of missing mapping of Gcash.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies application configuration/environment variables

How did you test it?

  1. Complete a payment
  2. Refund for Dlocal (Gcash):

Request:


curl --location 'http://localhost:8080/refunds' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_VZiFyyIr3ysG38QSE8tKkXmPHvUqb9AenOZ7PKroSyqpkLjk5JLBg1nBl9jfjfO2' \
--data '{
    "payment_id": "pay_j6qwv1u44BlSkKErSjRQ",
    "amount": 100,
    "reason": "Customer returned product",
    "refund_type": "instant",
    "all_keys_required": true
}'

Response:


{
    "refund_id": "ref_svnoMiBlAMcIEG1Vu6hU",
    "payment_id": "pay_j6qwv1u44BlSkKErSjRQ",
    "amount": 100,
    "currency": "PHP",
    "status": "failed",
    "reason": "Customer returned product",
    "metadata": null,
    "error_message": null,
    "error_code": null,
    "unified_code": null,
    "unified_message": null,
    "created_at": "2026-08-14T08:00:21.220Z",
    "updated_at": "2026-08-14T08:00:21.959Z",
    "connector": "dlocal",
    "profile_id": "pro_J9UurJpIif1UKKGQt1gD",
    "merchant_connector_id": "mca_jdk57GPxewi8t3eRmtxD",
    "split_refunds": null,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "raw_connector_response": null,
    "connector_refund_id": "REF-1454629-x1l7tiol-248blo00n17pd2-4d4satcjgrvc"
}

This resulted in failure because of issue at connectors end. Have raised it with dlocal team

@Vani-1107 Vani-1107 self-assigned this Aug 14, 2026
@Vani-1107
Vani-1107 requested a review from a team as a code owner August 14, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants