@graphcommerce/magento-payment-multisafepay 9.0.1 → 9.0.2
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
|
@@ -3,7 +3,11 @@ import { useMutation } from '@graphcommerce/graphql'
|
|
|
3
3
|
import { useCartQuery, useFormGqlMutationCart } from '@graphcommerce/magento-cart'
|
|
4
4
|
import { BillingPageDocument } from '@graphcommerce/magento-cart-checkout'
|
|
5
5
|
import type { PaymentPlaceOrderProps } from '@graphcommerce/magento-cart-payment-method'
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
assertOrderPlaced,
|
|
8
|
+
throwGenericPlaceOrderError,
|
|
9
|
+
usePaymentMethodContext,
|
|
10
|
+
} from '@graphcommerce/magento-cart-payment-method'
|
|
7
11
|
import { ErrorSnackbar } from '@graphcommerce/next-ui'
|
|
8
12
|
import { t } from '@lingui/macro'
|
|
9
13
|
import { useRouter } from 'next/router'
|
|
@@ -27,14 +31,11 @@ export function MSPPaymentPlaceOrder(props: PaymentPlaceOrderProps) {
|
|
|
27
31
|
*/
|
|
28
32
|
const form = useFormGqlMutationCart(MSPPaymentPlaceOrderDocument, {
|
|
29
33
|
onComplete: async (result, variables) => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (result.errors) return
|
|
34
|
+
assertOrderPlaced(result)
|
|
35
|
+
const url = result.data.placeOrder.order.multisafepay_payment_url
|
|
33
36
|
|
|
34
37
|
if (!selectedMethod?.code) {
|
|
35
|
-
|
|
36
|
-
t`An error occurred while processing your payment. Please contact the store owner`,
|
|
37
|
-
)
|
|
38
|
+
throwGenericPlaceOrderError()
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
if (url?.error || !url?.payment_url) {
|
|
@@ -47,7 +48,7 @@ export function MSPPaymentPlaceOrder(props: PaymentPlaceOrderProps) {
|
|
|
47
48
|
|
|
48
49
|
await lock({
|
|
49
50
|
method: selectedMethod.code,
|
|
50
|
-
order_number: result.data
|
|
51
|
+
order_number: result.data.placeOrder.order.order_number,
|
|
51
52
|
})
|
|
52
53
|
|
|
53
54
|
await new Promise((resolve) => setTimeout(resolve, 1000))
|
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.
|
|
5
|
+
"version": "9.0.2",
|
|
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.
|
|
16
|
-
"@graphcommerce/eslint-config-pwa": "^9.0.
|
|
17
|
-
"@graphcommerce/graphql": "^9.0.
|
|
18
|
-
"@graphcommerce/graphql-mesh": "^9.0.
|
|
19
|
-
"@graphcommerce/image": "^9.0.
|
|
20
|
-
"@graphcommerce/magento-cart": "^9.0.
|
|
21
|
-
"@graphcommerce/magento-cart-checkout": "^9.0.
|
|
22
|
-
"@graphcommerce/magento-cart-payment-method": "^9.0.
|
|
23
|
-
"@graphcommerce/magento-cart-shipping-address": "^9.0.
|
|
24
|
-
"@graphcommerce/magento-product": "^9.0.
|
|
25
|
-
"@graphcommerce/magento-product-configurable": "^9.0.
|
|
26
|
-
"@graphcommerce/magento-store": "^9.0.
|
|
27
|
-
"@graphcommerce/next-ui": "^9.0.
|
|
28
|
-
"@graphcommerce/prettier-config-pwa": "^9.0.
|
|
29
|
-
"@graphcommerce/react-hook-form": "^9.0.
|
|
30
|
-
"@graphcommerce/typescript-config-pwa": "^9.0.
|
|
15
|
+
"@graphcommerce/ecommerce-ui": "^9.0.2",
|
|
16
|
+
"@graphcommerce/eslint-config-pwa": "^9.0.2",
|
|
17
|
+
"@graphcommerce/graphql": "^9.0.2",
|
|
18
|
+
"@graphcommerce/graphql-mesh": "^9.0.2",
|
|
19
|
+
"@graphcommerce/image": "^9.0.2",
|
|
20
|
+
"@graphcommerce/magento-cart": "^9.0.2",
|
|
21
|
+
"@graphcommerce/magento-cart-checkout": "^9.0.2",
|
|
22
|
+
"@graphcommerce/magento-cart-payment-method": "^9.0.2",
|
|
23
|
+
"@graphcommerce/magento-cart-shipping-address": "^9.0.2",
|
|
24
|
+
"@graphcommerce/magento-product": "^9.0.2",
|
|
25
|
+
"@graphcommerce/magento-product-configurable": "^9.0.2",
|
|
26
|
+
"@graphcommerce/magento-store": "^9.0.2",
|
|
27
|
+
"@graphcommerce/next-ui": "^9.0.2",
|
|
28
|
+
"@graphcommerce/prettier-config-pwa": "^9.0.2",
|
|
29
|
+
"@graphcommerce/react-hook-form": "^9.0.2",
|
|
30
|
+
"@graphcommerce/typescript-config-pwa": "^9.0.2",
|
|
31
31
|
"@lingui/core": "^4.2.1",
|
|
32
32
|
"@lingui/macro": "^4.2.1",
|
|
33
33
|
"@lingui/react": "^4.2.1",
|