@graphcommerce/mollie-magento-payment 9.0.4-canary.12 → 9.0.4-canary.14
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 +8 -0
- package/methods.ts +1 -9
- package/package.json +16 -16
- package/components/MollieOptionsIssuer/MollieIdealOptions.tsx +0 -26
- package/components/MollieOptionsIssuer/MollieIssuerOptions.tsx +0 -58
- package/components/MollieOptionsIssuer/SetMolliePaymentMethodIssuerOnCart.graphql +0 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 9.0.4-canary.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2495](https://github.com/graphcommerce-org/graphcommerce/pull/2495) [`0fc9805`](https://github.com/graphcommerce-org/graphcommerce/commit/0fc98051b87cd7fc0363609b50211d2d7382a84d) - Remove issuer list from ideal payment method ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
|
|
8
|
+
|
|
9
|
+
## 9.0.4-canary.13
|
|
10
|
+
|
|
3
11
|
## 9.0.4-canary.12
|
|
4
12
|
|
|
5
13
|
## 9.0.4-canary.11
|
package/methods.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { PaymentModule } from '@graphcommerce/magento-cart-payment-method'
|
|
2
2
|
import { PaymentMethodOptionsNoop } from '@graphcommerce/magento-cart-payment-method'
|
|
3
3
|
import { MollieActionCard } from './components/MollieActionCard/MollieActionCard'
|
|
4
|
-
import { MollieIdealOptions } from './components/MollieOptionsIssuer/MollieIdealOptions'
|
|
5
4
|
import { MolliePaymentHandler } from './components/MolliePaymentHandler/MolliePaymentHandler'
|
|
6
5
|
import { MolliePlaceOrder } from './components/MolliePlaceOrder/MolliePlaceOrder'
|
|
7
6
|
|
|
@@ -12,13 +11,6 @@ const mollieModule: PaymentModule = {
|
|
|
12
11
|
PaymentPlaceOrder: MolliePlaceOrder,
|
|
13
12
|
}
|
|
14
13
|
|
|
15
|
-
const idealModule: PaymentModule = {
|
|
16
|
-
PaymentOptions: MollieIdealOptions,
|
|
17
|
-
PaymentActionCard: MollieActionCard,
|
|
18
|
-
PaymentHandler: MolliePaymentHandler,
|
|
19
|
-
PaymentPlaceOrder: MolliePlaceOrder,
|
|
20
|
-
}
|
|
21
|
-
|
|
22
14
|
/** List is extracted from https://github.com/mollie/magento2/blob/master/etc/payment.xml */
|
|
23
15
|
|
|
24
16
|
export const molliepayments: Record<string, PaymentModule> = {
|
|
@@ -32,7 +24,7 @@ export const molliepayments: Record<string, PaymentModule> = {
|
|
|
32
24
|
mollie_methods_eps: mollieModule,
|
|
33
25
|
mollie_methods_giftcard: mollieModule,
|
|
34
26
|
mollie_methods_giropay: mollieModule,
|
|
35
|
-
mollie_methods_ideal:
|
|
27
|
+
mollie_methods_ideal: mollieModule,
|
|
36
28
|
mollie_methods_in3: mollieModule,
|
|
37
29
|
mollie_methods_kbc: mollieModule,
|
|
38
30
|
mollie_methods_klarnapaylater: mollieModule,
|
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": "9.0.4-canary.
|
|
5
|
+
"version": "9.0.4-canary.14",
|
|
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": "^9.0.4-canary.
|
|
16
|
-
"@graphcommerce/eslint-config-pwa": "^9.0.4-canary.
|
|
17
|
-
"@graphcommerce/graphql": "^9.0.4-canary.
|
|
18
|
-
"@graphcommerce/graphql-mesh": "^9.0.4-canary.
|
|
19
|
-
"@graphcommerce/image": "^9.0.4-canary.
|
|
20
|
-
"@graphcommerce/magento-cart": "^9.0.4-canary.
|
|
21
|
-
"@graphcommerce/magento-cart-payment-method": "^9.0.4-canary.
|
|
22
|
-
"@graphcommerce/magento-cart-shipping-address": "^9.0.4-canary.
|
|
23
|
-
"@graphcommerce/magento-product": "^9.0.4-canary.
|
|
24
|
-
"@graphcommerce/magento-product-configurable": "^9.0.4-canary.
|
|
25
|
-
"@graphcommerce/magento-store": "^9.0.4-canary.
|
|
26
|
-
"@graphcommerce/next-ui": "^9.0.4-canary.
|
|
27
|
-
"@graphcommerce/prettier-config-pwa": "^9.0.4-canary.
|
|
28
|
-
"@graphcommerce/react-hook-form": "^9.0.4-canary.
|
|
29
|
-
"@graphcommerce/typescript-config-pwa": "^9.0.4-canary.
|
|
15
|
+
"@graphcommerce/ecommerce-ui": "^9.0.4-canary.14",
|
|
16
|
+
"@graphcommerce/eslint-config-pwa": "^9.0.4-canary.14",
|
|
17
|
+
"@graphcommerce/graphql": "^9.0.4-canary.14",
|
|
18
|
+
"@graphcommerce/graphql-mesh": "^9.0.4-canary.14",
|
|
19
|
+
"@graphcommerce/image": "^9.0.4-canary.14",
|
|
20
|
+
"@graphcommerce/magento-cart": "^9.0.4-canary.14",
|
|
21
|
+
"@graphcommerce/magento-cart-payment-method": "^9.0.4-canary.14",
|
|
22
|
+
"@graphcommerce/magento-cart-shipping-address": "^9.0.4-canary.14",
|
|
23
|
+
"@graphcommerce/magento-product": "^9.0.4-canary.14",
|
|
24
|
+
"@graphcommerce/magento-product-configurable": "^9.0.4-canary.14",
|
|
25
|
+
"@graphcommerce/magento-store": "^9.0.4-canary.14",
|
|
26
|
+
"@graphcommerce/next-ui": "^9.0.4-canary.14",
|
|
27
|
+
"@graphcommerce/prettier-config-pwa": "^9.0.4-canary.14",
|
|
28
|
+
"@graphcommerce/react-hook-form": "^9.0.4-canary.14",
|
|
29
|
+
"@graphcommerce/typescript-config-pwa": "^9.0.4-canary.14",
|
|
30
30
|
"@lingui/core": "^4.2.1",
|
|
31
31
|
"@lingui/macro": "^4.2.1",
|
|
32
32
|
"@lingui/react": "^4.2.1",
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { PaymentOptionsProps } from '@graphcommerce/magento-cart-payment-method'
|
|
2
|
-
import { i18n } from '@lingui/core'
|
|
3
|
-
import { Trans } from '@lingui/react'
|
|
4
|
-
import { Box } from '@mui/material'
|
|
5
|
-
import { MollieIssuerOptions } from './MollieIssuerOptions'
|
|
6
|
-
|
|
7
|
-
export function MollieIdealOptions(props: PaymentOptionsProps) {
|
|
8
|
-
return (
|
|
9
|
-
<MollieIssuerOptions label={i18n._(/* i18n */ 'Choose your bank')} {...props}>
|
|
10
|
-
<Box
|
|
11
|
-
component='ul'
|
|
12
|
-
sx={(theme) => ({ typography: 'body2', paddingLeft: theme.spacings.xs, margin: 0 })}
|
|
13
|
-
>
|
|
14
|
-
<li>
|
|
15
|
-
<Trans id='Choose your bank, and place your order.' />
|
|
16
|
-
</li>
|
|
17
|
-
<li>
|
|
18
|
-
<Trans id='Complete the payment on your bank’s website.' />
|
|
19
|
-
</li>
|
|
20
|
-
<li>
|
|
21
|
-
<Trans id='As soon as the payment is completed, you will automatically return to the webshop.' />
|
|
22
|
-
</li>
|
|
23
|
-
</Box>
|
|
24
|
-
</MollieIssuerOptions>
|
|
25
|
-
)
|
|
26
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { SelectElement } from '@graphcommerce/ecommerce-ui'
|
|
2
|
-
import { useFormGqlMutationCart } from '@graphcommerce/magento-cart'
|
|
3
|
-
import type { PaymentOptionsProps } from '@graphcommerce/magento-cart-payment-method'
|
|
4
|
-
import { filterNonNullableKeys, FormRow } from '@graphcommerce/next-ui'
|
|
5
|
-
import { FormPersist, useFormCompose } from '@graphcommerce/react-hook-form'
|
|
6
|
-
import { SetMolliePaymentMethodIssuerOnCartDocument } from './SetMolliePaymentMethodIssuerOnCart.gql'
|
|
7
|
-
|
|
8
|
-
export type MollieIssuerOptionsProps = PaymentOptionsProps & {
|
|
9
|
-
label: string
|
|
10
|
-
children?: React.ReactNode
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function MollieIssuerOptions(props: MollieIssuerOptionsProps) {
|
|
14
|
-
const { mollie_available_issuers = [], children } = props
|
|
15
|
-
const { code, step, label } = props
|
|
16
|
-
|
|
17
|
-
const form = useFormGqlMutationCart(SetMolliePaymentMethodIssuerOnCartDocument, {
|
|
18
|
-
defaultValues: { code },
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
const { handleSubmit, formState, required, control } = form
|
|
22
|
-
const submit = handleSubmit(() => {})
|
|
23
|
-
|
|
24
|
-
useFormCompose({ form, step, submit, key: `PaymentMethodOptions_${code}` })
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<>
|
|
28
|
-
<form onSubmit={submit} noValidate>
|
|
29
|
-
<FormRow>
|
|
30
|
-
<SelectElement
|
|
31
|
-
control={control}
|
|
32
|
-
name='issuer'
|
|
33
|
-
SelectProps={{ native: true, displayEmpty: true }}
|
|
34
|
-
variant='outlined'
|
|
35
|
-
helperText={formState.isSubmitted && formState.errors.issuer?.message}
|
|
36
|
-
label={label}
|
|
37
|
-
required={required.issuer}
|
|
38
|
-
showValid
|
|
39
|
-
options={filterNonNullableKeys(mollie_available_issuers, ['code', 'name']).map(
|
|
40
|
-
(option) => ({
|
|
41
|
-
id: option.code,
|
|
42
|
-
label: option.name,
|
|
43
|
-
}),
|
|
44
|
-
)}
|
|
45
|
-
/>
|
|
46
|
-
</FormRow>
|
|
47
|
-
</form>
|
|
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
|
-
</>
|
|
57
|
-
)
|
|
58
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
mutation SetMolliePaymentMethodIssuerOnCart($cartId: String!, $code: String!, $issuer: String!) {
|
|
2
|
-
setPaymentMethodOnCart(
|
|
3
|
-
input: { cart_id: $cartId, payment_method: { code: $code, mollie_selected_issuer: $issuer } }
|
|
4
|
-
) {
|
|
5
|
-
cart {
|
|
6
|
-
...PaymentMethodUpdated
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
}
|