Glench / ExtPay

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

[object PointerEvent] Free Trial #127

Closed prakhar897 closed 1 year ago

prakhar897 commented 1 year ago

Describe the bug when running "subscriptionButton.addEventListener('click', extpay.openTrialPage)", the page that loads fails to show the name of the extension and instead shows [object PointerEvent].

Desktop (please complete the following information):

Captddure

Glench commented 1 year ago

I’m not sure this is really a bug. You’re passing a PointerEvent to the openTrialPage function which is supposed to take a string.

prakhar897 commented 1 year ago

I was following the code written in sample-extension-mv3.

The correct way was:

"subscriptionButton.addEventListener('click', function() { extpay.openTrialPage("SmileyWriter"); }); "

Including this kind of stub in documentation would be helpful. Thanks

Glench commented 1 year ago

Glad it’s fixed! If you look, there is no free trial call in the sample extension.

Instead, use the documentation: https://github.com/Glench/ExtPay#8-use-extpayopentrialpage-to-let-the-user-sign-up-for-a-free-trial

And just so you know, you should provide the trial period length, not the extension name, to the trial function. This is so the user understands what they’re signing up for.

prakhar897 commented 1 year ago

Yes, Thanks for the help!!

On Thu, Apr 27, 2023 at 5:42 PM Glen Chiacchieri @.***> wrote:

Glad it’s fixed! If you look, there is no free trial call in the sample extension.

Instead, use the documentation: https://github.com/Glench/ExtPay#8-use-extpayopentrialpage-to-let-the-user-sign-up-for-a-free-trial

And just so you know, you should provide the trial period length, not the extension name, to the trial function.

— Reply to this email directly, view it on GitHub https://github.com/Glench/ExtPay/issues/127#issuecomment-1525583777, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGAN5ESRAPEYXEKK2YIKMGLXDJPD5ANCNFSM6AAAAAAXNK4ZF4 . You are receiving this because you modified the open/close state.Message ID: @.***>

--

Prakhar GuptaSoftware Dev