クラス
LinePayError
ソース ソース
ファイル: src/Errors/LinePayError.php
class LinePayError extends GenericError { /** * LINE Pay transaction ID, if applicable * * @var string|null */ public $transactionId = null; /** * LINE Pay order ID, if applicable * * @var int|null */ public $orderId = null; /** * Returns stringified representation of the `LinePayError` instance * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return string */ public function __toString() { $debugmsg = is_callable($this->debugmsg) ? '' : $this->debugmsg; $message = is_callable($this->message) ? '' : $this->message; $adminmsg = is_callable($this->adminmsg) ? '' : $this->adminmsg; $s = '(Code: ' . $this->errorcode . ') (Name: ' . $this->errorname . ') [DebugMessage]: ' . $debugmsg; $s .= ' [UserMessage]: ' . $message; if (!empty($adminmsg)) { $s .= ' [AdminMessage]: ' . $adminmsg; } if (!empty($this->transactionId)) { $s .= ' [LINE Pay transaction ID]: ' . $this->transactionId; } if (!empty($this->orderId)) { $s .= ' [LINE Pay order ID]: ' . $this->orderId; } return $s; } }
- __toString — Returns stringified representation of the `LinePayError` instance