'use strict';
import { apiBadRequestError } from '../../../../fd-toolbox/server/web/errors.js';
import { cancelIncompleteSubscription } from '../../payments/payments/payments.js';
import { paymentErrors } from '../../../common/payments/payment-constants.js';
import { parseJsonBodyFromRequest } from '../../../../fd-toolbox/lib/utils.js';

var __defProp=Object['defineProperty'],__name=(_0x543501,_0x4ce927)=>__defProp(_0x543501,'name',{'value':_0x4ce927,'configurable':!![]});async function paymentVerifyFailPostRoute(_0xc100a2){const {subscriptionId:_0x1981a5}=await parseJsonBodyFromRequest(_0xc100a2);return await cancelIncompleteSubscription(_0x1981a5),Promise['reject'](apiBadRequestError(paymentErrors['paymentFailed']));}__name(paymentVerifyFailPostRoute,'paymentVerifyFailPostRoute');

export { paymentVerifyFailPostRoute };
