Last active
February 3, 2023 07:34
-
-
Save alfonso-paella/af5d7ac3ebfc8863b828d88602c9543a to your computer and use it in GitHub Desktop.
Gist to add Crossmint Pay with card for an ERC721 Ethereum contract
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 1. Add this import line at the top of your file | |
| import { CrossmintPayButton } from "@crossmint/client-sdk-react-ui"; | |
| // 2. Add this component wherever you want the Buy with card button to show | |
| // Ensure the button shows even for your users who don't have connected their wallet! | |
| <CrossmintPayButton | |
| clientId="_YOUR_CLIENT_ID_" | |
| environment="staging" | |
| mintConfig={{ | |
| type: "erc-721", | |
| quantity: "_NUMBER_OF_NFTS_", | |
| totalPrice: "_PRICE_IN_ETH_" | |
| // Append here any custom arguments, if any, for your smart contract minting function | |
| }} | |
| /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment