@inpost-pay/widget
v2.0.6
Published
## Description
Downloads
395
Maintainers
Readme
InPostPay Widget
Description
A frontend component (a widget) that can be embedded in a merchant’s website to allow customers to link their shopping basket with their InPost Pay account. InPost Pay is a payment solution offered by InPost, a logistics company that provides parcel locker services and delivery options, aiming to simplify e-commerce transactions.
Get in touch for access credentials and onboarding. https://inpostpay.pl
Changelog
2.0.6
- Deep-link target app is dynamically calculated from api url (
WidgetInitOptions#apiBaseUrl
), production by default.
2.0.5
- Widget is refreshing itself when basket has been changed by a customer on merchant's web page
2.0.4
- Added
refresh
to widget instance. Calling the method will re-fetch widget state from InPost backend and re-render widget(s) on the page.
export interface InPostPayWidget {
refresh: (options?: Partial<WidgetInitOptions>) => void
}
Example
import { initialiseInpostPayWidget } from '@inpost-pay/widget'
// ...
const widget = initialiseInpostPayWidget({
merchantClientId: 'merchantClientId'
});
// ...
widget.refresh()
// or
widget.refresh({
basketBindingApiKey: 'basketBindingApiKey'
})