Skip to content

Commit

Permalink
only euros are supported right now
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-nicolas committed Feb 20, 2024
1 parent 0813531 commit c571da9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package atlar

import "github.com/formancehq/payments/cmd/connectors/internal/connectors/currency"

var (
supportedCurrenciesWithDecimal = currency.ISO4217Currencies
supportedCurrenciesWithDecimal = map[string]int{
"EUR": 2, // Euro
}
)
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ func ingestPaymentsBatch(
batch := ingestion.PaymentBatch{}

for _, item := range pagedTransactions.Payload.Items {
if _, ok := supportedCurrenciesWithDecimal[*item.Amount.Currency]; !ok {
continue
}

raw, err := json.Marshal(item)
if err != nil {
return err
Expand Down

0 comments on commit c571da9

Please sign in to comment.