mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
Uniformize ApplePay javascript coding style.
Add support for checkout form data to ApplePay. Add checkout shipping mode option in ApplePay settings.
This commit is contained in:
parent
3a39bccc54
commit
2f5f51e518
9 changed files with 292 additions and 248 deletions
|
@ -1,28 +1,17 @@
|
|||
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(
|
||||
actionHandler() {
|
||||
return new CheckoutActionHandler(
|
||||
this.ppcpConfig,
|
||||
errorHandler,
|
||||
spinner
|
||||
this.errorHandler(),
|
||||
new Spinner()
|
||||
);
|
||||
|
||||
return actionHandler.configuration().createOrder(null, null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default CheckoutHandler;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue