Voucher Update - 1 PM 19.4.2024

Chạy nếu bị báo là chưa tới thời điểm thì mai chạy lại, vì một số mã mai Shopee mới cho add nha mọi người

Bước 1: Mở máy tính vào trang https://shope.ee/1VYRopPjA1

Bước 2: F12 -> Qua Tab Console xong rồi copy nội dung này vào enter là xong

const aVourchers =   ['AFFIZ59', 'AFFDG12', 'AFFJW82', 'AFFORG', 'AFFHTW'];
async function addVoucher(oPayload){

    try {

        const response = await fetch("<https://shopee.vn/api/v2/voucher_wallet/save_voucher>", {

            "headers": {

                "accept": "application/json",

                "accept-language": "en-US,en;q=0.9",

                "cache-control": "no-cache",

                "content-type": "application/json",

                "pragma": "no-cache",

                "sec-ch-ua": "\\"Google Chrome\\";v=\\"119\\", \\"Chromium\\";v=\\"119\\", \\"Not?A_Brand\\";v=\\"24\\"",

                "sec-ch-ua-mobile": "?0",

                "sec-ch-ua-platform": "\\"Windows\\"",

                "sec-fetch-dest": "empty",

                "sec-fetch-mode": "cors",

                "sec-fetch-site": "same-origin",

                "x-api-source": "pc",

                "x-requested-with": "XMLHttpRequest",

                "x-shopee-language": "vi",

                "x-sz-sdk-version": "3.1.0-2&1.5.1"

            },

            "referrer": "<https://shopee.vn/user/voucher-wallet>",

            "referrerPolicy": "strict-origin-when-cross-origin",

            "body": JSON.stringify(oPayload),

            "method": "POST",

            "mode": "cors",

            "credentials": "include"

        });

        const responseData = await response.json();

        if (responseData && (responseData.error == 4 || responseData.error == 14)) {

            console.error("Thêm Voucher: " + oPayload.voucher_code + " - Lỗi: " + responseData.error_msg);

        } else {

            console.log("Thêm Voucher thành công:", oPayload.voucher_code);

        }

    } catch (error) {

        console.error("Thêm Voucher lỗi: ", error);

    }
}

async function runAddVoucher() {

    console.clear();

    for (let i = 0; i <= aVourchers.length; i++) {

        if (aVourchers[i]) {

            let oPayload = {

                "voucher_code": aVourchers[i],

                "need_user_voucher_status": true

            };

            await this.addVoucher(oPayload);

        }

        if (i == aVourchers.length) {

            console.log("Mọi người add voucher trong máy tính rồi lên điện thoại trước khi mua vào link aff giúp mình xin cảm ơn! - Link AFF: <https://shope.ee/9pDbJJxjRC>");

        }

    }

}

this.runAddVoucher();