@graphcommerce/mollie-magento-payment 8.1.0-canary.8 → 9.0.0-canary.100

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,201 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.0.0-canary.100
4
+
5
+ ## 9.0.0-canary.99
6
+
7
+ ## 9.0.0-canary.98
8
+
9
+ ## 9.0.0-canary.97
10
+
11
+ ## 9.0.0-canary.96
12
+
13
+ ## 9.0.0-canary.95
14
+
15
+ ## 9.0.0-canary.94
16
+
17
+ ## 9.0.0-canary.93
18
+
19
+ ## 9.0.0-canary.92
20
+
21
+ ## 9.0.0-canary.91
22
+
23
+ ## 9.0.0-canary.90
24
+
25
+ ## 9.0.0-canary.89
26
+
27
+ ## 9.0.0-canary.88
28
+
29
+ ## 9.0.0-canary.87
30
+
31
+ ## 9.0.0-canary.86
32
+
33
+ ## 9.0.0-canary.85
34
+
35
+ ## 9.0.0-canary.84
36
+
37
+ ## 9.0.0-canary.83
38
+
39
+ ## 9.0.0-canary.82
40
+
41
+ ## 9.0.0-canary.81
42
+
43
+ ## 9.0.0-canary.80
44
+
45
+ ### Patch Changes
46
+
47
+ - [#2341](https://github.com/graphcommerce-org/graphcommerce/pull/2341) [`86ecf9a`](https://github.com/graphcommerce-org/graphcommerce/commit/86ecf9a1bb4c48ceabd4944d81483bcd5b990350) - Payment method will now throw an error in onComplete to handle obscure errors ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
48
+
49
+ ## 9.0.0-canary.79
50
+
51
+ ## 9.0.0-canary.78
52
+
53
+ ## 9.0.0-canary.77
54
+
55
+ ## 9.0.0-canary.76
56
+
57
+ ## 9.0.0-canary.75
58
+
59
+ ## 9.0.0-canary.74
60
+
61
+ ## 9.0.0-canary.73
62
+
63
+ ## 9.0.0-canary.72
64
+
65
+ ## 9.0.0-canary.71
66
+
67
+ ## 9.0.0-canary.70
68
+
69
+ ## 9.0.0-canary.69
70
+
71
+ ## 9.0.0-canary.68
72
+
73
+ ## 9.0.0-canary.67
74
+
75
+ ## 9.0.0-canary.66
76
+
77
+ ## 9.0.0-canary.65
78
+
79
+ ## 9.0.0-canary.64
80
+
81
+ ## 9.0.0-canary.63
82
+
83
+ ## 9.0.0-canary.62
84
+
85
+ ## 9.0.0-canary.61
86
+
87
+ ## 9.0.0-canary.60
88
+
89
+ ### Patch Changes
90
+
91
+ - [#2331](https://github.com/graphcommerce-org/graphcommerce/pull/2331) [`702bfc9`](https://github.com/graphcommerce-org/graphcommerce/commit/702bfc93566c9745546988e57988431d5d4d8cb0) - Moved plugins to new format ([@paales](https://github.com/paales))
92
+
93
+ ## 9.0.0-canary.59
94
+
95
+ ## 9.0.0-canary.58
96
+
97
+ ## 9.0.0-canary.57
98
+
99
+ ## 9.0.0-canary.56
100
+
101
+ ## 9.0.0-canary.55
102
+
103
+ ## 9.0.0-canary.54
104
+
105
+ ## 8.1.0-canary.53
106
+
107
+ ## 8.1.0-canary.52
108
+
109
+ ## 8.1.0-canary.51
110
+
111
+ ## 8.1.0-canary.50
112
+
113
+ ## 8.1.0-canary.49
114
+
115
+ ## 8.1.0-canary.48
116
+
117
+ ## 8.1.0-canary.47
118
+
119
+ ## 8.1.0-canary.46
120
+
121
+ ## 8.1.0-canary.45
122
+
123
+ ## 8.1.0-canary.44
124
+
125
+ ## 8.1.0-canary.43
126
+
127
+ ## 8.1.0-canary.42
128
+
129
+ ## 8.1.0-canary.41
130
+
131
+ ## 8.1.0-canary.40
132
+
133
+ ## 8.1.0-canary.39
134
+
135
+ ## 8.1.0-canary.38
136
+
137
+ ### Patch Changes
138
+
139
+ - [#2305](https://github.com/graphcommerce-org/graphcommerce/pull/2305) [`77e8297`](https://github.com/graphcommerce-org/graphcommerce/commit/77e82976816994336c616208a651cb18ce9ea270) - Fix bug with persist not applying saved changes by moving <FromPersist/> below the form components ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
140
+
141
+ ## 8.1.0-canary.37
142
+
143
+ ## 8.1.0-canary.36
144
+
145
+ ## 8.1.0-canary.35
146
+
147
+ ## 8.1.0-canary.34
148
+
149
+ ## 8.1.0-canary.33
150
+
151
+ ## 8.1.0-canary.32
152
+
153
+ ## 8.1.0-canary.31
154
+
155
+ ## 8.1.0-canary.30
156
+
157
+ ## 8.1.0-canary.29
158
+
159
+ ## 8.1.0-canary.28
160
+
161
+ ## 8.1.0-canary.27
162
+
163
+ ## 8.1.0-canary.26
164
+
165
+ ## 8.1.0-canary.25
166
+
167
+ ## 8.1.0-canary.24
168
+
169
+ ## 8.1.0-canary.23
170
+
171
+ ## 8.1.0-canary.22
172
+
173
+ ## 8.1.0-canary.21
174
+
175
+ ## 8.1.0-canary.20
176
+
177
+ ## 8.1.0-canary.19
178
+
179
+ ## 8.1.0-canary.18
180
+
181
+ ## 8.1.0-canary.17
182
+
183
+ ## 8.1.0-canary.16
184
+
185
+ ## 8.1.0-canary.15
186
+
187
+ ## 8.1.0-canary.14
188
+
189
+ ## 8.1.0-canary.13
190
+
191
+ ## 8.1.0-canary.12
192
+
193
+ ## 8.1.0-canary.11
194
+
195
+ ## 8.1.0-canary.10
196
+
197
+ ## 8.1.0-canary.9
198
+
3
199
  ## 8.1.0-canary.8
4
200
 
5
201
  ## 8.1.0-canary.7
@@ -16,8 +212,7 @@
16
212
 
17
213
  ### Patch Changes
18
214
 
19
- - [#2234](https://github.com/graphcommerce-org/graphcommerce/pull/2234) [`530076e`](https://github.com/graphcommerce-org/graphcommerce/commit/530076e3664703cb8b577b7fcf1998a420819f60) - Moved all usages of useFormPersist to the <FormPersist/> component to prevent rerenders.
20
- ([@FrankHarland](https://github.com/FrankHarland))
215
+ - [#2234](https://github.com/graphcommerce-org/graphcommerce/pull/2234) [`530076e`](https://github.com/graphcommerce-org/graphcommerce/commit/530076e3664703cb8b577b7fcf1998a420819f60) - Moved all usages of useFormPersist to the <FormPersist/> component to prevent rerenders. ([@FrankHarland](https://github.com/FrankHarland))
21
216
 
22
217
  ## 8.0.6-canary.1
23
218
 
@@ -95,11 +290,9 @@
95
290
 
96
291
  ### Patch Changes
97
292
 
98
- - [#2092](https://github.com/graphcommerce-org/graphcommerce/pull/2092) [`1edd198`](https://github.com/graphcommerce-org/graphcommerce/commit/1edd198dc6b102be423a5285d9fe4437b69ca165) - An error message would be shown when a payment was sucessfull instead of when an error occured.
99
- ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
293
+ - [#2092](https://github.com/graphcommerce-org/graphcommerce/pull/2092) [`1edd198`](https://github.com/graphcommerce-org/graphcommerce/commit/1edd198dc6b102be423a5285d9fe4437b69ca165) - An error message would be shown when a payment was sucessfull instead of when an error occured. ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
100
294
 
101
- - [#2124](https://github.com/graphcommerce-org/graphcommerce/pull/2124) [`3bd80b8`](https://github.com/graphcommerce-org/graphcommerce/commit/3bd80b88351963ae95aaa97b2cfa25f8e526a128) - Fixed the issue where a guest returned to a empty cart after a canceled payment with Mollie
102
- ([@mikekeehnen](https://github.com/mikekeehnen))
295
+ - [#2124](https://github.com/graphcommerce-org/graphcommerce/pull/2124) [`3bd80b8`](https://github.com/graphcommerce-org/graphcommerce/commit/3bd80b88351963ae95aaa97b2cfa25f8e526a128) - Fixed the issue where a guest returned to a empty cart after a canceled payment with Mollie ([@mikekeehnen](https://github.com/mikekeehnen))
103
296
 
104
297
  ## 8.0.0-canary.100
105
298
 
@@ -1448,31 +1641,31 @@
1448
1641
  All occurences of `<Trans>` and `t` need to be replaced:
1449
1642
 
1450
1643
  ```tsx
1451
- import { Trans, t } from "@lingui/macro";
1644
+ import { Trans, t } from '@lingui/macro'
1452
1645
 
1453
1646
  function MyComponent() {
1454
- const foo = "bar";
1647
+ const foo = 'bar'
1455
1648
  return (
1456
1649
  <div aria-label={t`Account ${foo}`}>
1457
1650
  <Trans>My Translation {foo}</Trans>
1458
1651
  </div>
1459
- );
1652
+ )
1460
1653
  }
1461
1654
  ```
1462
1655
 
1463
1656
  Needs to be replaced with:
1464
1657
 
1465
1658
  ```tsx
1466
- import { Trans } from "@lingui/react";
1467
- import { i18n } from "@lingui/core";
1659
+ import { Trans } from '@lingui/react'
1660
+ import { i18n } from '@lingui/core'
1468
1661
 
1469
1662
  function MyComponent() {
1470
- const foo = "bar";
1663
+ const foo = 'bar'
1471
1664
  return (
1472
1665
  <div aria-label={i18n._(/* i18n */ `Account {foo}`, { foo })}>
1473
- <Trans key="My Translation {foo}" values={{ foo }}></Trans>
1666
+ <Trans key='My Translation {foo}' values={{ foo }}></Trans>
1474
1667
  </div>
1475
- );
1668
+ )
1476
1669
  }
1477
1670
  ```
1478
1671
 
@@ -26,13 +26,6 @@ export function MollieIssuerOptions(props: MollieIssuerOptionsProps) {
26
26
  return (
27
27
  <>
28
28
  <form onSubmit={submit} noValidate>
29
- <FormPersist
30
- // Since the issuer isn't retrievable from Magento we persist this value.
31
- form={form}
32
- name={`PaymentMethodOptions_${code}`}
33
- persist={['issuer']}
34
- storage='localStorage'
35
- />
36
29
  <FormRow>
37
30
  <SelectElement
38
31
  control={control}
@@ -53,6 +46,13 @@ export function MollieIssuerOptions(props: MollieIssuerOptionsProps) {
53
46
  </FormRow>
54
47
  </form>
55
48
  {children}
49
+ <FormPersist
50
+ // Since the issuer isn't retrievable from Magento we persist this value.
51
+ form={form}
52
+ name={`PaymentMethodOptions_${code}`}
53
+ persist={['issuer']}
54
+ storage='localStorage'
55
+ />
56
56
  </>
57
57
  )
58
58
  }
@@ -1,6 +1,7 @@
1
1
  import { useFormGqlMutationCart } from '@graphcommerce/magento-cart'
2
2
  import { PaymentPlaceOrderProps } from '@graphcommerce/magento-cart-payment-method'
3
3
  import { useFormCompose } from '@graphcommerce/react-hook-form'
4
+ import { t } from '@lingui/macro'
4
5
  import { useRouter } from 'next/router'
5
6
  import { useCartLockWithToken } from '../../hooks/useCartLockWithToken'
6
7
  import { MolliePlaceOrderDocument } from './MolliePlaceOrder.gql'
@@ -37,12 +38,9 @@ export function MolliePlaceOrder(props: PaymentPlaceOrderProps) {
37
38
 
38
39
  await push(mollie_redirect_url)
39
40
  } else {
40
- console.error(`incomplete mollie response, cannot redirect`, data.placeOrder)
41
-
42
- form.setError('root', {
43
- message:
44
- 'An error occurred while processing your payment. Please contact the store owner',
45
- })
41
+ throw Error(
42
+ t`An error occurred while processing your payment. Please contact the store owner`,
43
+ )
46
44
  }
47
45
  },
48
46
  })
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/mollie-magento-payment",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "8.1.0-canary.8",
5
+ "version": "9.0.0-canary.100",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,21 +12,21 @@
12
12
  }
13
13
  },
14
14
  "peerDependencies": {
15
- "@graphcommerce/ecommerce-ui": "^8.1.0-canary.8",
16
- "@graphcommerce/eslint-config-pwa": "^8.1.0-canary.8",
17
- "@graphcommerce/graphql": "^8.1.0-canary.8",
18
- "@graphcommerce/graphql-mesh": "^8.1.0-canary.8",
19
- "@graphcommerce/image": "^8.1.0-canary.8",
20
- "@graphcommerce/magento-cart": "^8.1.0-canary.8",
21
- "@graphcommerce/magento-cart-payment-method": "^8.1.0-canary.8",
22
- "@graphcommerce/magento-cart-shipping-address": "^8.1.0-canary.8",
23
- "@graphcommerce/magento-product": "^8.1.0-canary.8",
24
- "@graphcommerce/magento-product-configurable": "^8.1.0-canary.8",
25
- "@graphcommerce/magento-store": "^8.1.0-canary.8",
26
- "@graphcommerce/next-ui": "^8.1.0-canary.8",
27
- "@graphcommerce/prettier-config-pwa": "^8.1.0-canary.8",
28
- "@graphcommerce/react-hook-form": "^8.1.0-canary.8",
29
- "@graphcommerce/typescript-config-pwa": "^8.1.0-canary.8",
15
+ "@graphcommerce/ecommerce-ui": "^9.0.0-canary.100",
16
+ "@graphcommerce/eslint-config-pwa": "^9.0.0-canary.100",
17
+ "@graphcommerce/graphql": "^9.0.0-canary.100",
18
+ "@graphcommerce/graphql-mesh": "^9.0.0-canary.100",
19
+ "@graphcommerce/image": "^9.0.0-canary.100",
20
+ "@graphcommerce/magento-cart": "^9.0.0-canary.100",
21
+ "@graphcommerce/magento-cart-payment-method": "^9.0.0-canary.100",
22
+ "@graphcommerce/magento-cart-shipping-address": "^9.0.0-canary.100",
23
+ "@graphcommerce/magento-product": "^9.0.0-canary.100",
24
+ "@graphcommerce/magento-product-configurable": "^9.0.0-canary.100",
25
+ "@graphcommerce/magento-store": "^9.0.0-canary.100",
26
+ "@graphcommerce/next-ui": "^9.0.0-canary.100",
27
+ "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.100",
28
+ "@graphcommerce/react-hook-form": "^9.0.0-canary.100",
29
+ "@graphcommerce/typescript-config-pwa": "^9.0.0-canary.100",
30
30
  "@lingui/core": "^4.2.1",
31
31
  "@lingui/macro": "^4.2.1",
32
32
  "@lingui/react": "^4.2.1",
@@ -1,12 +1,15 @@
1
1
  import type { PaymentMethodContextProviderProps } from '@graphcommerce/magento-cart-payment-method'
2
- import type { PluginProps } from '@graphcommerce/next-config'
2
+ import type { PluginConfig, PluginProps } from '@graphcommerce/next-config'
3
3
  import { molliepayments } from '../methods'
4
4
 
5
- export const component = 'PaymentMethodContextProvider'
6
- export const exported = '@graphcommerce/magento-cart-payment-method'
5
+ export const config: PluginConfig = {
6
+ type: 'component',
7
+ module: '@graphcommerce/magento-cart-payment-method',
8
+ }
7
9
 
8
- function AddMollieMethods(props: PluginProps<PaymentMethodContextProviderProps>) {
10
+ export function PaymentMethodContextProvider(
11
+ props: PluginProps<PaymentMethodContextProviderProps>,
12
+ ) {
9
13
  const { modules, Prev, ...rest } = props
10
14
  return <Prev {...rest} modules={{ ...modules, ...molliepayments }} />
11
15
  }
12
- export const Plugin = AddMollieMethods