israeli-bank-scrapers
israeli-bank-scrapers copied to clipboard
fix(isracard): use the correct value for `originalCurrency`
Transactions in isracard has the wrong originalCurrency
.
The correct mapping of the currencies should be:
- originalCurrency = currentPaymentCurrency
- chargedCurrency = currencyId
Attached is an example transaction that should have originalCurrency: "USD", chargedCurrency: "ILS"
but before the code in this PR it's originalCurrency: "ILS"
with no chargedCurrency
The isracard transaction object:
{
...
"currencyId": "NIS",
"currentPaymentCurrency": "USD",
...
"fullSupplierNameOutbound": "UBER TRIP",
...
"dealSumOutbound": "66.66",
"paymentSumOutbound": "248.24",
...
}
The israeli-bank-scrapers transaction object (diff before and after the change):
{
...
"originalAmount": -66.66,
- "originalCurrency": "ILS",
+ "originalCurrency": "USD",
+ "chargedCurrency": "ILS",
"chargedAmount": -248.24,
"description": "UBER TRIP",
...
}