Skip to content

VNEXT-68989#1290

Open
cvillacorta-godaddy wants to merge 6 commits intogodaddy:mainfrom
cvillacorta-godaddy:vnext-68989
Open

VNEXT-68989#1290
cvillacorta-godaddy wants to merge 6 commits intogodaddy:mainfrom
cvillacorta-godaddy:vnext-68989

Conversation

@cvillacorta-godaddy
Copy link

@cvillacorta-godaddy cvillacorta-godaddy commented Feb 16, 2026

Summary

This branch introduces MercadoPago improvements: event tracking, rendering stability adjustments, and a fixed dummy email for the Brick initialization.

Changeset

  • Changeset added

Test Plan

Configure your store with MercadoPago
Set your store to Brasil and use this test account

BR:
"id": 1309558710,
"nickname": "TEST_USER_1309558710",
"password": "b3OJ26sZZU",

Run nextjs project setting the right .env variables

# GoDaddy API Credentials (DEV Environment)
GODADDY_CLIENT_ID=a9314cc0-b9e7-47fb-b1a5-f73b28db11b6
NEXT_PUBLIC_GODADDY_CLIENT_ID=a9314cc0-b9e7-47fb-b1a5-f73b28db11b6
GODADDY_CLIENT_SECRET=OkEntJpG49QCRQ829qrFRcvCDywMC4lt
NEXT_PUBLIC_GODADDY_ENV=dev
NEXT_PUBLIC_GODADDY_API_HOST=api.dev-godaddy.com
GODADDY_API_HOST=api.dev-godaddy.com

# Store and Order Identifiers
NEXT_PUBLIC_GODADDY_STORE_ID=f8ebca1b-b00b-4804-80f1-25de75135d97
NEXT_PUBLIC_GODADDY_CHANNEL_ID=a7646593-c1c7-42fc-8116-368a3484f6df
NEXT_PUBLIC_GODADDY_DRAFT_ORDER_ID=[SET YOUR ORDER ID HERE]

# Mercado Pago Credentials
NEXT_PUBLIC_MERCADOPAGO_PUBLIC_KEY=[SET MP PUBLIC KEY HERE]
NEXT_PUBLIC_MERCADOPAGO_COUNTRY=BR
image

@cvillacorta-godaddy cvillacorta-godaddy requested a review from a team as a code owner February 16, 2026 23:24
@changeset-bot
Copy link

changeset-bot bot commented Feb 16, 2026

🦋 Changeset detected

Latest commit: b13cdcb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
nextjs Minor
@godaddy/react Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

},
],
paymentMethods: {
card: {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this intended?

Copy link

@fsantelys-godaddy fsantelys-godaddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested while on a call with Carlos. Left a comment

case PaymentMethodType.OFFLINE:
return t.payment.methods.offline;
case PaymentMethodType.MERCADOPAGO:
return 'MercadoPago';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should add translations to all of our files even if they are '' incase anyone needs to override them for any reason.

case PaymentMethodType.OFFLINE:
return t.payment.descriptions?.offline;
case PaymentMethodType.MERCADOPAGO:
return undefined;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should add translations to all of our files even if they are '' incase anyone needs to override them for any reason.

[PaymentMethodType.MERCADOPAGO]: {
[PaymentProvider.MERCADOPAGO]: {
form: 'MercadoPagoCreditCardForm',
button: 'MercadoPagoCreditCardCheckoutButton',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't have to include a button component here if it's not used. That being said I think we should perhaps try and see what this form looks like as a the button instead of the form since we typically put all of our payment buttons at the bottom of checkout. So you'd still select the Mercado Pago radio button but no form would appear in the accordion but it would below instead.

}, []);

return (
<MercadoPagoContext.Provider
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need a provider. All of this can be done in the meracopago component. We utilize the providers to share state between the payment forms and payment buttons but in this case there will only ever be one as far as I can tell.

@@ -0,0 +1,226 @@
import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this file into payment-methods/mercadopago to keep it separated as a different method.

@@ -0,0 +1,5 @@
export function MercadoPagoCreditCardCheckoutButton() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the form should be a part of this instead of payment-methods; but if decided that's not the way, this file is not needed.

@@ -23,11005 +23,11043 @@
* ```
*/
const introspection = {
name: 'checkout-api',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run pnpm lint:fix in packages/react

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.

3 participants