import env from "$env/index.js";

const parsianConfig = {
  gatewayUrl: env.PARSIAN_GATEWAY_URL,
  callbackUrl: env.PARSIAN_CALLBACK_URL,
  resultUrl: `${env.FRONT_BASE_URL}/payment-result`,

  confirmUrl: `${env.PARSIAN_CONFIRM_BASE_URL}.asmx?wsdl`,
  confirmSoapAction: `${env.PARSIAN_CONFIRM_BASE_URL}/ConfirmPayment`,
  confirmXmlns: env.PARSIAN_CONFIRM_BASE_URL,

  saleUrl: `${env.PARSIAN_SALE_BASE_URL}.asmx?wsdl`,
  saleSoapAction: `${env.PARSIAN_SALE_BASE_URL}/SalePaymentRequest`,
  saleXmlns: env.PARSIAN_SALE_BASE_URL,

  merchants: {
    OMID: {
      login: env.PARSIAN_OMID_LOGIN,
      terminalNo: Number(env.PARSIAN_OMID_TERMINAL),
      callbackUrl: env.PARSIAN_CALLBACK_URL,
    },
    GANJINEH: {
      login: env.PARSIAN_GANJINEH_LOGIN,
      terminalNo: Number(env.PARSIAN_GANJINEH_TERMINAL),
      callbackUrl: env.PARSIAN_CALLBACK_URL,
    },
    NAVID: {
      login: env.PARSIAN_NAVID_LOGIN,
      terminalNo: Number(env.PARSIAN_NAVID_TERMINAL),
      callbackUrl: env.PARSIAN_CALLBACK_URL,
    },
  },
};

export default parsianConfig;
