1.1.3 • Published 4 years ago

dotwallet-react v1.1.3

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

#DotWallet Component

Pay Button and Login Button

Install

npm i dotwallet-react --save

Usage

import React from "react";
import ReactDOM from "react-dom";
import { DotWalletLogin, DotWalletPay } from "dotwallet-react";

ReactDOM.render(
  <DotWalletLogin appId={APPID} redirectUrl={REDIRECT_URL} />,
  document.getElementById("dotwallet-login")
);

or

<DotWalletLogin
  appId={APPID}
  redirectUrl={REDIRECT_URL}
>
  <div className="my-login-button">Login with DotWallet</div>
</DotWalletLogin>

<DotWalletPay
  lang="en"
  app-id="89d001043806644fdb4fb14099ff6be5"
  redirect-url="http://192.168.1.142:8080/payment-success"
  item-name="bananas"
  order-amount="900"
  api-endpoint="http://192.168.1.142:3000/create-order"
  notice-uri="http://192.168.1.142:3000/payment-result"
  fetchHeaders={{ "API-Key": "secret" }}
  fetchOptions={{ credentials: "same-origin" }}
  log={true}
></DotWalletPay>

Documentation

Props

paramstypedescription
appIdstringAPP_ID
redirectUrlstringURL
langstringzh or en
classNamestringclass

Features

Feature Props

TODO

paramstypedescription
onSuccessFunctionSuccess Event
onFailureFunctionFailure Event
renderReact.ReactNode
1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago