PaddleHQ / paddle-js-wrapper

Wrapper to load Paddle.js as a module and use TypeScript definitions when working with methods.
Apache License 2.0
28 stars 4 forks source link

[Bug]: initializePaddle method doesn't contain all the available setup options from the docs #10

Closed PaulSonOfLars closed 7 months ago

PaulSonOfLars commented 7 months ago

What happened?

I am currently trying to setup callback queries for my checkout process. According to the docs, this apparently cannot be done at the checkout.open() stage. Instead, it should be set at the paddle.setup stage, by setting the eventCallback field.

(Sidenote: I would love it if it were possible to set up the callback when opening the checkout; would allow for passing additional contextual data!)

However, the PaddleSetupOptions type exposed by the typescript wrapper only allows for passing in the following three values, omitting any default settings:

Is this intended? Thanks in advance!

Steps to reproduce

N/A

What did you expect to happen?

Expected the initializePaddle and Paddle.Setup methods to support passing in settings for callback queries.

How are you integrating?

React

Logs

N/A
PaulSonOfLars commented 7 months ago

User error. Misread the type definition and missed the extends.... My bad, thank you anyway :)

FR stands though - would be great to be able to pass in the eventCallback method at the checkout.open stage!

vijayasingam-paddle commented 7 months ago

Hi @PaulSonOfLars, Glad that you were able to find the problem.

FR stands though - would be great to be able to pass in the eventCallback method at the checkout.open stage!

This is a good feedback. We will discuss within the team and see what we can do about this.

Thank you.