feat(MED-100): update montonio redirect
This commit is contained in:
@@ -30,7 +30,7 @@ export class MontonioOrderHandlerService {
|
||||
locale: string;
|
||||
merchantReference: string;
|
||||
}) {
|
||||
const token = jwt.sign({
|
||||
const params = {
|
||||
accessKey,
|
||||
description,
|
||||
currency,
|
||||
@@ -38,16 +38,17 @@ export class MontonioOrderHandlerService {
|
||||
locale,
|
||||
// 15 minutes
|
||||
expiresAt: new Date(Date.now() + 15 * 60 * 1000).toISOString(),
|
||||
notificationUrl,
|
||||
returnUrl,
|
||||
notificationUrl: notificationUrl.replace("localhost", "webhook.site"),
|
||||
returnUrl: returnUrl.replace("localhost", "webhook.site"),
|
||||
askAdditionalInfo: false,
|
||||
merchantReference,
|
||||
type: "one_time",
|
||||
}, secretKey, {
|
||||
};
|
||||
const token = jwt.sign(params, secretKey, {
|
||||
algorithm: "HS256",
|
||||
expiresIn: "10m",
|
||||
});
|
||||
|
||||
|
||||
try {
|
||||
const { data } = await axios.post(`${apiUrl}/api/payment-links`, { data: token });
|
||||
return data.url;
|
||||
|
||||
Reference in New Issue
Block a user