next.jspaddle

Paddle Payment Integration in nextjs(EventCallbacks not working) in Build of Nextjs


useEffect(() => {
    initializePaddle({ environment: 'sandbox', 
    token: 'test_dc6bbc0c15c532af5915996babb',
    eventCallback(event) {
      console.log(event);
    //   router.push('/');
    }, }).then(
      (paddleInstance: Paddle | undefined) => {
        if (paddleInstance) {
          setPaddle(paddleInstance);
        }
      },
    );
  }, []);

Not Logging console of event in build of nextjs.Working in dev but not in build.

I wants to redirect after Payment Succes to Other Page.On Checkout Success close.


Solution

  • Issue Resolved in Updated Version of Nextjs Facit Theme