Using your favourite package manager:
npm install --save @todaqmicro/react-payment-js
The basic way to set up micropayments:
import { Elements, PaymentElement } from "@todaqmicro/react-payment-js";
export default function App() {
return (
<main>
<Elements publicKey="mp_57dccd2882544d8281ffdfcf67a385ca">
<Payment />
</Elements>
</main>
);
}
// ...
export function Payment() {
return (
<PaymentElement options={{ hash: "adedc7a6-3a65-453a-a1a2-0f83a3e8da1a" }} />
);
}
TODO(mihok): Fill out reference.
<Elements />
Component<PaymentElement />
Component