Function: parseConfirmQuery()
function parseConfirmQuery(source): ConfirmQuery;Defined in: src/helpers/confirm-query.ts:124
Read the parameters LINE Pay appends to the confirmUrl. The transactionId comes from the user's browser, so anyone can put anything there: it has to be a single string of 1 to 19 digits, and nothing else is let through.
Find the order in your own database by the transactionId that you stored when you called request for it, and take the amount and the currency from that order, never from the URL. Do not find the order by the orderId of the URL and then confirm the transactionId of the URL: the browser can pair any orderId with any transactionId, so a cheap order could be paid with the approval of somebody else's payment. If you do look the order up by orderId, check that order.transactionId === transactionId before you go on.
Parameters
source
Returns
Example
const { transactionId } = parseConfirmQuery(req.query)
const order = await orders.findByTransactionId(transactionId) // none: answer 404Throws
when a parameter is missing or malformed.