Skip to content

Commit

Permalink
testing page
Browse files Browse the repository at this point in the history
  • Loading branch information
mPaella committed Sep 14, 2023
1 parent 0d3f657 commit a01d17e
Showing 1 changed file with 31 additions and 15 deletions.
46 changes: 31 additions & 15 deletions packages/starter/nextjs-starter/pages/payment-element.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,38 @@
import { useState } from "react";

import { CrossmintPaymentElement } from "@crossmint/client-sdk-react-ui";

export default function PaymentElementPage() {
const [count, setCount] = useState(1);

return (
<CrossmintPaymentElement
environment="https://crossmint-main-git-checkout-embedded-new-element-p2-crossmint.vercel.app"
clientId="db218e78-d042-4761-83af-3c4e5e6659dd"
mintConfig={{ totalPrice: "0.001", quantity: "1" }}
recipient={{ wallet: "0xdC9bb9929b79b62d630A7C3568c979a2843eFd8b" }}
paymentMethod="ETH"
signer={{
address: "0xdC9bb9929b79b62d630A7C3568c979a2843eFd8b",
signAndSendTransaction: async (tx) => {
return "0x1234";
},
}}
onEvent={(event) => {
console.log(event);
<div
style={{
display: "flex",
flexDirection: "column",
width: "100%",
gap: "20px",
}}
/>
>
<button onClick={() => setCount(count + 1)}>Increment count: {count}</button>
<CrossmintPaymentElement
environment="https://crossmint-main-git-checkout-embedded-new-element-p3-crossmint.vercel.app"
clientId="db218e78-d042-4761-83af-3c4e5e6659dd"
recipient={{ wallet: "maxfQWBno84Zfu4sXgmjYvsvLn4LzGFSgSkFMFuzved" }}
mintConfig={{
testCount: count,
}}
paymentMethod="ETH"
signer={{
address: "0xdC9bb9929b79b62d630A7C3568c979a2843eFd8b",
signAndSendTransaction: async (tx) => {
return "0x1234";
},
}}
onEvent={(event) => {
console.log(event);
}}
/>
</div>
);
}

0 comments on commit a01d17e

Please sign in to comment.