Skip to content

HallexCosta/clickpix-sdk

Repository files navigation

Overview

ClickPix SDK is an Proof of Concept implemented to think an openpix SDK to use in clickpix, allowing users developers manipuling the states from orders and charges and hold the click event to create an charge with the hook beforeCreateCharge

This is evolued version from v1 but with React and Rspack :)

Techs

  • React
  • Vanilla
  • OpenPix
  • TailwindCSS
  • Rspack

Important Concepts

  • Event Bus
  • Sync Memory with Fetch

How to run

Dev

pnpm dev

Build

pnpm build

Prod

pnpm start

Access the url: http://localhost:4459

If use pnpm start you can view in http://localhost:8085/examples/0.1.0/index.html or http://localhost:8085/build/index.html if already make build

Rules for use

To work fine is need the following the requeriments below:

  • Have an index.html file
  • Have a tag div defined with the class clickpix
    • You can defined [data-value]
    • You can defined [data-product-id]
    • You can defined [data-additional-info]
    • You can defined [data-additional-variant] (beta)
    • You can defined [data-customer-fields] (beta)
  • Tag div shall be have an attribute [data-product-id] with unique id
  • Once the price is added to the states, it cannot be changed.
  • Have a /v1/openpix.js plugin cdn
  • Have a tailwind cdn (it's needed because tailwind is not compiled into openpix-SDK yet)

Follow an example of implementation in examples/index.html

rspack-boilerplate

About

Clickpix Proof of Concept for implement an SDK

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •