Refringe 8541e5f028 Refactor Currency Handling in PaymentService.payMoney() Method (!159)
This commit includes a series of changes aimed at improving the logic and readability of the `payMoney` method in the PaymentService class. The method is pivotal for handling in-game payments, specifically in cases involving multiple types of currencies and barter trades. The changes resolve an issue that prevented barter payments that included both a currency and another item.

## Changes:

- Replaced `barterPrice` variable with a `currencyAmounts` mapping that efficiently tracks each type of currency involved in the trade.
- Updated how the `costOfPurchaseInCurrency` variable is calculated to factor in multiple currencies.
- Introduced a new variable `totalCurrencyAmount` to sum up the total amount of all currencies, which is checked to determine whether any (non)currency payment is necessary.
- Added some inline comments for readability.

Resolves #176

Co-authored-by: Refringe <brownelltyler@gmail.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/159
Co-authored-by: Refringe <refringe@noreply.dev.sp-tarkov.com>
Co-committed-by: Refringe <refringe@noreply.dev.sp-tarkov.com>
2023-10-24 09:27:46 +00:00
..
2023-10-10 11:03:20 +00:00
2023-03-03 15:23:46 +00:00
2023-03-03 15:23:46 +00:00
2023-10-10 11:03:20 +00:00
2023-03-03 15:23:46 +00:00
2023-03-03 15:23:46 +00:00
2023-03-03 15:23:46 +00:00
2023-03-03 15:23:46 +00:00
2023-03-03 15:23:46 +00:00
2023-03-03 15:23:46 +00:00