@graphcommerce/magento-payment-multisafepay 9.0.0-canary.78 → 9.0.0-canary.80

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,13 @@
1
1
  # @graphcommerce/magento-payment-multisafepay
2
2
 
3
+ ## 9.0.0-canary.80
4
+
5
+ ### Patch Changes
6
+
7
+ - [#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))
8
+
9
+ ## 9.0.0-canary.79
10
+
3
11
  ## 9.0.0-canary.78
4
12
 
5
13
  ## 9.0.0-canary.77
@@ -1,4 +1,4 @@
1
- import { useFormCompose, ApolloErrorSnackbar } from '@graphcommerce/ecommerce-ui'
1
+ import { ApolloErrorSnackbar, useFormCompose } from '@graphcommerce/ecommerce-ui'
2
2
  import { useMutation } from '@graphcommerce/graphql'
3
3
  import { useCartQuery, useFormGqlMutationCart } from '@graphcommerce/magento-cart'
4
4
  import { BillingPageDocument } from '@graphcommerce/magento-cart-checkout'
@@ -7,6 +7,7 @@ import {
7
7
  usePaymentMethodContext,
8
8
  } from '@graphcommerce/magento-cart-payment-method'
9
9
  import { ErrorSnackbar } from '@graphcommerce/next-ui'
10
+ import { t } from '@lingui/macro'
10
11
  import { useRouter } from 'next/router'
11
12
  import { useMSPCartLock } from '../../hooks/useMSPCartLock'
12
13
  import { MSPPaymentHandlerDocument } from '../MSPPaymentHandler/MSPPaymentHandler.gql'
@@ -30,14 +31,12 @@ export function MSPPaymentPlaceOrder(props: PaymentPlaceOrderProps) {
30
31
  onComplete: async (result, variables) => {
31
32
  const url = result.data?.placeOrder?.order.multisafepay_payment_url
32
33
 
33
- if (result.errors) {
34
- console.error('<MSPPaymentOptionsAndPlaceOrder/>', result.errors)
35
- return
36
- }
34
+ if (result.errors) return
37
35
 
38
36
  if (!selectedMethod?.code) {
39
- console.error('<MSPPaymentOptionsAndPlaceOrder/> not selectedMethod.code')
40
- return
37
+ throw Error(
38
+ t`An error occurred while processing your payment. Please contact the store owner`,
39
+ )
41
40
  }
42
41
 
43
42
  if (url?.error || !url?.payment_url) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-payment-multisafepay",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "9.0.0-canary.78",
5
+ "version": "9.0.0-canary.80",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,22 +12,22 @@
12
12
  }
13
13
  },
14
14
  "peerDependencies": {
15
- "@graphcommerce/ecommerce-ui": "^9.0.0-canary.78",
16
- "@graphcommerce/eslint-config-pwa": "^9.0.0-canary.78",
17
- "@graphcommerce/graphql": "^9.0.0-canary.78",
18
- "@graphcommerce/graphql-mesh": "^9.0.0-canary.78",
19
- "@graphcommerce/image": "^9.0.0-canary.78",
20
- "@graphcommerce/magento-cart": "^9.0.0-canary.78",
21
- "@graphcommerce/magento-cart-checkout": "^9.0.0-canary.78",
22
- "@graphcommerce/magento-cart-payment-method": "^9.0.0-canary.78",
23
- "@graphcommerce/magento-cart-shipping-address": "^9.0.0-canary.78",
24
- "@graphcommerce/magento-product": "^9.0.0-canary.78",
25
- "@graphcommerce/magento-product-configurable": "^9.0.0-canary.78",
26
- "@graphcommerce/magento-store": "^9.0.0-canary.78",
27
- "@graphcommerce/next-ui": "^9.0.0-canary.78",
28
- "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.78",
29
- "@graphcommerce/react-hook-form": "^9.0.0-canary.78",
30
- "@graphcommerce/typescript-config-pwa": "^9.0.0-canary.78",
15
+ "@graphcommerce/ecommerce-ui": "^9.0.0-canary.80",
16
+ "@graphcommerce/eslint-config-pwa": "^9.0.0-canary.80",
17
+ "@graphcommerce/graphql": "^9.0.0-canary.80",
18
+ "@graphcommerce/graphql-mesh": "^9.0.0-canary.80",
19
+ "@graphcommerce/image": "^9.0.0-canary.80",
20
+ "@graphcommerce/magento-cart": "^9.0.0-canary.80",
21
+ "@graphcommerce/magento-cart-checkout": "^9.0.0-canary.80",
22
+ "@graphcommerce/magento-cart-payment-method": "^9.0.0-canary.80",
23
+ "@graphcommerce/magento-cart-shipping-address": "^9.0.0-canary.80",
24
+ "@graphcommerce/magento-product": "^9.0.0-canary.80",
25
+ "@graphcommerce/magento-product-configurable": "^9.0.0-canary.80",
26
+ "@graphcommerce/magento-store": "^9.0.0-canary.80",
27
+ "@graphcommerce/next-ui": "^9.0.0-canary.80",
28
+ "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.80",
29
+ "@graphcommerce/react-hook-form": "^9.0.0-canary.80",
30
+ "@graphcommerce/typescript-config-pwa": "^9.0.0-canary.80",
31
31
  "@lingui/core": "^4.2.1",
32
32
  "@lingui/macro": "^4.2.1",
33
33
  "@lingui/react": "^4.2.1",