以下代码未呈现 html。我猜 .mount 不会在 test-container 类中重新渲染 html。
componentDidMount() {
const originKey = getOriginKey(this.props.subscriptionInfo);
const checkout = new window.AdyenCheckout({
locale: 'en-US',
originKey,
loadingContext: 'https://checkoutshopper
test.adyen.com/checkoutshopper/',
onChange: function() {},
onError: console.error
});
console.log(checkout);
window.securedFields = checkout
.create('securedfields', {
type: 'card',
groupTypes: ['mc', 'visa', 'amex', 'bcmc', 'maestro'],
allowedDOMAccess: false, // Whether encrypted blobs will be added to the DOM. OPTIONAL - defaults to false
autoFocus: true,
onFieldValid,
onConfigSuccess,
onAllValid,
onError
})
.mount('.test-container');
}