���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /var/www/html/luckymerchan/vendor/phpjuice/paypal-checkout-sdk/src/Orders/ |
<?php namespace PayPal\Checkout\Orders; use Brick\Money\Exception\UnknownCurrencyException; use Brick\Money\Money; use PayPal\Checkout\Concerns\CastsToJson; use PayPal\Checkout\Contracts\Amount as AmountContract; /** * https://developer.paypal.com/docs/api/orders/v2/#definition-Amount_breakdown. */ class Amount implements AmountContract { use CastsToJson; /** * The three-character ISO-4217 currency code that identifies the currency. * * @var Money */ protected Money $money; /** * create a new amount instance. * @param string $value * @param string $currency_code * @throws UnknownCurrencyException */ public function __construct(string $value, string $currency_code = 'USD') { $this->money = Money::of($value, $currency_code); } /** * @param string $value * @param string $currency_code * @return Amount * @throws UnknownCurrencyException */ public static function of(string $value, string $currency_code = 'USD'): Amount { return new self($value, $currency_code); } /** * convert amount to an array. * @return array */ public function toArray(): array { return [ 'currency_code' => $this->getCurrencyCode(), 'value' => $this->getValue(), ]; } /** * @return string */ public function getCurrencyCode(): string { return $this->money->getCurrency()->getCurrencyCode(); } /** * @return string */ public function getValue(): string { return (string) $this->money->getAmount(); } }