Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 3.145.158.137
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
3 /
yoomoney /
yookassa-sdk-php /
lib /
Model /
Delete
Unzip
Name
Size
Permission
Date
Action
Confirmation
[ DIR ]
drwxrwxr-x
2023-01-19 06:56
ConfirmationAttributes
[ DIR ]
drwxrwxr-x
2023-01-19 06:56
Deal
[ DIR ]
drwxrwxr-x
2023-01-19 06:56
Notification
[ DIR ]
drwxrwxr-x
2023-01-19 06:56
PaymentData
[ DIR ]
drwxrwxr-x
2023-01-19 06:56
PaymentMethod
[ DIR ]
drwxrwxr-x
2023-01-19 06:56
Payout
[ DIR ]
drwxrwxr-x
2023-01-19 06:56
Receipt
[ DIR ]
drwxrwxr-x
2023-01-19 06:56
Webhook
[ DIR ]
drwxrwxr-x
2023-01-19 06:56
Airline.php
9.95
KB
-rw-rw-r--
2023-01-19 06:56
AirlineInterface.php
1.97
KB
-rw-rw-r--
2023-01-19 06:56
AmountInterface.php
2.13
KB
-rw-rw-r--
2023-01-19 06:56
AuthorizationDetails.php
5.61
KB
-rw-rw-r--
2023-01-19 06:56
AuthorizationDetailsInterface.php
2.6
KB
-rw-rw-r--
2023-01-19 06:56
BaseDeal.php
2.35
KB
-rw-rw-r--
2023-01-19 06:56
CancellationDetails.php
4.09
KB
-rw-rw-r--
2023-01-19 06:56
CancellationDetailsInterface.php
1.95
KB
-rw-rw-r--
2023-01-19 06:56
CancellationDetailsPartyCode.php
1.92
KB
-rw-rw-r--
2023-01-19 06:56
CancellationDetailsReasonCode.php
9.53
KB
-rw-rw-r--
2023-01-19 06:56
ConfirmationType.php
2.64
KB
-rw-rw-r--
2023-01-19 06:56
CurrencyCode.php
1.96
KB
-rw-rw-r--
2023-01-19 06:56
DealInterface.php
4.58
KB
-rw-rw-r--
2023-01-19 06:56
Leg.php
4.93
KB
-rw-rw-r--
2023-01-19 06:56
LegInterface.php
2.7
KB
-rw-rw-r--
2023-01-19 06:56
Locale.php
1.64
KB
-rw-rw-r--
2023-01-19 06:56
Metadata.php
2.21
KB
-rw-rw-r--
2023-01-19 06:56
MonetaryAmount.php
9.03
KB
-rw-rw-r--
2023-01-19 06:56
NotificationEventType.php
3.25
KB
-rw-rw-r--
2023-01-19 06:56
NotificationType.php
1.36
KB
-rw-rw-r--
2023-01-19 06:56
Passenger.php
3.94
KB
-rw-rw-r--
2023-01-19 06:56
PassengerInterface.php
1.8
KB
-rw-rw-r--
2023-01-19 06:56
Payment.php
32.86
KB
-rw-rw-r--
2023-01-19 06:56
PaymentInterface.php
9.06
KB
-rw-rw-r--
2023-01-19 06:56
PaymentMethodType.php
4.48
KB
-rw-rw-r--
2023-01-19 06:56
PaymentStatus.php
2.37
KB
-rw-rw-r--
2023-01-19 06:56
Payout.php
15.97
KB
-rw-rw-r--
2023-01-19 06:56
PayoutInterface.php
4.88
KB
-rw-rw-r--
2023-01-19 06:56
PayoutStatus.php
2.48
KB
-rw-rw-r--
2023-01-19 06:56
Receipt.php
23.58
KB
-rw-rw-r--
2023-01-19 06:56
ReceiptCustomer.php
8.22
KB
-rw-rw-r--
2023-01-19 06:56
ReceiptCustomerInterface.php
3.02
KB
-rw-rw-r--
2023-01-19 06:56
ReceiptInterface.php
3.4
KB
-rw-rw-r--
2023-01-19 06:56
ReceiptItem.php
38.2
KB
-rw-rw-r--
2023-01-19 06:56
ReceiptItemInterface.php
10.04
KB
-rw-rw-r--
2023-01-19 06:56
ReceiptRegistrationStatus.php
2.34
KB
-rw-rw-r--
2023-01-19 06:56
ReceiptType.php
1.81
KB
-rw-rw-r--
2023-01-19 06:56
Recipient.php
4.91
KB
-rw-rw-r--
2023-01-19 06:56
RecipientInterface.php
2.35
KB
-rw-rw-r--
2023-01-19 06:56
Refund.php
16.26
KB
-rw-rw-r--
2023-01-19 06:56
RefundInterface.php
4.09
KB
-rw-rw-r--
2023-01-19 06:56
RefundStatus.php
1.76
KB
-rw-rw-r--
2023-01-19 06:56
Requestor.php
4.65
KB
-rw-rw-r--
2023-01-19 06:56
RequestorInterface.php
1.98
KB
-rw-rw-r--
2023-01-19 06:56
SafeDeal.php
13
KB
-rw-rw-r--
2023-01-19 06:56
Settlement.php
4.56
KB
-rw-rw-r--
2023-01-19 06:56
SettlementInterface.php
1.76
KB
-rw-rw-r--
2023-01-19 06:56
Source.php
5.15
KB
-rw-rw-r--
2023-01-19 06:56
SourceInterface.php
3.61
KB
-rw-rw-r--
2023-01-19 06:56
Supplier.php
4.02
KB
-rw-rw-r--
2023-01-19 06:56
SupplierInterface.php
3.01
KB
-rw-rw-r--
2023-01-19 06:56
ThreeDSecure.php
2.26
KB
-rw-rw-r--
2023-01-19 06:56
Transfer.php
9.07
KB
-rw-rw-r--
2023-01-19 06:56
TransferInterface.php
6.54
KB
-rw-rw-r--
2023-01-19 06:56
TransferStatus.php
2.14
KB
-rw-rw-r--
2023-01-19 06:56
Save
Rename
<?php /** * The MIT License * * Copyright (c) 2022 "YooMoney", NBСO LLC * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ namespace YooKassa\Model; use YooKassa\Common\AbstractObject; use YooKassa\Common\Exceptions\EmptyPropertyValueException; use YooKassa\Common\Exceptions\InvalidPropertyValueException; use YooKassa\Common\Exceptions\InvalidPropertyValueTypeException; use YooKassa\Helpers\TypeCast; /** * MonetaryAmount - Сумма определенная в валюте * * @package YooKassa * * @property int $value Сумма * @property string $currency Код валюты */ class MonetaryAmount extends AbstractObject implements AmountInterface { /** * @var int Сумма */ private $_value = 0; /** * @var string Код валюты */ private $_currency = CurrencyCode::RUB; /** * MonetaryAmount constructor. * @param array|numeric|null $value Сумма * @param string|null $currency Код валюты */ public function __construct($value = null, $currency = null) { if (is_array($value)) { parent::__construct($value); } else { if ($value !== null && $value > 0.0) { $this->setValue($value); } if ($currency !== null) { $this->setCurrency($currency); } } } /** * Возвращает значение суммы * @return string Сумма */ public function getValue() { if ($this->_value < 10) { return '0.0' . $this->_value; } elseif ($this->_value < 100) { return '0.' . $this->_value; } else { return substr($this->_value, 0, -2) . '.' . substr($this->_value, -2); } } /** * Устанавливает сумму * @param string $value Сумма * * @throws EmptyPropertyValueException Генерируется если было передано пустое значение * @throws InvalidPropertyValueTypeException Генерируется если было передано значение невалидного типа * @throws InvalidPropertyValueException Генерируется если было передано не валидное значение */ public function setValue($value) { if ($value === null || $value === '') { throw new EmptyPropertyValueException('Empty amount value', 0, 'amount.value'); } if (!is_numeric($value)) { throw new InvalidPropertyValueTypeException('Invalid amount value type', 0, 'amount.value', $value); } if ($value <= 0.0) { throw new InvalidPropertyValueException('Invalid amount value: "'.$value.'"', 0, 'amount.value', $value); } $castedValue = (int)round($value * 100.0); if ($castedValue <= 0.0) { throw new InvalidPropertyValueException('Invalid amount value: "'.$value.'"', 0, 'amount.value', $value); } $this->_value = $castedValue; } /** * Возвращает сумму в копейках в виде целого числа * @return int Сумма в копейках/центах */ public function getIntegerValue() { return $this->_value; } /** * Возвращает валюту * @return string Код валюты */ public function getCurrency() { return $this->_currency; } /** * Устанавливает код валюты * @param string $value Код валюты * * @throws EmptyPropertyValueException Генерируется если было передано пустое значение * @throws InvalidPropertyValueTypeException Генерируется если было передано значение невалидного типа * @throws InvalidPropertyValueException Генерируется если был передан неподдерживаемый код валюты */ public function setCurrency($value) { if ($value === null || $value === '') { throw new EmptyPropertyValueException('Empty currency value', 0, 'amount.currency'); } if (TypeCast::canCastToEnumString($value)) { $value = strtoupper((string)$value); if (CurrencyCode::valueExists($value)) { $this->_currency = $value; } else { throw new InvalidPropertyValueException( 'Invalid currency value: "' . $value . '"', 0, 'amount.currency', $value ); } } else { throw new InvalidPropertyValueTypeException('Invalid currency value type', 0, 'amount.currency', $value); } } /** * Умножает текущую сумму на указанный коэффициент * @param float $coefficient Множитель * * @throws EmptyPropertyValueException Выбрасывается если передано пустое значение * @throws InvalidPropertyValueTypeException Выбрасывается если было передано не число * @throws InvalidPropertyValueException Выбрасывается если переданное значение меньше или равно нулю, либо если * после умножения получили значение равное нулю */ public function multiply($coefficient) { if ($coefficient === null || $coefficient === '') { throw new EmptyPropertyValueException('Empty coefficient in multiply method', 0, 'amount.value'); } if (!is_numeric($coefficient)) { throw new InvalidPropertyValueTypeException( 'Invalid coefficient type in multiply method', 0, 'amount.value', $coefficient ); } if ($coefficient <= 0.0) { throw new InvalidPropertyValueException( 'Invalid coefficient in multiply method: "' . $coefficient . '"', 0, 'amount.value', $coefficient ); } $castedValue = (int)round($coefficient * $this->_value); if ($castedValue === 0) { throw new InvalidPropertyValueException( 'Invalid coefficient value in multiply method: "' . $coefficient . '"', 0, 'amount.value', $coefficient ); } $this->_value = $castedValue; } /** * Увеличивает сумму на указанное значение * @param int $value Значение, которое будет прибавлено к текущему * * @throws EmptyPropertyValueException Выбрасывается если передано пустое значение * @throws InvalidPropertyValueTypeException Выбрасывается если было передано не число * @throws InvalidPropertyValueException Выбрасывается если после сложения получилась сумма меньше или равная нулю */ public function increase($value) { if ($value === null || $value === '') { throw new EmptyPropertyValueException('Empty amount value in increase method', 0, 'amount.value'); } if (!is_numeric($value)) { throw new InvalidPropertyValueTypeException( 'Invalid amount value type in increase method', 0, 'amount.value', $value ); } $castedValue = (int)round($this->_value + $value * 100.0); if ($castedValue <= 0) { throw new InvalidPropertyValueException( 'Invalid amount value in increase method: "' . $value . '"', 0, 'amount.value', $value ); } $this->_value = $castedValue; } /** * @return array */ public function jsonSerialize() { return array( 'value' => number_format($this->_value / 100.0, 2, '.', ''), 'currency' => $this->_currency, ); } }