merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit e184d373aaa78441d18d1a8eaf94d2edc4502868
parent da177df9c8865c1b71a0b40da1e0678552aca905
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Wed, 30 Mar 2022 00:57:58 +0200

-remove dependency on refund struct

Diffstat:
Msrc/lib/merchant_api_post_order_abort.c | 34++++++++++++----------------------
1 file changed, 12 insertions(+), 22 deletions(-)

diff --git a/src/lib/merchant_api_post_order_abort.c b/src/lib/merchant_api_post_order_abort.c @@ -172,29 +172,19 @@ check_abort_refund (struct TALER_MERCHANT_OrderAbortHandle *oah, return GNUNET_SYSERR; } + if (GNUNET_OK != + TALER_exchange_online_refund_confirmation_verify ( + &oah->h_contract_terms, + &oah->coins[i].coin_pub, + &oah->merchant_pub, + 0, /* transaction id */ + &oah->coins[i].amount_with_fee, + &res[i].exchange_pub, + &res[i].exchange_sig)) { - struct TALER_RefundConfirmationPS rr = { - .purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_REFUND), - .purpose.size = htonl (sizeof (rr)), - .h_contract_terms = oah->h_contract_terms, - .coin_pub = oah->coins[i].coin_pub, - .merchant = oah->merchant_pub, - .rtransaction_id = GNUNET_htonll (0) - }; - - TALER_amount_hton (&rr.refund_amount, - &oah->coins[i].amount_with_fee); - if (GNUNET_OK != - GNUNET_CRYPTO_eddsa_verify ( - TALER_SIGNATURE_EXCHANGE_CONFIRM_REFUND, - &rr, - &res[i].exchange_sig.eddsa_signature, - &res[i].exchange_pub.eddsa_pub)) - { - GNUNET_break_op (0); - GNUNET_JSON_parse_free (spec); - return GNUNET_SYSERR; - } + GNUNET_break_op (0); + GNUNET_JSON_parse_free (spec); + return GNUNET_SYSERR; } } }