@tbbn/widget-checkout-redirect
v0.1.0
Published
Embeddable checkout hand-off component.
Readme
@tbbn/widget-checkout-redirect
Status: WORKING.
<tbbn-checkout-redirect trade-session-id="..." side="A" redirect-url-template="..."> — the
hand-off to the merchant's own checkout once a trade session reaches the checkout phase (per
checkout-service, fired at RESERVED -> WAITING_CHECKOUT_*).
Two modes:
redirect-url-templatepresent — navigateswindow.locationto the template with{tradeSessionId}/{side}/{amount}/{currency}placeholders substituted.- absent — emits a
tbbn-checkout-readyCustomEvent with{ tradeSessionId, side, amount, currency }instead, for a host page that wants to open its own checkout in a modal rather than a full navigation.
<script type="module" src="https://cdn.tbbnetwork.com/widgets/tbbn-checkout-redirect.js"></script>
<tbbn-checkout-redirect
api-base-url="https://api.tbbnetwork.com"
access-token="..."
trade-session-id="..."
side="A"
redirect-url-template="https://merchant.example.com/checkout?session={tradeSessionId}&amount={amount}"
></tbbn-checkout-redirect>Attributes
trade-session-id,side(required)redirect-url-template(optional)
Depends on
@tbbn/widget-core.
