@wearejh/m2-pwa-adyen 0.45.0 → 0.48.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
@@ -3,6 +3,48 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.48.0](https://github.com/WeareJH/mage-mono/compare/v0.47.0...v0.48.0) (2026-01-13)
7
+
8
+ **Note:** Version bump only for package @wearejh/m2-pwa-adyen
9
+
10
+
11
+
12
+
13
+
14
+ # [0.47.0](https://github.com/WeareJH/mage-mono/compare/v0.46.0...v0.47.0) (2026-01-13)
15
+
16
+ **Note:** Version bump only for package @wearejh/m2-pwa-adyen
17
+
18
+
19
+
20
+
21
+
22
+ # [0.46.0](https://github.com/WeareJH/mage-mono/compare/v0.45.1...v0.46.0) (2026-01-13)
23
+
24
+ **Note:** Version bump only for package @wearejh/m2-pwa-adyen
25
+
26
+
27
+
28
+
29
+
30
+ ## [0.45.1](https://github.com/WeareJH/mage-mono/compare/v0.45.0...v0.45.1) (2026-01-13)
31
+
32
+
33
+ ### Bug Fixes
34
+
35
+ * **m2-pwa-adyen:** Card payment input placeholder config (WOOD-3014) ([bb6c1e8](https://github.com/WeareJH/mage-mono/commit/bb6c1e89a99fe403db256cdc94b5df520cc10ef8))
36
+ * **m2-pwa-adyen:** hide Card payment button in favour of Woodies custom button (WOOD-3014) ([156526f](https://github.com/WeareJH/mage-mono/commit/156526ff8b3059f4a6dc4ff8d90e6122843de1cd))
37
+ * **m2-pwa-adyen:** remove early mounting of the Adyen card component. Wait for parent component (WOOD-3014) ([7f90ed9](https://github.com/WeareJH/mage-mono/commit/7f90ed9d625a654e83149c26c35581fb114dad9b))
38
+
39
+
40
+ ### Features
41
+
42
+ * **WOOD-3014:** Adyen card validation ([e7619d5](https://github.com/WeareJH/mage-mono/commit/e7619d519c6b6f925aa0f8eb45512ecc3cc96f53))
43
+
44
+
45
+
46
+
47
+
6
48
  # [0.45.0](https://github.com/WeareJH/mage-mono/compare/v0.44.0...v0.45.0) (2026-01-08)
7
49
 
8
50
  **Note:** Version bump only for package @wearejh/m2-pwa-adyen
@@ -44,6 +44,7 @@ interface AdyenContext
44
44
  children?: any;
45
45
  paymentFormSubmit(): void;
46
46
  paymentFormSubmitted: boolean;
47
+ resetPaymentFormSubmitted(): void;
47
48
 
48
49
  /**
49
50
  * A promise that resolves/rejects depending on
@@ -60,6 +61,7 @@ const initialState: AdyenContext = {
60
61
  checkoutConfig: initialStoreState.checkoutConfig,
61
62
  paymentFormSubmit: () => {},
62
63
  paymentFormSubmitted: false,
64
+ resetPaymentFormSubmitted: () => {},
63
65
  selectedPaymentMethod: initialStoreState.selectedPaymentMethod,
64
66
  step: initialStoreState.step,
65
67
  supportedPaymentMethods: initialStoreState.supportedPaymentMethods,
@@ -213,6 +215,17 @@ export function AdyenProvider(props: AdyenProviderProps) {
213
215
  paymentFormSubmitProp();
214
216
  }, [paymentFormSubmitProp]);
215
217
 
218
+ /**
219
+ * Reset the payment form submitted state.
220
+ * Called by Card component after triggering adyenCard.submit()
221
+ * to allow subsequent submit button clicks to work.
222
+ */
223
+ const resetPaymentFormSubmitted = useCallback(() => {
224
+ if (setHasFormSubmitted) {
225
+ setHasFormSubmitted(false);
226
+ }
227
+ }, [setHasFormSubmitted]);
228
+
216
229
  const attemptPayment = useCallback(
217
230
  (props: AttemptPaymentProps) => {
218
231
  const newState = {
@@ -287,6 +300,7 @@ export function AdyenProvider(props: AdyenProviderProps) {
287
300
  orderId,
288
301
  paymentFormSubmit,
289
302
  paymentFormSubmitted,
303
+ resetPaymentFormSubmitted,
290
304
  selectedPaymentMethod,
291
305
  step,
292
306
  supportedPaymentMethods: availiablePaymentMethods,
@@ -303,6 +317,7 @@ export function AdyenProvider(props: AdyenProviderProps) {
303
317
  orderId,
304
318
  paymentFormSubmit,
305
319
  paymentFormSubmitted,
320
+ resetPaymentFormSubmitted,
306
321
  selectedPaymentMethod,
307
322
  step,
308
323
  waitForPaymentFormSubmit,
@@ -22,7 +22,7 @@ import { ThreeDS2Fingerprint } from '../3DS/ThreeDS2Fingerprint';
22
22
  * @link Adyen Card Component Documentation - https://docs.adyen.com/payment-methods/cards/web-component#show-the-available-cards-in-your-payment-form
23
23
  */
24
24
  export function Card() {
25
- const { adyenCheckout, attemptPayment, paymentFormSubmitted, step } = useAdyen();
25
+ const { adyenCheckout, attemptPayment, paymentFormSubmitted, resetPaymentFormSubmitted, step } = useAdyen();
26
26
 
27
27
  const dispatch = useDispatch();
28
28
 
@@ -76,6 +76,12 @@ export function Card() {
76
76
  () => ({
77
77
  onError,
78
78
  onSubmit,
79
+ showPayButton: false,
80
+ placeholders: {
81
+ cardNumber: '1234 5678 9012 3456',
82
+ expiryDate: 'MM/YY',
83
+ securityCodeThreeDigits: '3 digits',
84
+ },
79
85
  }),
80
86
  [onError, onSubmit],
81
87
  );
@@ -88,7 +94,7 @@ export function Card() {
88
94
  const adyenCard = useMemo<CardElement>(() => {
89
95
  const { Card } = (window as any).AdyenWeb;
90
96
 
91
- return new Card(adyenCheckout, adyenCardConfig).mount('#card') as CardElement;
97
+ return new Card(adyenCheckout, adyenCardConfig) as CardElement;
92
98
  }, [adyenCheckout, adyenCardConfig]);
93
99
 
94
100
  /**
@@ -108,8 +114,9 @@ export function Card() {
108
114
  useEffect(() => {
109
115
  if (adyenCard && paymentFormSubmitted) {
110
116
  adyenCard.submit();
117
+ resetPaymentFormSubmitted();
111
118
  }
112
- }, [adyenCard, paymentFormSubmitted]);
119
+ }, [adyenCard, paymentFormSubmitted, resetPaymentFormSubmitted]);
113
120
 
114
121
  return (
115
122
  <>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wearejh/m2-pwa-adyen",
3
- "version": "0.45.0",
3
+ "version": "0.48.0",
4
4
  "description": "> TODO: description",
5
5
  "author": "Shane Osbourne <shane.osbourne8@gmail.com>",
6
6
  "homepage": "",
@@ -22,13 +22,13 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@adyen/adyen-web": "6.27.1",
25
- "@wearejh/m2-pwa-cart": "^0.45.0",
26
- "@wearejh/m2-pwa-checkout": "^0.45.0",
27
- "@wearejh/m2-pwa-engine": "^0.45.0",
28
- "@wearejh/react-hooks": "^0.45.0",
29
- "@wearejh/rx-form": "^0.45.0",
30
- "@wearejh/swagger-rxjs": "^0.45.0",
25
+ "@wearejh/m2-pwa-cart": "^0.48.0",
26
+ "@wearejh/m2-pwa-checkout": "^0.48.0",
27
+ "@wearejh/m2-pwa-engine": "^0.48.0",
28
+ "@wearejh/react-hooks": "^0.48.0",
29
+ "@wearejh/rx-form": "^0.48.0",
30
+ "@wearejh/swagger-rxjs": "^0.48.0",
31
31
  "load-js": "^3.0.3"
32
32
  },
33
- "gitHead": "f22c9f8583c85902860ec49590cae76752f8d227"
33
+ "gitHead": "f2de7635bc02cdeae6bf5babbc634c528ab09986"
34
34
  }