File History: src/main/java/com/paymentlink/util/CurrencyUtil.java
File Content at Commit 188fc92
| 1 | package com.paymentlink.util; |
| 2 | |
| 3 | public class CurrencyUtil { |
| 4 | |
| 5 | /** |
| 6 | * Convert dollars to cents |
| 7 | */ |
| 8 | public static long dollarsToCents(double dollars) { |
| 9 | return Math.round(dollars * 100); |
| 10 | } |
| 11 | |
| 12 | /** |
| 13 | * Convert cents to dollars |
| 14 | */ |
| 15 | public static double centsToDollars(long cents) { |
| 16 | return cents / 100.0; |
| 17 | } |
| 18 | |
| 19 | /** |
| 20 | * Format cents as currency string |
| 21 | */ |
| 22 | public static String formatCents(long cents, String currency) { |
| 23 | return String.format("%s %.2f", currency, centsToDollars(cents)); |
| 24 | } |
| 25 | } |
| 26 | |
| 27 |
Commits
| Commit | Author | Date | Message | File SHA | Actions |
|---|---|---|---|---|---|
f0438c2 |
<f69e50@finnacloud.com> 1766443042 +0300 | 12/22/2025, 10:37:22 PM | increment once more | 492ebde |
View |
188fc92 |
<f69e50@finnacloud.com> 1766442998 +0300 | 12/22/2025, 10:36:38 PM | increment | 492ebde |
Hide |
4617f76 |
<f69e50@finnacloud.com> 1766442953 +0300 | 12/22/2025, 10:35:53 PM | rename branch from main to master oops | 492ebde |
View |
e6d1548 |
<f69e50@finnacloud.com> 1766442769 +0300 | 12/22/2025, 10:32:49 PM | add initial test workflow file | 492ebde |
View |
9c24ca4 |
<f69e50@finnacloud.com> 1766442705 +0300 | 12/22/2025, 10:31:45 PM | add CI configuration and test script for Jenkins build | 492ebde |
View |
690c1f6 |
<f69e50@finnacloud.com> 1766368110 +0300 | 12/22/2025, 1:48:30 AM | initialize backend structure with controllers, DTOs, and configuration files | 492ebde |
View |