@amos.com/react-amos-js 0.6.0 → 0.7.0

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.
Files changed (2) hide show
  1. package/README.md +2 -3
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -262,7 +262,7 @@ function CheckoutGooglePay() {
262
262
  }
263
263
  ```
264
264
 
265
- `AmosApplePayButton` uses the same props and express-checkout callbacks. Drop it in the same place (or alongside Google Pay) with the same `amount`, `merchantName`, and `onInitiatePaymentIntentRequest` wiring. The SDK handles Apple Pay's temporary full-viewport iframe overlay for Chrome's QR handoff automatically.
265
+ `AmosApplePayButton` uses the same props and express-checkout callbacks. Drop it in the same place (or alongside Google Pay) with the same `amount`, `merchantName`, and `onInitiatePaymentIntentRequest` wiring. On non-Safari browsers, Apple's QR handoff opens in a popup (`pay.apple.com`); Safari uses the native payment sheet.
266
266
 
267
267
  ### Saving a payment method with setup intent (credit card)
268
268
 
@@ -422,7 +422,7 @@ Renders the secure Google Pay iframe button (express checkout flow).
422
422
 
423
423
  Renders the secure Apple Pay iframe button (express checkout flow). Same props and callbacks as `AmosGooglePayButton`.
424
424
 
425
- The Apple Pay button and `ApplePaySession` run inside the Amos embed iframe, so only Amos domains need Apple merchant registration. When the embed needs Chrome's in-iframe QR handoff UI, it sends `EXPAND_IFRAME` and the SDK temporarily overlays that iframe full-viewport; `COLLAPSE_IFRAME` restores the button-sized layout. Merchants do not need to handle these messages themselves — they are part of the re-exported `@amos.com/amos-js` `Message` protocol and are handled automatically by `AmosApplePayButton`.
425
+ Only Amos domains need Apple merchant registration. The button and `ApplePaySession` run inside the Amos embed iframe. On Safari, the native payment sheet is used; on other browsers, Apple's QR handoff opens in a popup (`pay.apple.com`).
426
426
 
427
427
  ### `formatGooglePayPaymentData({ paymentData })`
428
428
 
@@ -447,7 +447,6 @@ Re-exports of the same advanced helpers exposed by `@amos.com/amos-js`. Most int
447
447
  - **`ref` / `iframeRef`**: for card and bank forms, pass `ref={iframeRef}` to the form component. The same `iframeRef` must be used when calling `validateForm`, `confirmPaymentIntent`, or `confirmSetupIntent`. The component forwards the ref to the inner iframe.
448
448
  - **Same components for payment vs setup intents**: `AmosCreditCardPaymentMethodForm` and `AmosBankAccountPaymentMethodForm` support both payment intents and setup intents. The flow differs only by which server call you make and which confirmation function you use (`confirmPaymentIntent` vs `confirmSetupIntent`). You may optionally provide `onPaymentIntentConfirmationSucceeded` and/or `onSetupIntentConfirmationSucceeded`; the appropriate one is invoked based on the flow.
449
449
  - **Amount format**: for `AmosGooglePayButton` and `AmosApplePayButton`, `amount` is a string (e.g. `"5000"` for $50.00). For `components["schemas"]["CreatePaymentIntentInput"]` on the server, `amount` is a number in cents (e.g. `5000`).
450
- - **Apple Pay iframe overlay**: do not clip or trap the Apple Pay iframe in an overflow-hidden container that would prevent the SDK's full-viewport expand. During expand, the SDK sets the iframe to `position: fixed` covering the viewport and hides `document.body` overflow; avoid fighting that with competing fixed overlays of your own at a higher z-index.
451
450
  - **Going framework-free**: if you need to use Amos outside of React (vanilla JS, another framework, etc.), use [`@amos.com/amos-js`](../amos-js) directly.
452
451
 
453
452
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amos.com/react-amos-js",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "main": "dist/index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -46,8 +46,8 @@
46
46
  "vite-plugin-dts": "5.0.3"
47
47
  },
48
48
  "dependencies": {
49
- "@amos.com/amos-js": "0.6.0",
50
- "@amos.com/node": "0.1.31",
49
+ "@amos.com/amos-js": "0.7.0",
50
+ "@amos.com/node": "0.1.32",
51
51
  "@types/googlepay": "0.7.11"
52
52
  },
53
53
  "peerDependencies": {