Commit 3535764f by Arjun Jhukal

cleared console

parent 846560d4
...@@ -22,7 +22,7 @@ function handleLoad() { ...@@ -22,7 +22,7 @@ function handleLoad() {
window.Profiling.fingerprint() window.Profiling.fingerprint()
.then((response) => { .then((response) => {
const fp = response.request_id_provider_1 || undefined; const fp = response.request_id_provider_1 || undefined;
console.log("Fingerprint request_id_provider_1:", fp); // console.log("Fingerprint request_id_provider_1:", fp);
if (fp) { if (fp) {
localStorage.setItem(STORAGE_KEY, fp); localStorage.setItem(STORAGE_KEY, fp);
setGlobalDeviceFingerprint(fp); setGlobalDeviceFingerprint(fp);
......
...@@ -68,7 +68,7 @@ export default function PaymentForm({ id, amount, type }: DepositProps & { type: ...@@ -68,7 +68,7 @@ export default function PaymentForm({ id, amount, type }: DepositProps & { type:
setCardTouched(true); setCardTouched(true);
const allCardValid = cardValidity.ccnumber && cardValidity.ccexp && cardValidity.cvv; const allCardValid = cardValidity.ccnumber && cardValidity.ccexp && cardValidity.cvv;
if (!allCardValid) return; if (!allCardValid) return;
console.log('All fields valid, starting CollectJS payment request');
if (typeof window !== 'undefined' && window.CollectJS) { if (typeof window !== 'undefined' && window.CollectJS) {
window.CollectJS.startPaymentRequest(); window.CollectJS.startPaymentRequest();
} }
...@@ -106,25 +106,12 @@ export default function PaymentForm({ id, amount, type }: DepositProps & { type: ...@@ -106,25 +106,12 @@ export default function PaymentForm({ id, amount, type }: DepositProps & { type:
exp: response.card.exp, exp: response.card.exp,
number: response.card.number, number: response.card.number,
hash: response.card.hash, hash: response.card.hash,
status:"success",
}).unwrap(); }).unwrap();
// Backup auth before redirecting to success page
backupAuthToCookies(); backupAuthToCookies();
router.push(`/buy-coins/${id}/success`); router.push(`/buy-coins/${id}/success`);
} catch (e: any) { } catch (e: any) {
await payViaFortPay({ console.error('Payment error:', e);
id,
amount,
type: type as PaymentModeProps,
payment_token: response.token,
bin: response.card.bin,
exp: response.card.exp,
number: response.card.number,
hash: response.card.hash,
status: "failed",
}).unwrap()
dispatch( dispatch(
showToast({ showToast({
message: e?.data?.message || 'Unable to deposit', message: e?.data?.message || 'Unable to deposit',
......
...@@ -30,10 +30,7 @@ export const baseQuery = fetchBaseQuery({ ...@@ -30,10 +30,7 @@ export const baseQuery = fetchBaseQuery({
if (globalDeviceFingerprint) { if (globalDeviceFingerprint) {
headers.set("X-Device-Fingerprint", globalDeviceFingerprint); headers.set("X-Device-Fingerprint", globalDeviceFingerprint);
} }
console.log("📡 Preparing headers with device info:", {
"X-Device-Id": globalDeviceId,
"X-Device-Fingerprint": globalDeviceFingerprint
});
if (token) { if (token) {
headers.set("Authorization", `Bearer ${token}`); headers.set("Authorization", `Bearer ${token}`);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment