Skip to content

Commit

Permalink
fix: update request payment snippet to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Keivan-sf committed Sep 13, 2024
1 parent c39c3ae commit 1258b75
Showing 1 changed file with 3 additions and 3 deletions.
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 1258b75

Please sign in to comment.