@graphcommerce/magento-payment-braintree 8.1.0-canary.9 → 9.0.0-canary.100
Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,199 @@
|
|
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
|
+
### Minor Changes
|
46
|
+
|
47
|
+
- [#2341](https://github.com/graphcommerce-org/graphcommerce/pull/2341) [`1d6512d`](https://github.com/graphcommerce-org/graphcommerce/commit/1d6512d4118cfb46602aa1f2432c3566fdb3261d) - Rename experimental_useV2 prop to deprecated_useV1 in useFromGql and enable it by default ([@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
|
+
## 8.1.0-canary.37
|
138
|
+
|
139
|
+
## 8.1.0-canary.36
|
140
|
+
|
141
|
+
## 8.1.0-canary.35
|
142
|
+
|
143
|
+
## 8.1.0-canary.34
|
144
|
+
|
145
|
+
## 8.1.0-canary.33
|
146
|
+
|
147
|
+
## 8.1.0-canary.32
|
148
|
+
|
149
|
+
## 8.1.0-canary.31
|
150
|
+
|
151
|
+
## 8.1.0-canary.30
|
152
|
+
|
153
|
+
## 8.1.0-canary.29
|
154
|
+
|
155
|
+
## 8.1.0-canary.28
|
156
|
+
|
157
|
+
## 8.1.0-canary.27
|
158
|
+
|
159
|
+
## 8.1.0-canary.26
|
160
|
+
|
161
|
+
## 8.1.0-canary.25
|
162
|
+
|
163
|
+
## 8.1.0-canary.24
|
164
|
+
|
165
|
+
## 8.1.0-canary.23
|
166
|
+
|
167
|
+
## 8.1.0-canary.22
|
168
|
+
|
169
|
+
## 8.1.0-canary.21
|
170
|
+
|
171
|
+
## 8.1.0-canary.20
|
172
|
+
|
173
|
+
## 8.1.0-canary.19
|
174
|
+
|
175
|
+
## 8.1.0-canary.18
|
176
|
+
|
177
|
+
### Patch Changes
|
178
|
+
|
179
|
+
- [#2277](https://github.com/graphcommerce-org/graphcommerce/pull/2277) [`f9199f7`](https://github.com/graphcommerce-org/graphcommerce/commit/f9199f798583138a68dd641ea6637375c487f29b) - Solve issue where Braintree wouldn't place the order after successfully validating a Credit Card. ([@paales](https://github.com/paales))
|
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
|
+
|
3
197
|
## 8.1.0-canary.9
|
4
198
|
|
5
199
|
## 8.1.0-canary.8
|
@@ -18,8 +212,7 @@
|
|
18
212
|
|
19
213
|
### Patch Changes
|
20
214
|
|
21
|
-
- [#2234](https://github.com/graphcommerce-org/graphcommerce/pull/2234) [`43bd04a`](https://github.com/graphcommerce-org/graphcommerce/commit/43bd04a777c5800cc7e01bee1e123a5aad82f194) - Prevent BillingPage query from rerunning on each mutation
|
22
|
-
([@FrankHarland](https://github.com/FrankHarland))
|
215
|
+
- [#2234](https://github.com/graphcommerce-org/graphcommerce/pull/2234) [`43bd04a`](https://github.com/graphcommerce-org/graphcommerce/commit/43bd04a777c5800cc7e01bee1e123a5aad82f194) - Prevent BillingPage query from rerunning on each mutation ([@FrankHarland](https://github.com/FrankHarland))
|
23
216
|
|
24
217
|
## 8.0.6-canary.1
|
25
218
|
|
@@ -29,8 +222,7 @@
|
|
29
222
|
|
30
223
|
### Patch Changes
|
31
224
|
|
32
|
-
- [#2188](https://github.com/graphcommerce-org/graphcommerce/pull/2188) [`eec7498`](https://github.com/graphcommerce-org/graphcommerce/commit/eec7498213f34f0f850123b577b77bf678e3c80b) - Braintree Credit Card: Hosted payment fields now have proper styling and all focus/blur and error states are correctly handled.
|
33
|
-
([@paales](https://github.com/paales))
|
225
|
+
- [#2188](https://github.com/graphcommerce-org/graphcommerce/pull/2188) [`eec7498`](https://github.com/graphcommerce-org/graphcommerce/commit/eec7498213f34f0f850123b577b77bf678e3c80b) - Braintree Credit Card: Hosted payment fields now have proper styling and all focus/blur and error states are correctly handled. ([@paales](https://github.com/paales))
|
34
226
|
|
35
227
|
## 8.0.5-canary.10
|
36
228
|
|
@@ -46,8 +238,7 @@
|
|
46
238
|
|
47
239
|
### Patch Changes
|
48
240
|
|
49
|
-
- [#2188](https://github.com/graphcommerce-org/graphcommerce/pull/2188) [`eec7498`](https://github.com/graphcommerce-org/graphcommerce/commit/eec7498213f34f0f850123b577b77bf678e3c80b) - Braintree Credit Card: Hosted payment fields now have proper styling and all focus/blur and error states are correctly handled.
|
50
|
-
([@paales](https://github.com/paales))
|
241
|
+
- [#2188](https://github.com/graphcommerce-org/graphcommerce/pull/2188) [`eec7498`](https://github.com/graphcommerce-org/graphcommerce/commit/eec7498213f34f0f850123b577b77bf678e3c80b) - Braintree Credit Card: Hosted payment fields now have proper styling and all focus/blur and error states are correctly handled. ([@paales](https://github.com/paales))
|
51
242
|
|
52
243
|
## 8.0.5-canary.4
|
53
244
|
|
@@ -1411,31 +1602,31 @@
|
|
1411
1602
|
All occurences of `<Trans>` and `t` need to be replaced:
|
1412
1603
|
|
1413
1604
|
```tsx
|
1414
|
-
import { Trans, t } from
|
1605
|
+
import { Trans, t } from '@lingui/macro'
|
1415
1606
|
|
1416
1607
|
function MyComponent() {
|
1417
|
-
const foo =
|
1608
|
+
const foo = 'bar'
|
1418
1609
|
return (
|
1419
1610
|
<div aria-label={t`Account ${foo}`}>
|
1420
1611
|
<Trans>My Translation {foo}</Trans>
|
1421
1612
|
</div>
|
1422
|
-
)
|
1613
|
+
)
|
1423
1614
|
}
|
1424
1615
|
```
|
1425
1616
|
|
1426
1617
|
Needs to be replaced with:
|
1427
1618
|
|
1428
1619
|
```tsx
|
1429
|
-
import { Trans } from
|
1430
|
-
import { i18n } from
|
1620
|
+
import { Trans } from '@lingui/react'
|
1621
|
+
import { i18n } from '@lingui/core'
|
1431
1622
|
|
1432
1623
|
function MyComponent() {
|
1433
|
-
const foo =
|
1624
|
+
const foo = 'bar'
|
1434
1625
|
return (
|
1435
1626
|
<div aria-label={i18n._(/* i18n */ `Account {foo}`, { foo })}>
|
1436
|
-
<Trans key=
|
1627
|
+
<Trans key='My Translation {foo}' values={{ foo }}></Trans>
|
1437
1628
|
</div>
|
1438
|
-
)
|
1629
|
+
)
|
1439
1630
|
}
|
1440
1631
|
```
|
1441
1632
|
|
@@ -159,7 +159,6 @@ export function PaymentMethodOptions(props: PaymentOptionsProps) {
|
|
159
159
|
}
|
160
160
|
>(BraintreePaymentMethodOptionsDocument, {
|
161
161
|
defaultValues: { code },
|
162
|
-
experimental_useV2: true,
|
163
162
|
onBeforeSubmit: async (variables) => {
|
164
163
|
if (!hostedFields) throw new Error('Hosted fields not available')
|
165
164
|
if (!threeDSecure) throw new Error('3D Secure not available')
|
@@ -1,7 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
PaymentModule,
|
4
|
-
} from '@graphcommerce/magento-cart-payment-method'
|
1
|
+
import type { PaymentModule } from '@graphcommerce/magento-cart-payment-method'
|
2
|
+
import { PaymentMethodPlaceOrderNoop } from '@graphcommerce/magento-cart-payment-method/PaymentMethodPlaceOrderNoop/PaymentMethodPlaceOrderNoop'
|
5
3
|
import { PaymentMethodOptions } from './PaymentMethodOptions'
|
6
4
|
|
7
5
|
export const braintree: PaymentModule = {
|
@@ -8,7 +8,6 @@ import { useFormCompose } from '@graphcommerce/react-hook-form'
|
|
8
8
|
import type { FlowType, Intent } from 'paypal-checkout-components'
|
9
9
|
import { useEffect } from 'react'
|
10
10
|
import { BraintreePaymentMethodOptionsDocument } from '../../BraintreePaymentMethodOptions.gql'
|
11
|
-
import { StartPaymentOptions } from '../../hooks/useBraintree'
|
12
11
|
import { useBraintreeCartLock } from '../../hooks/useBraintreeCartLock'
|
13
12
|
import { useBraintreePaypal } from '../../hooks/useBraintreePaypal'
|
14
13
|
import { isBraintreeError } from '../../utils/isBraintreeError'
|
@@ -44,8 +43,6 @@ export function PaymentMethodOptions(props: PaymentOptionsProps) {
|
|
44
43
|
|
45
44
|
const address = cartData.cart.shipping_addresses?.[0]
|
46
45
|
|
47
|
-
console.log('hoi')
|
48
|
-
|
49
46
|
const nonce = await paypal.createPayment({
|
50
47
|
flow: 'checkout' as FlowType, // Required
|
51
48
|
amount: cartData.cart.prices.grand_total.value,
|
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "@graphcommerce/magento-payment-braintree",
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
5
|
-
"version": "
|
5
|
+
"version": "9.0.0-canary.100",
|
6
6
|
"sideEffects": false,
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
8
8
|
"eslintConfig": {
|
@@ -12,25 +12,25 @@
|
|
12
12
|
}
|
13
13
|
},
|
14
14
|
"devDependencies": {
|
15
|
-
"@types/braintree-web": "^3.96.
|
15
|
+
"@types/braintree-web": "^3.96.12"
|
16
16
|
},
|
17
17
|
"dependencies": {
|
18
|
-
"braintree-web": "^3.
|
18
|
+
"braintree-web": "^3.103.0"
|
19
19
|
},
|
20
20
|
"peerDependencies": {
|
21
|
-
"@graphcommerce/eslint-config-pwa": "^
|
22
|
-
"@graphcommerce/graphql": "^
|
23
|
-
"@graphcommerce/image": "^
|
24
|
-
"@graphcommerce/magento-cart": "^
|
25
|
-
"@graphcommerce/magento-cart-payment-method": "^
|
26
|
-
"@graphcommerce/magento-cart-shipping-address": "^
|
27
|
-
"@graphcommerce/magento-product": "^
|
28
|
-
"@graphcommerce/magento-product-configurable": "^
|
29
|
-
"@graphcommerce/magento-store": "^
|
30
|
-
"@graphcommerce/next-ui": "^
|
31
|
-
"@graphcommerce/prettier-config-pwa": "^
|
32
|
-
"@graphcommerce/react-hook-form": "^
|
33
|
-
"@graphcommerce/typescript-config-pwa": "^
|
21
|
+
"@graphcommerce/eslint-config-pwa": "^9.0.0-canary.100",
|
22
|
+
"@graphcommerce/graphql": "^9.0.0-canary.100",
|
23
|
+
"@graphcommerce/image": "^9.0.0-canary.100",
|
24
|
+
"@graphcommerce/magento-cart": "^9.0.0-canary.100",
|
25
|
+
"@graphcommerce/magento-cart-payment-method": "^9.0.0-canary.100",
|
26
|
+
"@graphcommerce/magento-cart-shipping-address": "^9.0.0-canary.100",
|
27
|
+
"@graphcommerce/magento-product": "^9.0.0-canary.100",
|
28
|
+
"@graphcommerce/magento-product-configurable": "^9.0.0-canary.100",
|
29
|
+
"@graphcommerce/magento-store": "^9.0.0-canary.100",
|
30
|
+
"@graphcommerce/next-ui": "^9.0.0-canary.100",
|
31
|
+
"@graphcommerce/prettier-config-pwa": "^9.0.0-canary.100",
|
32
|
+
"@graphcommerce/react-hook-form": "^9.0.0-canary.100",
|
33
|
+
"@graphcommerce/typescript-config-pwa": "^9.0.0-canary.100",
|
34
34
|
"@lingui/core": "^4.2.1",
|
35
35
|
"@lingui/macro": "^4.2.1",
|
36
36
|
"@lingui/react": "^4.2.1",
|
@@ -1,13 +1,17 @@
|
|
1
1
|
import { 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 { braintree } from '../methods/braintree'
|
4
4
|
import { braintree_local_payment } from '../methods/braintree_local_payments'
|
5
5
|
import { braintree_paypal } from '../methods/braintree_paypal'
|
6
6
|
|
7
|
-
export const
|
8
|
-
|
7
|
+
export const config: PluginConfig = {
|
8
|
+
type: 'component',
|
9
|
+
module: '@graphcommerce/magento-cart-payment-method',
|
10
|
+
}
|
9
11
|
|
10
|
-
function
|
12
|
+
export function PaymentMethodContextProvider(
|
13
|
+
props: PluginProps<PaymentMethodContextProviderProps>,
|
14
|
+
) {
|
11
15
|
const { modules, Prev, ...rest } = props
|
12
16
|
return (
|
13
17
|
<Prev
|
@@ -21,5 +25,3 @@ function AddBrainTreeMethods(props: PluginProps<PaymentMethodContextProviderProp
|
|
21
25
|
/>
|
22
26
|
)
|
23
27
|
}
|
24
|
-
|
25
|
-
export const Plugin = AddBrainTreeMethods
|