seller-panda
v0.1.1
Published
seller-panda togtokh.dev
Downloads
17
Maintainers
Readme
Seller Panda
Example TS
import sellerPanda from "seller-panda";
const run = async () => {
console.log("start");
await sellerPanda.LOGIN.USER({
phone_number: 123456789,
password: "",
});
try {
const wallet = await sellerPanda.WALLET.INFO();
console.log(wallet);
} catch (error) {
console.log(error);
}
try {
const product_list = await sellerPanda.PRODUCT.LIST();
const item_list = await sellerPanda.ITEM.LIST(
"steam_god_of_war" || product_list[0].product_name
);
console.log(item_list);
const order = await sellerPanda.ORDER.CREATE({
item_id: item_list[1]._id,
call_back: "",
});
const info = await sellerPanda.ORDER.INFO(order.order_id);
const paid_info = await sellerPanda.ORDER.PAY(info.order_id);
console.log(paid_info);
} catch (error) {
console.log(error);
}
};
run();
Example JS
const express = require('express');
const sellerPanda = require('seller-panda').default;
const router = express.Router();
router.get('/', async (req, res) => {
console.log(sellerPanda);
await sellerPanda.LOGIN.USER({
phone_number: 123456789,
password: '',
});
res.send({ message: 'Hello world' });
});
module.exports = router;
PRODUCTS TYPES
name: string;
name_en: string;
product_name: string;
category_name: string;
logo: string;
banner: string;
description: string;
item: string;
screenshots: Array<string>;
show: boolean; // true утгатай product ийг аас худалдан авалт хийгээрэй.
keyboard: string;
search: string;
host: string;
bonus: number;
product_type: string;
product_video: string;
product_helper_url: string;
order_index: number;
input_desc: string;
input_check_api: string;
input_names: string[];
delFlg: boolean; // false утгатай product ийг аас худалдан авалт хийгээрэй.
ITEM TYPES
_id: string;
name: string;
name_en: string;
amount: number;
item_name: string;
product_name: string;
category_name: string;
currency_name: string;
profit: number;
profit_type: boolean;
image: string;
show: boolean; // true утгатай product ийг аас худалдан авалт хийгээрэй.
bonus: number;
order_index: number;
name_number: string;
name_item: string;
delFlg: boolean; // false утгатай product ийг аас худалдан авалт хийгээрэй.
ORDER TYPES
order_id: number;
userId: string;
user_id: number;
callback: string;
order_info_id_1: string;
order_info_id_2: string;
order_info_id_3: string;
order_info_id_4: string;
order_info_card_number: string;
order_info_card_key: string;
order_type: number;
order_amount: number;
order_profit: number;
category_name: string;
item_name: string;
product_name: string;
status: string;
payment_type: string;
created_date: string;
processing_date: string;
paid_date: string;
refund_date: string;
success_date: string;
failed_date: string;
transaction_id: string;
refund_log: JSON;
data: any;
order_index: Number;
delFlg: boolean;