api-ecommerce

1.0.3 • Public • Published

api-ecommerce for react native

We used in react native app [climate-url]: http://mstore.io/

Install

yarn add api-ecommerce

Quick Start

import { WooWorker } from "api-ecommerce"

componentDidMount() {
    WooWorker.init({
        url: "http://mstore.io",
        consumerKey: "ck_b7594bc4391db4b56c635fe6da1072a53ca4xxxx",
        consumerSecret: "cs_980b9edb120e15bd2a8b668cacc734f7ecaxxxx",
        wpAPI: true,
        version: "wc/v2",
        queryStringAuth: true,
    });
}

handleWooWorker = async () => {
    json = await WooWorker.getPayments();

    if (json === undefined) {
        console.log("fail");
    } else if (json.code) {
        console.log("fail");
    } else {
        console.log("success", json)
    }
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    9
    • latest

Version History

Package Sidebar

Install

npm i api-ecommerce

Weekly Downloads

49

Version

1.0.3

License

none

Unpacked Size

18.5 kB

Total Files

7

Last publish

Collaborators

  • luyx2412
  • minhcasi