public function __construct(string $merchantId, string $payId, int $totalAmount = null) { Validator::checkPayId($payId); $this->merchantId = $merchantId; $this->payId = $payId; $this->totalAmount = $totalAmount; }
public function __construct(string $merchantId, string $origPayId, string $orderId, Price $price = null, string $description = null) { Validator::checkPayId($origPayId); Validator::checkOrderId($orderId); if ($description !== null) { Validator::checkDescription($description); } $this->merchantId = $merchantId; $this->origPayId = $origPayId; $this->orderId = $orderId; $this->price = $price; $this->description = $description; }
public function __construct(string $payId, DateTimeImmutable $responseDateTime, ResultCode $resultCode, string $resultMessage, PaymentStatus $paymentStatus = null, string $authCode = null, string $merchantData = null, array $extensions = []) { Validator::checkPayId($payId); if ($merchantData !== null) { Validator::checkMerchantData($merchantData); } $this->payId = $payId; $this->responseDateTime = $responseDateTime; $this->resultCode = $resultCode; $this->resultMessage = $resultMessage; $this->paymentStatus = $paymentStatus; $this->authCode = $authCode; $this->merchantData = $merchantData; $this->extensions = $extensions; }
/** * @param string $merchantId * @param string $payId */ public function __construct(string $merchantId, string $payId) { Validator::checkPayId($payId); $this->merchantId = $merchantId; $this->payId = $payId; }