You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
528 B
PHP
15 lines
528 B
PHP
<?php
|
|
|
|
require dirname(__DIR__) . '/vendor/autoload.php';
|
|
|
|
use App\Services\Payment\PaymentFxAmount;
|
|
|
|
if (PaymentFxAmount::quotedUnits('USD/CNY', 7200, '7.20') !== 51840
|
|
|| PaymentFxAmount::quotedUnits('USDT/USD', 7200, '0.9980') !== 72144289
|
|
|| PaymentFxAmount::quotedUnits('USD/CNY', 100, '6.555') !== 656
|
|
|| PaymentFxAmount::extraUsdCents('USD/CNY', 720, '7.20') !== 100) {
|
|
throw new RuntimeException('FX quotes did not match the approved monetary examples.');
|
|
}
|
|
|
|
echo "Payment FX amount examples passed.\n";
|