関数
State::populate()
CheckoutSession
specific errors for a Canceled
state
戻り値 戻り値
ファイル: src/Models/CheckoutSession/State.php
public function populate() { $this->addError(new GenericError( CanceledReasonCodes::BUYER_CANCELED, 'BUYER_CANCELED', 400, function ($message) { return $message; }, __('The purchase was canceled', 'wcexaap') )); $this->addError(new GenericError( CanceledReasonCodes::EXPIRED, 'EXPIRED', 400, function ($message) { return $message; }, __('The checkout session has expired. Please try again', 'wcexaap') )); $this->addError(new GenericError( CanceledReasonCodes::AMAZON_CANCELED, 'AMAZON_CANCELED', 503, function ($message) { return $message; }, __('Amazon canceled the purchase due to service unavailability.', 'wcexaap') )); $this->addError(new GenericError( CanceledReasonCodes::DECLINED, 'DECLINED', 403, function ($message) { return $message; }, __('The purchase was declined by Amazon.', 'wcexaap') )); }