// backend/http-functions.js import { response } from 'wix-http-functions'; import { addToCurrentCart, updateCurrentCart } from 'wix-ecom-backend/current-cart'; import { createCheckoutFromCurrentCart } from 'wix-ecom-backend/current-cart'; import { getCheckoutUrl } from 'wix-ecom-backend/checkout'; // GET /_functions/metaCheckout?products=123:2,456:1 export async function get_metaCheckout(request) { try { const url = new URL(request.url); const raw = url.searchParams.get('products'); // Meta sends URL-encoded; Wix gives you raw here if (!raw) return badRequest('Missing products'); // 1) Clear the cart (set to empty) await updateCurrentCart({ lineItems: [] }); // clears any stale items // 2) Parse items like "123:2,456:1" const lineItems = []; decodeURIComponent(raw).split(',').forEach(pair => { const [idStr, qtyStr] = pair.split(':'); const productId = (idStr || '').trim(); const quantity = Number(qtyStr); if (productId && quantity > 0) { lineItems.push({ quantity, catalogReference: { // Wix Stores appId (keep as-is) appId: '1380b703-ce81-ff05-f115-39571d94dfcd', catalogItemId: productId // If you use variants, include variant info per your catalog setup. } }); } }); if (!lineItems.length) return badRequest('No valid products'); // 3) Add all items to the current visitor's cart await addToCurrentCart({ lineItems }); // 4) Create a checkout based on the current cart const { checkout } = await createCheckoutFromCurrentCart(); // 5) Get the native Wix checkout URL and 302 redirect the shopper there const { checkoutUrl } = await getCheckoutUrl(checkout._id); return redirect302(checkoutUrl); } catch (err) { console.error('metaCheckout error:', err); return response({ status: 500, headers: { 'Content-Type': 'application/json' }, body: { error: 'server_error' } }); } } function badRequest(msg) { return response({ status: 400, headers: { 'Content-Type': 'application/json' }, body: { error: msg } }); } function redirect302(location) { return response({ status: 302, // temporary redirect headers: { Location: location } }); }
top of page

This tri-exfoliating complex harnesses the peeling power of three

gentle acids in convenient pre-moistened, single-use pads. This peel works wonders to sweep away buildup of dead skin cells, revealing a bright, healthy, and youthful glow.

 

Alpha Hydroxy Acids (AHAs) are water-soluble and help to hydrate the skin while loosening the desmosomes between cells to allow for

gentle exfoliation. Salicylic Acid (BHA) is oil-soluble to reach inside the pores and lift out debris.

 

Size: 75 pads - 4.43 inch2 (28.3 CM2)

 

DO NOT FLUSH

 

Caution: Sunburn Alert: This product contains an alpha hydroxy acid (AHA) that may increase your skin's sensitivity to the sun and particularly the possibility of sunburn. Use a sunscreen, wear protective clothing, and limit sun exposure while using this product and for a week afterwards.

 

This statement has not been evaluated by the Food and Drug Administration. This product is not intended to diagnose, treat, cure, or prevent any disease.

Peel & Reveal Triple Action Clarifying Pads

$85.00Price
Quantity
  • Lactic Acid 5% / Mandelic Acid 5% – gentle AHAs help to brighten and hydrate the skin.

    Salicylic Acid 0.5% – plus additional Willow Bark Extract help to minimize blemishes and discolorations.

    Botanical blend of Green Tea, Licorice Root Extract, and Bearberry – (a natural source of hydroquinone) - combined help reduce sensitivity and hyperpigmentation for more even skin tone.

You Might Also Like

bottom of page