@hatang/sdk
    Preparing search index...

    Function constructIpnEvent

    • Verify an IPN call and return its content, or throw HatangSignatureError.

      const ipn = await constructIpnEvent(rawBody, req.headers, process.env.HATANG_SECRET_KEY!); if (ipn.data.status === "paid") await markOrderPaid(ipn.data.metadata.order_id);

      Parameters

      Returns Promise<IpnEvent>