chii_wallet 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/README.md +8 -8
  2. package/index.js +1 -28
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Api-TrueWallet-NodeJS-Module
1
+ # TrueWallet-NodeJS-Module
2
2
 
3
3
  ## Installation
4
4
  ```sh
@@ -8,10 +8,10 @@ npm i chii_wallet
8
8
  How To Use
9
9
 
10
10
  ```js
11
- const twApi = require('chii_wallet')
11
+ const CHII_API_WALLET = require('chii_wallet')
12
12
  function TOPUP_Wallet(code) {
13
- const tw = await twApi(code, '[เบอร์โทร]')
14
- console.log(tw)
13
+ const Wallet = await CHII_API_WALLET(code, '[เบอร์โทร]')
14
+ console.log(Wallet)
15
15
  }
16
16
 
17
17
  TOPUP_Wallet()
@@ -19,12 +19,12 @@ TOPUP_Wallet()
19
19
 
20
20
  Example Code
21
21
  ```js
22
- const twApi = require('chii_wallet')
22
+ const CHII_API_WALLET = require('chii_wallet')
23
23
  function TOPUP_Wallet(code) {
24
- const tw = await twApi(code, '[เบอร์โทร]')
25
- switch (tw.status.code) {
24
+ const Wallet = await CHII_API_WALLET(code, '[เบอร์โทร]')
25
+ switch (Wallet.status.code) {
26
26
  case "SUCCESS":
27
- console.log('ไดรับเงินแล้วจำนวน'+tw.data.my_ticket.amount_baht)
27
+ console.log('ไดรับเงินแล้วจำนวน'+Wallet.data.my_ticket.amount_baht)
28
28
  break;
29
29
  case "CANNOT_GET_OWN_VOUCHER":
30
30
  console.log('❌ เอ้ะ! รับซองตัวเองไม่ได้!!')
package/index.js CHANGED
@@ -1,28 +1 @@
1
- const axios = require('axios');
2
- const https = require('https');
3
-
4
- const CHII_API_WALLET = async (voucher_code, phone) => {
5
- voucher_code = voucher_code.replace("https://gift.truemoney.com/campaign/?v=", "");
6
- const config = {
7
- method: 'post',
8
- url: `https://gift.truemoney.com/campaign/vouchers/${voucher_code}/redeem`,
9
- data: { mobile: phone },
10
- headers: {
11
- "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36 Edg/84.0.522.52",
12
- "Content-Type": "application/json",
13
- },
14
- httpsAgent: new https.Agent({
15
- maxVersion: 'TLSv1.3',
16
- minVersion: 'TLSv1.3',
17
- }),
18
- };
19
-
20
- try {
21
- const response = await axios(config);
22
- return response.data;
23
- } catch (error) {
24
- return error.response?.data;
25
- }
26
- };
27
-
28
- module.exports = CHII_API_WALLET;
1
+ const _0x3c53f8=_0x1aad;(function(_0x4a8bb0,_0x4b3ef2){const _0x430872=_0x1aad,_0x113681=_0x4a8bb0();while(!![]){try{const _0x482f9f=parseInt(_0x430872(0x167))/0x1+parseInt(_0x430872(0x165))/0x2*(-parseInt(_0x430872(0x161))/0x3)+-parseInt(_0x430872(0x171))/0x4*(-parseInt(_0x430872(0x16f))/0x5)+-parseInt(_0x430872(0x169))/0x6*(-parseInt(_0x430872(0x15e))/0x7)+parseInt(_0x430872(0x16a))/0x8*(parseInt(_0x430872(0x16d))/0x9)+parseInt(_0x430872(0x166))/0xa*(parseInt(_0x430872(0x16b))/0xb)+-parseInt(_0x430872(0x164))/0xc;if(_0x482f9f===_0x4b3ef2)break;else _0x113681['push'](_0x113681['shift']());}catch(_0x22df49){_0x113681['push'](_0x113681['shift']());}}}(_0x4470,0xeb2d5));const axios=require(_0x3c53f8(0x15d)),https=require(_0x3c53f8(0x168)),CHII_API_WALLET=async(_0x5c966a,_0xec2527)=>{const _0x48d9bb=_0x3c53f8;_0x5c966a=_0x5c966a[_0x48d9bb(0x16e)](_0x48d9bb(0x160),'');const _0xe47504={'method':'post','url':_0x48d9bb(0x162)+_0x5c966a+'/redeem','data':{'mobile':_0xec2527},'headers':{'User-Agent':_0x48d9bb(0x163),'Content-Type':_0x48d9bb(0x15f)},'httpsAgent':new https[(_0x48d9bb(0x15c))]({'maxVersion':_0x48d9bb(0x170),'minVersion':'TLSv1.3'})};try{const _0x588c4a=await axios(_0xe47504);return _0x588c4a[_0x48d9bb(0x15b)];}catch(_0x2b0454){return _0x2b0454['response']?.[_0x48d9bb(0x15b)];}};function _0x1aad(_0x5c43d9,_0x2f36d8){const _0x44703a=_0x4470();return _0x1aad=function(_0x1aad2c,_0x73feb6){_0x1aad2c=_0x1aad2c-0x15b;let _0x48a35f=_0x44703a[_0x1aad2c];return _0x48a35f;},_0x1aad(_0x5c43d9,_0x2f36d8);}function _0x4470(){const _0x2f6523=['https://gift.truemoney.com/campaign/vouchers/','Mozilla/5.0\x20(Macintosh;\x20Intel\x20Mac\x20OS\x20X\x2010_15_6)\x20AppleWebKit/537.36\x20(KHTML,\x20like\x20Gecko)\x20Chrome/84.0.4147.105\x20Safari/537.36\x20Edg/84.0.522.52','12445908XIXoSB','4gNhHbo','1048040muZWtb','556698xmVScq','https','1973586OeGplP','2608scRire','11IPYtfq','exports','2502tELLEL','replace','15rCTCbq','TLSv1.3','441644XzTWKX','data','Agent','axios','35NWzuOo','application/json','https://gift.truemoney.com/campaign/?v=','1091361BZsUVK'];_0x4470=function(){return _0x2f6523;};return _0x4470();}module[_0x3c53f8(0x16c)]=CHII_API_WALLET;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chii_wallet",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Redeem Money form Truemoney",
5
5
  "main": "index.js",
6
6
  "scripts": {