@malga-checkout/core
Version:
Core components for Malga Checkout
14 lines (13 loc) • 343 B
JavaScript
import { Api } from '../api';
import { normalizePaymentSession } from './session.utils';
export class Sessions {
constructor() {
this.api = new Api();
}
async find(sessionId) {
const response = await this.api.fetch({
endpoint: `/sessions/${sessionId}/link`,
});
return normalizePaymentSession(response.data);
}
}