bees-payment
v1.0.38
Published
you install `bee-payment` via the package manager of your choice and ship it as part of your application bundle:
Downloads
12
Readme
Installation
you install bee-payment
via the package manager of your choice and ship it as part of your application bundle:
yarn add bee-payment
or
npm install bee-payment --save
Payment
import { payment } from "bee-payment";
const paySuccessfulCallback = () => {};
// orderIdUrl: https://open.test.bee996.com/payment/prepay/6df30f1d70ee5b011493c13b1798ceb4?payPlatforms=BlockChain_DePay,Bee_Coin
// Or orderIdUrl: async () => "https://..."
// Note: window.open is called in payment. Browser restrictions, js cannot open a window in a callback to a network request, will be blocked by most browsers. So orderIdUrl can also be a function that is compatible with this problem.
// Note: Whether the payment is successful is subject to the back-end, the front-end callback only gives an opportunity to ask the back-end.
payment(orderIdUrl, paySuccessfulCallback);
import { setDebug } from "bee-payment";
setDebug(true); //debug ==true
import { close } from "bee-payment";
close()