関数
State::getErrorResponseFromCanceledState()
Returns GenericError
instance created from a Canceled
state.
説明 説明
This method returns an UNKNOWN_ERROR
GenericError
instance if the state is not canceled.
ファイル: src/Models/CheckoutSession/State.php
public function getErrorResponseFromCanceledState() { $error = $this->getErrorResponse(self::UNKNOWN_ERROR); if ($this->state !== self::CANCELED) { return $error; } return $this->getErrorResponse($this->reasonCode, [$this->reasonDescription]); }