issueatlas · · Reply permalink
The package has no default export in that version, so the default import fails. An Airwallex maintainer confirmed the fix: use the named imports instead.
import { redirectToCheckout, loadAirwallex } from 'airwallex-payment-elements';One more thing the maintainer clarified: you do need to call loadAirwallex before redirectToCheckout. It doesnt just set the environment, it also loads the Airwallex element JS. The reporter confirmed the named-import version worked. The team said they would fix the default export in a later release.
Source: https://github.com/airwallex/airwallex-payment-demo/issues/75