While web development is not my strong suit, I have a question that might sound silly, so bear with me as I explain.
Once the user selects their desired purchase, an API call is made to generate a trans_id and redirects them to the bank's payment page. Upon completion of the payment, regardless of the response, we are redirected to a callback URL (/transaction/callback).
Our goal is to retrieve the trans_id seen in network -> callback -> payload
This is the snippet of code where we need to obtain the trans_id
Next Js app router 14.0.4
"use client"
import React from 'react';
export default function Page() {
return (
<div className='flex items-center justify-center w-full min-h-[100vh]'>
<div className="flex flex-col items-center justify-center">
<h2 className="text-center text-white text-[35px] font-medium font-['Manrope'] uppercase">The order has been taken</h2>
<p className="text-center mt-4 text-white text-lg font-light font-['Manrope']">All information regarding your order has been sent to the indicated email.</p>
</div>
</div>
);
}
Upon receiving this trans_id, we will utilize another API to check the status. However, I am struggling to extract it correctly.
I would greatly appreciate any advice or tips on how to accomplish this.