mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
28 lines
870 B
JavaScript
28 lines
870 B
JavaScript
import Spinner from "../../../../ppcp-button/resources/js/modules/Helper/Spinner";
|
|
import CheckoutActionHandler
|
|
from "../../../../ppcp-button/resources/js/modules/ActionHandler/CheckoutActionHandler";
|
|
import ErrorHandler from "../../../../ppcp-button/resources/js/modules/ErrorHandler";
|
|
import BaseHandler from "./BaseHandler";
|
|
|
|
class CheckoutHandler extends BaseHandler {
|
|
|
|
createOrder() {
|
|
const errorHandler = new ErrorHandler(
|
|
this.ppcpConfig.labels.error.generic,
|
|
document.querySelector('.woocommerce-notices-wrapper')
|
|
);
|
|
|
|
const spinner = new Spinner();
|
|
|
|
const actionHandler = new CheckoutActionHandler(
|
|
this.ppcpConfig,
|
|
errorHandler,
|
|
spinner
|
|
);
|
|
|
|
return actionHandler.configuration().createOrder(null, null);
|
|
}
|
|
|
|
}
|
|
|
|
export default CheckoutHandler;
|