@graphcommerce/magento-payment-included 9.1.0-canary.18 → 9.1.0-canary.19
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 +6 -0
- package/components/CheckmoPaymentOptions.tsx +28 -0
- package/graphql/CheckmoConfig.graphql +12 -0
- package/methods.tsx +2 -1
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 9.1.0-canary.19
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2499](https://github.com/graphcommerce-org/graphcommerce/pull/2499) [`17312d7`](https://github.com/graphcommerce-org/graphcommerce/commit/17312d7992d91db32ac24e3b0f91b28c271618e1) - Make checkmo respect the payableTo and sendTo values ([@paales](https://github.com/paales))
|
|
8
|
+
|
|
3
9
|
## 9.1.0-canary.18
|
|
4
10
|
|
|
5
11
|
## 9.1.0-canary.17
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useQuery } from '@graphcommerce/graphql'
|
|
2
|
+
import { type PaymentOptionsProps } from '@graphcommerce/magento-cart-payment-method'
|
|
3
|
+
import { PaymentMethodOptionsNoop } from '@graphcommerce/magento-cart-payment-method/PaymentMethodOptionsNoop/PaymentMethodOptionsNoop'
|
|
4
|
+
import { StoreConfigDocument } from '@graphcommerce/magento-store'
|
|
5
|
+
import { SectionContainer } from '@graphcommerce/next-ui'
|
|
6
|
+
import React from 'react'
|
|
7
|
+
|
|
8
|
+
export function CheckmoPaymentOptions(props: PaymentOptionsProps) {
|
|
9
|
+
const config = useQuery(StoreConfigDocument).data?.storeConfig
|
|
10
|
+
const payableTo = config?.check_money_order_make_check_payable_to
|
|
11
|
+
const sendTo = config?.check_money_order_send_check_to?.split('\n')
|
|
12
|
+
|
|
13
|
+
if (!payableTo && !sendTo) return <PaymentMethodOptionsNoop {...props} />
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<PaymentMethodOptionsNoop {...props}>
|
|
17
|
+
<SectionContainer labelLeft='Payable to'>{payableTo}</SectionContainer>
|
|
18
|
+
<SectionContainer labelLeft='Send to'>
|
|
19
|
+
{sendTo?.map((line) => (
|
|
20
|
+
<React.Fragment key={line}>
|
|
21
|
+
{line}
|
|
22
|
+
<br />
|
|
23
|
+
</React.Fragment>
|
|
24
|
+
))}
|
|
25
|
+
</SectionContainer>
|
|
26
|
+
</PaymentMethodOptionsNoop>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
fragment CheckmoConfig on StoreConfig @inject(into: ["StoreConfigFragment"]) {
|
|
2
|
+
# check_money_order_enabled
|
|
3
|
+
# check_money_order_title
|
|
4
|
+
# check_money_order_new_order_status
|
|
5
|
+
# check_money_order_enable_for_specific_countries
|
|
6
|
+
# check_money_order_payment_from_specific_countries
|
|
7
|
+
check_money_order_make_check_payable_to
|
|
8
|
+
check_money_order_send_check_to
|
|
9
|
+
# check_money_order_min_order_total
|
|
10
|
+
# check_money_order_max_order_total
|
|
11
|
+
# check_money_order_sort_order
|
|
12
|
+
}
|
package/methods.tsx
CHANGED
|
@@ -2,9 +2,10 @@ import type { PaymentModule } from '@graphcommerce/magento-cart-payment-method/A
|
|
|
2
2
|
import { PaymentMethodOptionsNoop } from '@graphcommerce/magento-cart-payment-method/PaymentMethodOptionsNoop/PaymentMethodOptionsNoop'
|
|
3
3
|
import { PaymentMethodPlaceOrderNoop } from '@graphcommerce/magento-cart-payment-method/PaymentMethodPlaceOrderNoop/PaymentMethodPlaceOrderNoop'
|
|
4
4
|
import { ActionCard, iconCreditCard, IconSvg } from '@graphcommerce/next-ui'
|
|
5
|
+
import { CheckmoPaymentOptions } from './components/CheckmoPaymentOptions'
|
|
5
6
|
|
|
6
7
|
export const checkmo: PaymentModule = {
|
|
7
|
-
PaymentOptions:
|
|
8
|
+
PaymentOptions: CheckmoPaymentOptions,
|
|
8
9
|
PaymentPlaceOrder: PaymentMethodPlaceOrderNoop,
|
|
9
10
|
PaymentActionCard: (props) => <ActionCard {...props} image={<IconSvg src={iconCreditCard} />} />,
|
|
10
11
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/magento-payment-included",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "9.1.0-canary.
|
|
5
|
+
"version": "9.1.0-canary.19",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,20 +12,20 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@graphcommerce/ecommerce-ui": "^9.1.0-canary.
|
|
16
|
-
"@graphcommerce/eslint-config-pwa": "^9.1.0-canary.
|
|
17
|
-
"@graphcommerce/graphql": "^9.1.0-canary.
|
|
18
|
-
"@graphcommerce/image": "^9.1.0-canary.
|
|
19
|
-
"@graphcommerce/magento-cart": "^9.1.0-canary.
|
|
20
|
-
"@graphcommerce/magento-cart-payment-method": "^9.1.0-canary.
|
|
21
|
-
"@graphcommerce/magento-cart-shipping-address": "^9.1.0-canary.
|
|
22
|
-
"@graphcommerce/magento-product": "^9.1.0-canary.
|
|
23
|
-
"@graphcommerce/magento-product-configurable": "^9.1.0-canary.
|
|
24
|
-
"@graphcommerce/magento-store": "^9.1.0-canary.
|
|
25
|
-
"@graphcommerce/next-ui": "^9.1.0-canary.
|
|
26
|
-
"@graphcommerce/prettier-config-pwa": "^9.1.0-canary.
|
|
27
|
-
"@graphcommerce/react-hook-form": "^9.1.0-canary.
|
|
28
|
-
"@graphcommerce/typescript-config-pwa": "^9.1.0-canary.
|
|
15
|
+
"@graphcommerce/ecommerce-ui": "^9.1.0-canary.19",
|
|
16
|
+
"@graphcommerce/eslint-config-pwa": "^9.1.0-canary.19",
|
|
17
|
+
"@graphcommerce/graphql": "^9.1.0-canary.19",
|
|
18
|
+
"@graphcommerce/image": "^9.1.0-canary.19",
|
|
19
|
+
"@graphcommerce/magento-cart": "^9.1.0-canary.19",
|
|
20
|
+
"@graphcommerce/magento-cart-payment-method": "^9.1.0-canary.19",
|
|
21
|
+
"@graphcommerce/magento-cart-shipping-address": "^9.1.0-canary.19",
|
|
22
|
+
"@graphcommerce/magento-product": "^9.1.0-canary.19",
|
|
23
|
+
"@graphcommerce/magento-product-configurable": "^9.1.0-canary.19",
|
|
24
|
+
"@graphcommerce/magento-store": "^9.1.0-canary.19",
|
|
25
|
+
"@graphcommerce/next-ui": "^9.1.0-canary.19",
|
|
26
|
+
"@graphcommerce/prettier-config-pwa": "^9.1.0-canary.19",
|
|
27
|
+
"@graphcommerce/react-hook-form": "^9.1.0-canary.19",
|
|
28
|
+
"@graphcommerce/typescript-config-pwa": "^9.1.0-canary.19",
|
|
29
29
|
"@lingui/core": "^4.2.1",
|
|
30
30
|
"@lingui/macro": "^4.2.1",
|
|
31
31
|
"@lingui/react": "^4.2.1",
|