mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Add spinner to pay now bootsptrap
This commit is contained in:
parent
fc05378dbb
commit
8562fb7f58
2 changed files with 8 additions and 5 deletions
|
@ -60,7 +60,8 @@ const bootstrap = () => {
|
|||
const payNowBootstrap = new PayNowBootstrap(
|
||||
PayPalCommerceGateway,
|
||||
renderer,
|
||||
messageRenderer
|
||||
messageRenderer,
|
||||
spinner
|
||||
);
|
||||
payNowBootstrap.init();
|
||||
}
|
||||
|
@ -95,4 +96,4 @@ document.addEventListener(
|
|||
|
||||
document.body.append(script);
|
||||
},
|
||||
);
|
||||
);
|
||||
|
|
|
@ -2,10 +2,11 @@ import ErrorHandler from '../ErrorHandler';
|
|||
import CheckoutActionHandler from '../ActionHandler/CheckoutActionHandler';
|
||||
|
||||
class PayNowBootstrap {
|
||||
constructor(gateway, renderer, messages) {
|
||||
constructor(gateway, renderer, messages, spinner) {
|
||||
this.gateway = gateway;
|
||||
this.renderer = renderer;
|
||||
this.messages = messages
|
||||
this.messages = messages;
|
||||
this.spinner = spinner;
|
||||
}
|
||||
|
||||
init() {
|
||||
|
@ -41,6 +42,7 @@ class PayNowBootstrap {
|
|||
const actionHandler = new CheckoutActionHandler(
|
||||
PayPalCommerceGateway,
|
||||
new ErrorHandler(this.gateway.labels.error.generic),
|
||||
this.spinner
|
||||
);
|
||||
|
||||
this.renderer.render(
|
||||
|
@ -77,4 +79,4 @@ class PayNowBootstrap {
|
|||
}
|
||||
}
|
||||
|
||||
export default PayNowBootstrap;
|
||||
export default PayNowBootstrap;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue