From 1258b751bee56d33e138e724d2d6b3059609f059 Mon Sep 17 00:00:00 2001 From: keivan-sf Date: Fri, 13 Sep 2024 11:00:29 +0330 Subject: [PATCH 1/2] fix: update request payment snippet to v2 --- snippets/usage/request.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/snippets/usage/request.ts b/snippets/usage/request.ts index d2c8b14..781de29 100644 --- a/snippets/usage/request.ts +++ b/snippets/usage/request.ts @@ -1,10 +1,10 @@ -import { getPaymentDriver, Zarinpal } from "monopay"; +import { getPaymentDriver } from "monopay"; -const driver = getPaymentDriver("zarinpal", { +const driver = getPaymentDriver<"zarinpal">("zarinpal")({ merchantId: "zarinpal-merchant", }); -const paymentInfo = await driver.requestPayment({ +const paymentInfo = await driver.request({ amount: 50000, callbackUrl: "https://my-site.com/callback", description: "Description about the transaction", From d81a5c4034417a52f069f652ac660c802624e828 Mon Sep 17 00:00:00 2001 From: keivan-sf Date: Fri, 13 Sep 2024 11:39:27 +0330 Subject: [PATCH 2/2] fix: downgrade @mdx-js/react to resolve build errors --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7de0d51..6ef83c6 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "dependencies": { "@docusaurus/core": "^2.1.0", "@docusaurus/preset-classic": "^2.1.0", - "@mdx-js/react": "^2.1.3", + "@mdx-js/react": "^1.6.22", "@svgr/webpack": "^6.3.1", "clsx": "^1.2.1", "file-loader": "^6.2.0",