1.0.44 • Published 1 year ago

@kano/kbc-club-checkout v1.0.44

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

kbc-club-checkout

The club checkout wrapper for the Kano Studio Boilerplate apps, which uses the Club Checkout UI to create an iframe using the hosted club-checkout.kano.me custom Paddle checkout and handles tracking wherever the component is being used. Includes GTAG, FBQ and Kano Telemetry event listeners.

Usage

import { KbcClubCheckout } from '@kano/kbc-club-checkout'

const App = () => (
    return (
        <KbcClubCheckout
            showCheckout={ */ Trigger for showing the checkout /* }
            url="club-checkout.kano.me"
            path={ */ Select the checkout view, either 'checkout' (default) or 'redeem' (redeem is for best buy promo codes) /* }
            action={(action: string) => this.handleCheckoutAction(action)} // Currently only triggered by 'close-club-checkout' event to close the checkout
        />
    )
)

Checkout UI

Creates the checkout UI frame

Usage

Create the UI instance using the checkout url and path, if path is not provided the default is the checkout view

import ClubCheckout from '@kano/kbc-club-checkout';

// url: club-checkout.kano.me / staging.club-checkout.kano.me
// path: /checkout or /redeem (default is checkout)
this.clubCheckout = ClubCheckout.createUI(url, path);

Append the iframe to desired child in your app using getDomNode()

this.container.appendChild(this.clubCheckout.getDomNode());

Load in the frame using openCheckout(), awaiting result currently only occurs when the user tries to close the iframe, either by clicking the backdrop or the cross button.

const result = await this.clubCheckout.openCheckout();

You will need to action the result once the Promise is resolved by closing the iframe however you choose.

1.0.44

1 year ago

1.0.43

1 year ago

1.0.42

1 year ago

1.0.39

1 year ago

1.0.38

1 year ago

1.0.40

1 year ago

1.0.41

1 year ago

1.0.33

3 years ago

1.0.37

2 years ago

1.0.36

2 years ago

1.0.35

2 years ago

1.0.34

2 years ago

1.0.32

3 years ago

1.0.31

3 years ago

1.0.30

3 years ago

1.0.29

3 years ago

1.0.28

3 years ago

1.0.26

3 years ago

1.0.27

3 years ago

1.0.25

3 years ago

1.0.24

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.23

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago