@akinon/pz-apple-pay 1.89.0 → 1.91.0-rc.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @akinon/pz-apple-pay
2
2
 
3
+ ## 1.91.0-rc.0
4
+
5
+ ### Minor Changes
6
+
7
+ - e974d8e: ZERO-3406: Fix rc build
8
+ - 7727ae55: ZERO-3073: Refactor basket page to use server-side data fetching and simplify component structure
9
+ - 33377cfd: ZERO-3267: Refactor import statement for ROUTES in error-page component
10
+
11
+ ## 1.90.0
12
+
13
+ ### Minor Changes
14
+
15
+ - f2e9d1d: ZERO-3383: Add custom UI rendering option for apple pay
16
+
3
17
  ## 1.89.0
4
18
 
5
19
  ## 1.88.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/pz-apple-pay",
3
- "version": "1.89.0",
3
+ "version": "1.91.0-rc.0",
4
4
  "license": "MIT",
5
5
  "main": "src/index.tsx",
6
6
  "peerDependencies": {
@@ -4,7 +4,14 @@ import { useAppSelector } from '@akinon/next/redux/hooks';
4
4
  import { RootState } from '@theme/redux/store';
5
5
  import useApplePay from '../hooks/use-apple-pay';
6
6
 
7
- export default function ApplePay() {
7
+ export interface ApplePayProps {
8
+ customUIRender?: (props: {
9
+ initPaymentRequest?: () => void;
10
+ paymentErrors?: string | null;
11
+ }) => JSX.Element | null;
12
+ }
13
+
14
+ export default function ApplePay({ customUIRender }: ApplePayProps) {
8
15
  const { walletPaymentData } = useAppSelector(
9
16
  (state: RootState) => state.checkout
10
17
  );
@@ -14,6 +21,13 @@ export default function ApplePay() {
14
21
  return null;
15
22
  }
16
23
 
24
+ if (customUIRender) {
25
+ return customUIRender({
26
+ initPaymentRequest,
27
+ paymentErrors
28
+ });
29
+ }
30
+
17
31
  return (
18
32
  <div>
19
33
  <button onClick={initPaymentRequest}>Pay with Apple Pay</button>