Configuration
If you use multiple drivers, you might want to keep your all of your configurations in a separate file.
import { ConfigObject } from "monopay";
export const monopayConfig: ConfigObject = {
zarinpal: {
merchantId: "zarinpal-merchant",
sandbox: true,
},
zibal: {
merchantId: "zibal-merchant",
sandbox: true,
},
};
/** @type {import("monopay").ConfigObject} */
export const monopayConfig = {
zarinpal: {
merchantId: "zarinpal-merchant",
sandbox: true,
},
zibal: {
merchantId: "zibal-merchant",
sandbox: true,
}
}
And then import the configuration when creating the driver instance.