Paytrail payment provider plugin for Medusa
Paytrail payment provider plugin for Medusa.
This package is published to NPM as .
Add the package to your Medusa backend:
yarn add @solteq-excom/medusa-payment-paytrailRegister the plugin and payment provider in your :
1plugins: [2 {3 resolve: "@solteq-excom/medusa-payment-paytrail",4 options: {},5 },6],7modules: [8 {9 resolve: "@medusajs/medusa/payment",10 options: {11 providers: [12 {13 resolve: "@solteq-excom/medusa-payment-paytrail/providers/paytrail",14 id: "paytrail",15 options: {16 merchantId: Number(process.env.PAYTRAIL_MERCHANT_ID ?? "375917"),17 secretKey: process.env.PAYTRAIL_SECRET_KEY ?? "SAIPPUAKAUPPIAS",18 platformName: process.env.PAYTRAIL_PLATFORM_NAME ?? "MedusaJS",19 callbackBaseUrl: process.env.PAYTRAIL_CALLBACK_BASE_URL,20 language: process.env.PAYTRAIL_LANGUAGE ?? "EN",21 },22 },23 ],24 },25 },26]Required and supported environment variables:
Example:
1PAYTRAIL_MERCHANT_ID=3759172PAYTRAIL_SECRET_KEY=SAIPPUAKAUPPIAS3PAYTRAIL_PLATFORM_NAME=MedusaJS4PAYTRAIL_CALLBACK_BASE_URL=https://your-backend.example.com5PAYTRAIL_LANGUAGE=ENPaytrail requires HTTPS callback URLs for both success and cancel callbacks.
The plugin exposes for Paytrail redirect and callback handling.
The route forwards callback payloads into Medusa's payment webhook pipeline by emitting after validating the signature.
This package is provided as-is, without warranty of any kind. You are responsible for validating the integration, security, and compliance requirements before using it in production.