Skip to content

applizem/api-ecommerce

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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",
        wp_api: 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)
    }
}

About

api e-commerce

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%