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

Feature/ta 2622 fields length #28

Merged
merged 14 commits into from
Feb 5, 2024
20 changes: 20 additions & 0 deletions src/components/mdx.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ function InfoIcon(props) {
)
}

function WarningIcon(props) {
return (

<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" {...props}>
<path fill="currentColor" d="m19.51 5.85-5.94-3.43c-.97-.56-2.17-.56-3.15 0L4.49 5.85a3.15 3.15 0 0 0-1.57 2.73v6.84c0 1.12.6 2.16 1.57 2.73l5.94 3.43c.97.56 2.17.56 3.15 0l5.94-3.43a3.15 3.15 0 0 0 1.57-2.73V8.58a3.192 3.192 0 0 0-1.58-2.73Zm-8.26 1.9c0-.41.34-.75.75-.75s.75.34.75.75V13c0 .41-.34.75-.75.75s-.75-.34-.75-.75V7.75Zm1.67 8.88c-.05.12-.12.23-.21.33a.99.99 0 0 1-1.09.21c-.13-.05-.23-.12-.33-.21-.09-.1-.16-.21-.22-.33a.986.986 0 0 1-.07-.38c0-.26.1-.52.29-.71.1-.09.2-.16.33-.21.37-.16.81-.07 1.09.21.09.1.16.2.21.33.05.12.08.25.08.38s-.03.26-.08.38Z"/>
</svg>
)
}

export function Note({ children }) {
return (
<div className="my-6 flex gap-2.5 rounded-2xl border border-primary-500/20 bg-primary-50/50 p-4 leading-6 text-primary-900 dark:border-primary-500/30 dark:bg-primary-500/5 dark:text-primary-200 dark:[--tw-prose-links-hover:theme(colors.primary.300)] dark:[--tw-prose-links:theme(colors.white)]">
Expand All @@ -42,6 +51,17 @@ export function Note({ children }) {
)
}

export function Warning({ children }) {
return (
<div className="my-6 flex gap-2.5 rounded-2xl border border-orange-500/20 bg-orange-50/50 p-4 leading-6 text-orange-900/80 dark:border-orange-500/30 dark:bg-orange-500/5 dark:text-orange-200 dark:[--tw-prose-links-hover:theme(colors.orange.300)] dark:[--tw-prose-links:theme(colors.white)]">
<WarningIcon className="mt-1 h-5 w-5 flex-none fill-white stroke-white text-orange-500/60" />
<div className="[&>:first-child]:mt-0 [&>:last-child]:mb-0">
{children}
</div>
</div>
)
}

export function Row({ children }) {
return (
<div className="grid grid-cols-1 items-start gap-x-16 gap-y-10 xl:max-w-none xl:grid-cols-2">
Expand Down
9 changes: 8 additions & 1 deletion src/pages/checkout/additional-fields.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,16 @@ Los datos a guardar se pueden enviar en estructuras como:
- `redirectRequest.payment.fields`
- `redirectRequest.subscription.fields`

Cuando envías múltiples `NameValuePair` con el mismo `keyword`, nuestra API elige el primero para almacenar y mostrar en la interfaz.
## Condiciones

- Se pueden agregar hasta 50 campos adicionales. Los campos en `redirectRequest.fields` se validarán primero, y el resto se asignará a `redirectRequest.payment.fields` o `redirectRequest.subscription.fields`.
- Se permite un máximo de 255 caracteres en la propiedad `value`.
- Se permite un máximo de 50 caracteres en la propiedad `keyword`.
- Cuando envías múltiples `fields` con el mismo `keyword`, nuestra API elige el primero para almacenar y mostrar en la interfaz.

<Note>
Los datos con la propiedad `display: both, receipt, payment, approved`, se mostrarán en algún flujo de la interfaz.
</Note>

## NameValuePair {{ id: "name-value-pair" }}

Expand Down
12 changes: 12 additions & 0 deletions src/pages/checkout/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ Este archivo contiene las mejoras y actualizaciones que se hagan en Checkout API

...

## `2.19.12` 2023-11-15

### Nuevo:

- Control para las propiedades `*.fields` en el request de creación de sesión `/api/session`. [Campos Adicionales](/checkout/additional-fields)

## `2.19.0` 2023-11-15

### Cambió:

- La fecha de `payment.expiración` en la respuesta del endpoint [Collect](/checkout/api-reference/token#charge-using-token) se presenta ahora en formato ISO 8601.

## `2.17.30` 2023-09-26

### Nuevo:
Expand Down
9 changes: 8 additions & 1 deletion src/pages/en/checkout/additional-fields.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,16 @@ The data to be saved can be sent in structures like:
- `redirectRequest.payment.fields`
- `redirectRequest.subscription.fields`

When you send multiple `NameValuePair` with the same `keyword`, our API chooses the first one to store and display in the frontend.
## Conditions

- Up to 50 additional fields can be added. Fields in `redirectRequest.fields` will be validated first, and the remainder will be assigned to `redirectRequest.payment.fields` or `redirectRequest.subscription.fields`.
- A maximum of 255 characters is allowed in the `value` property.
- A maximum of 50 characters is allowed in the `keyword` property.
- When you send multiple `fields` with the same `keyword`, our API chooses the first one to store and display in the frontend.

<Note>
Data with property `display: both, receipt, payment, approved`, will be displayed in some interface flow.
</Note>

## NameValuePair {{ id: "name-value-pair" }}

Expand Down
12 changes: 12 additions & 0 deletions src/pages/en/checkout/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ This file contains the improvements and updates made to the Checkout API.

...

## `2.19.12` 2023-11-15

### Added:

- Control for `*.fields` properties in the session creation request `/api/session`. [Additional fields](/checkout/additional-fields)

## `2.19.0` 2023-11-15

### Changed:

- The `expiration` date in the response of the [Collect](/en/checkout/api-reference/token#charge-using-token) endpoint is now presented in ISO 8601 format.

## `2.17.30` 2023-09-26

### Added:
Expand Down