Glench / ExtPay

The JavaScript library for ExtensionPay.com — payments for your browser extensions, no server needed.
https://extensionpay.com
Other
487 stars 62 forks source link

Unable to Initalize ExtPay #4

Closed Arjun-Sharma1 closed 3 years ago

Arjun-Sharma1 commented 3 years ago

Getting an error when trying to initialize ExtPay. I followed the instructions to integrate it and I'm using the latest version. Let me know if i'm doing something wrong. Using Google Chrome as the browser.

f6e2716e0dbff2fc5064ee8c1a02f43f I tried commenting that block of code out which works but it gives an error when I call extpay.openPaymentPage(). I think it's related to the browserPolyfill not being initialized properly.

This is my manifest.json. 6850e067cea6b6711d98f7b73b68d36d

Background.js 79dc71933735061291e5c4c3ed50795a

Glench commented 3 years ago

I was able to reproduce this and pushed a fix here and to npm. Please let me know if this fixes it. Thanks for the bug report!

Arjun-Sharma1 commented 3 years ago

@Glench It no longer gives me an error on that line anymore but now I'm facing an error calling the openPaymentPage method.

a4b8d638e867532388c1f5b564e816d7

I think you need to do something like this: https://stackoverflow.com/questions/28747672/chrome-windows-undefined-for-chrome-extension for the browserPolyfill inorder to create the payment window for the content script.

Glench commented 3 years ago

Wow you're finding all the bugs! Sorry about that. I just pushed a fix for the popup bug, 2.0.3. Mentioning it here for reference: https://github.com/Glench/ExtPay/commit/b23f26a16887444f6fcb6569cc4ee01dd6d68602