@movmo/express-checkout-button 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/express-checkout.umd.js +5 -5
- package/dist/express-checkout.umd.js.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +2 -2
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -136,6 +136,7 @@ export default MyBookingPage;
|
|
|
136
136
|
| Step | What happens |
|
|
137
137
|
| ---- | ------------ |
|
|
138
138
|
| Click | The button saves the offer (if you passed `flightOffer`), stores a one-time `state` nonce in `sessionStorage['movmo:checkout:pending']`, then runs `location.assign('https://flights.movmo.io/booking?offerId=…&returnUrl=…&state=…')`. No `/movmo/checkout` route and no `frame-src` CSP entry are needed. |
|
|
139
|
+
| Pending | From the click until the Movmo page loads, the button is disabled and shows a spinner with "Opening Movmo…"; it resets if the offer save fails, the offer is missing, or the traveler returns with Back. |
|
|
139
140
|
| Return | Movmo navigates to your `returnUrl` with `movmo_exit` (`search_again`, `offer_unavailable`, `booking_confirmed`), `movmo_state` (echo of your nonce) and, when booked, `movmo_booking_id`. The airline PNR is in the URL **fragment** only: `#movmo_pnr=ABC123`, or inside your hash route (`#/checkout?movmo_pnr=ABC123`, `#/r?a=1&movmo_pnr=ABC123`). |
|
|
140
141
|
| Consume | On mount the button reads those params. If `movmo_state` matches the stored nonce it calls `onBookingComplete` (confirmed bookings only), then `onExit`, and clears the nonce. A mismatch or missing nonce logs a warning and calls nothing. Only this SDK's own params (`movmo_exit`, `movmo_state`, `movmo_booking_id` in the query, `movmo_pnr` in the hash) are removed from the address bar with `history.replaceState` on every call (also when there is no return, for leftovers); everything else, including `@movmo/connect-button`'s `movmo_signed_out` and `movmo_logout_state`, and your own query and hash, stays byte for byte. A pending record is single-use and expires after 24 hours. With two buttons on one page, the return is held for the button whose airline, provider and offer match the click, and the URL is scrubbed immediately. |
|
|
141
142
|
|