0.3.10 • Published 9 months ago
@requestnetwork/payment-widget v0.3.10
Request Network Payment Widget Web Component
A web component for accepting crypto payments using Request Network.
Introduction
The Payment Widget web component is a pre-built component that allows users to offer crypto payment options using Request Network without having to implement it themselves. It is built using Svelte but compiled to a Web Component, making it usuable in any web environment, regardless of the framework.
Installation
To install the component, use npm:
npm install @requestnetwork/payment-widgetUsage
Usage in React
import PaymentWidget from "@requestnetwork/payment-widget/react";
export default function PaymentPage() {
return (
<PaymentWidget
sellerInfo={{
logo: "https://example.com/logo.png",
name: "Example Store",
}}
productInfo={{
name: "Digital Art Collection",
description: "A curated collection of digital artworks.",
image: "https://example.com/product-image.jpg",
}}
amountInUSD={1.5}
sellerAddress="0x1234567890123456789012345678901234567890"
supportedCurrencies={["ETH_MAINNET", "USDC_MAINNET", "USDC_MATIC"]}
persistRequest={true}
onPaymentSuccess={(request) => {
console.log(request);
}}
onError={(error) => {
console.error(error);
}}
/>
);
}Additional Information
For more information, see the Request Network documentation.
0.3.9
10 months ago
0.3.10
9 months ago
0.2.1-next.1
1 year ago
0.2.1-next.2
1 year ago
0.3.3-next.3
1 year ago
0.3.4-next.4
12 months ago
0.3.0
1 year ago
0.3.4-next.5
12 months ago
0.3.6
11 months ago
0.3.5
12 months ago
0.3.8
10 months ago
0.3.7
11 months ago
0.3.2
1 year ago
0.3.8-next.6
10 months ago
0.3.1
1 year ago
0.3.4
12 months ago
0.3.3
12 months ago
0.2.0
1 year ago
0.1.4
1 year ago
0.1.3
1 year ago
0.1.2
1 year ago
0.1.1
1 year ago
0.1.0
1 year ago