popuppayment-gatewaychrome-extension-manifest-v3razorpay

Razorpay Payment Page Goes Blank After Entering Card Details and Completing Bank Page


I have a Chrome extension installed in my browser. When I try to make a payment on a website using Razorpay, the process works fine until the final step. Here's what happens:

After entering the card details, it redirects me to the bank page for authentication (e.g., OTP or 3D Secure). Once the bank authentication is complete, it tries to load the following URL: https://api.razorpay.com/v1/payments/PQbvIYLStZWZzw/authenticate

Instead of completing the payment process, this page turns blank.

I’ve noticed that this issue occurs only when my Chrome extension is enabled. When I disable the extension, the payment process works as expected.

How can I resolve this issue while keeping my extension enabled?

I’ve already tried the following to resolve the issue:

Excluding Razorpay URLs in the manifest file: I updated my manifest.json to exclude Razorpay-related URLs to prevent my extension from injecting content scripts on these pages. Here’s the code I used in the content_scripts section of my manifest:

  {
    "matches": ["<all_urls>"],
    "exclude_matches": ["*://*.razorpay.com/*"],
    "js": ["content.js"]
  }
]

Despite this change, the issue persists.


Solution

  • I have able to solve problem by adding check for tab.url !== "about:blank" this condition in my extension auto refresh function. Since I refresh the page in some condition in my ext so it was causing blank page.