Skip to content

Commit

Permalink
Merge pull request #65 from alitnk/64-documentation-is-outdated
Browse files Browse the repository at this point in the history
fix: update request payment snippet to v2
  • Loading branch information
Keivan-sf authored Sep 13, 2024
2 parents c39c3ae + d81a5c4 commit 419a4f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions snippets/usage/request.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { getPaymentDriver, Zarinpal } from "monopay";
import { getPaymentDriver } from "monopay";

const driver = getPaymentDriver<Zarinpal>("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",
Expand Down

0 comments on commit 419a4f4

Please sign in to comment.