UNPKG

@mercadopago/sdk-react

Version:
33 lines (32 loc) 1.28 kB
import React from 'react'; import { TPaymentType } from './type'; import { UpdateValues } from '../util/types/common'; /** * Payment Brick allows you to add several payment methods to a store and save card data for future purchases with just one Brick. * * Usage: * * ```ts * import Payment, {initMercadoPago} from '@mercadopago/sdk-react' * * initMercadoPago('YOUR_PUBLIC_KEY') * * const Example = () => { * return( * <Payment initialization:{{ amount: AMOUNT }}, // AMOUNT is the value from the purchase, its the minium data to initialize CardPayment brick onSubmit={async () => {}} // Callback called when clicking on the data submission button /> * ) * } * export default Example * ``` * * @see {@link https://www.mercadopago.com/developers/en/docs/checkout-bricks/payment-brick/introduction Payment Brick documentation} for more information. */ declare const Payment: ({ onReady, onError, onSubmit, onBinChange, onClickEditShippingData, onClickEditBillingData, onRenderNextStep, onRenderPreviousStep, initialization, customization, locale, id, }: TPaymentType) => React.JSX.Element; declare const usePaymentBrick: () => { update: (updateValues: UpdateValues) => void; }; export default Payment; export { usePaymentBrick };