関数
AmazonPay::initCheckoutHooks()
戻り値 戻り値
ファイル: src/AmazonPay.php
public function initCheckoutHooks() { $this->checkout = new Checkout($this); $this->checkout->init()->addHooks(); usces_register_action( 'wcexaapCompletePurchase', 'get', 'wcexaapCompletePurchase', null, function () { // route guards $routeGuards = new Routing\RedirectRouteGuards( $this, new Routing\RestRouteGuards($this) ); $amazonRouteGuards = new Routing\AmazonRedirectRouteGuards($this); call_user_func($amazonRouteGuards->sessionIdExistsOrExit()); call_user_func($routeGuards->cartNotEmptyOrExit()); call_user_func($routeGuards->itemsInStockOrCartRedirect()); $this->checkout->handleCheckoutResult(); } ); }