Integrating Accept.js with NextJs on TypeScript with 'npm react-authorize-net'

592 Views Asked by At

Hi I'm currently having an issue with integrating Accept.js I'm using https://github.com/j-em/react-authorize-net#readme

  <FormContainer
      apiLoginId={`${process.env.PAYMENT_API_LOGIN_ID}`}
      clientKey={`${process.env.PAYMENT_API_LOGIN_CLIENT_KEY}`}
      onSuccess={(arg: any) => console.log(arg)}
      onError={(arg: any) => console.log(arg)}
      amount={99}
      component={FormComponent}
      environment={'sandbox'}
    />

And I'm getting: SyntaxError: Cannot use import statement outside a module

enter image description here

Thank you for helping

0

There are 0 best solutions below