Skip to content

Commit 7084149

Browse files
committed
adjuested fira call to use selected Prodajno Mjesto api key
1 parent 853b628 commit 7084149

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

backend/fira.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ export async function handleOrderFiscalization(order, options = {}) {
126126
// return mockResponse;
127127

128128
const url = process.env.FIRA_API_URL || 'https://app.fira.finance/api/v1/webshop/order/custom';
129-
const headers = { 'FIRA-Api-Key': process.env.FIRA_API_KEY, 'Content-Type': 'application/json' };
129+
const headers = { 'FIRA-Api-Key': firaApiKey, 'Content-Type': 'application/json' };
130+
console.log(`FIRA request to ${url}: ${JSON.stringify({ headers: { ...headers, 'FIRA-Api-Key': '[REDACTED]' }, body: data }, null, 2)}`);
130131
try {
131132
const response = await fetch(url, { method: 'POST', headers, body: JSON.stringify(data) });
132133
console.log(`FIRA response status: ${response.status}`);

0 commit comments

Comments
 (0)