UNPKG

@mercadopago/sdk-react

Version:
33 lines (32 loc) 1.2 kB
import React from 'react'; import { TCardPayment } from './type'; import { UpdateValues } from '../util/types/common'; /** * Card Payment Brick allows you to offer payments with credit and debit card at yout checkout. * * Usage: * * ```ts * import CardPayment, {initMercadoPago} from '@mercadopago/sdk-react' * * initMercadoPago('YOUR_PUBLIC_KEY') * * const Example = () => { * return( * <CardPayment * initialization={{amount: AMOUNT}} // AMOUNT is the value from the purchase, its the minium data to initialize CardPayment brick * onSubmit={} // Receives a function that send the payment to backend and, through it, to MercadoPago * /> * ) * } * export default Example * ``` * * @see {@link https://www.mercadopago.com/developers/en/docs/checkout-bricks/card-payment-brick/introduction Card Payment Brick documentation} for more information. */ declare const CardPayment: ({ onReady, onError, onSubmit, onBinChange, initialization, customization, locale, id, }: TCardPayment) => React.JSX.Element; declare const useCardPaymentBrick: () => { update: (updateValues: UpdateValues) => void; }; export default CardPayment; export { useCardPaymentBrick };