diff options
Diffstat (limited to 'src/authorization')
-rw-r--r-- | src/authorization/anastasis_authorization_plugin_iban.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/authorization/anastasis_authorization_plugin_iban.c b/src/authorization/anastasis_authorization_plugin_iban.c index 648902a..50fff8d 100644 --- a/src/authorization/anastasis_authorization_plugin_iban.c +++ b/src/authorization/anastasis_authorization_plugin_iban.c @@ -410,19 +410,19 @@ check_payment_ok (void *cls, const struct ANASTASIS_AUTHORIZATION_State *as = cls; struct IBAN_Context *ctx = as->ctx; uint64_t code; + struct TALER_Amount camount; if (GNUNET_OK != extract_code (wire_subject, &code)) return false; - if (GNUNET_OK != - TALER_amount_cmp_currency (&ctx->expected_amount, - amount)) - { - /* currency wrong!? */ - GNUNET_break (0); - return false; - } + /* Database uses 'default' currency, but this + plugin may use a different currency (and the + same goes for the bank). So we fix this by + forcing the currency to be 'right'. */ + camount = *amount; + strcpy (camount.currency, + ctx->expected_amount.currency); if (1 == TALER_amount_cmp (&ctx->expected_amount, amount)) |