remove refund_fee from refund confirmation message and signature
This commit is contained in:
parent
70090ed9a8
commit
93923c168d
@ -61,8 +61,6 @@ reply_refund_success (struct MHD_Connection *connection,
|
||||
|
||||
TALER_amount_hton (&rc.refund_amount,
|
||||
&refund->refund_amount);
|
||||
TALER_amount_hton (&rc.refund_fee,
|
||||
&refund->refund_fee);
|
||||
if (GNUNET_OK !=
|
||||
TEH_KS_sign (&rc,
|
||||
&pub,
|
||||
@ -76,8 +74,7 @@ reply_refund_success (struct MHD_Connection *connection,
|
||||
return TALER_MHD_reply_json_pack (
|
||||
connection,
|
||||
MHD_HTTP_OK,
|
||||
"{s:o, s:o, s:o}",
|
||||
"refund_fee", TALER_JSON_from_amount (&refund->refund_fee),
|
||||
"{s:o, s:o}",
|
||||
"exchange_sig", GNUNET_JSON_from_data_auto (&sig),
|
||||
"exchange_pub", GNUNET_JSON_from_data_auto (&pub));
|
||||
}
|
||||
|
@ -911,7 +911,6 @@ struct TALER_EXCHANGE_RefundHandle;
|
||||
*
|
||||
* @param cls closure
|
||||
* @param hr HTTP response data
|
||||
* @param refund_fee the refund fee the exchange charged us
|
||||
* @param sign_key exchange key used to sign @a obj, or NULL
|
||||
* @param signature the actual signature, or NULL on error
|
||||
*/
|
||||
@ -919,7 +918,6 @@ typedef void
|
||||
(*TALER_EXCHANGE_RefundCallback) (
|
||||
void *cls,
|
||||
const struct TALER_EXCHANGE_HttpResponse *hr,
|
||||
const struct TALER_Amount *refund_fee,
|
||||
const struct TALER_ExchangePublicKeyP *sign_key,
|
||||
const struct TALER_ExchangeSignatureP *signature);
|
||||
|
||||
|
@ -509,7 +509,6 @@ struct TALER_RefundRequestPS
|
||||
* exchange to the customer.
|
||||
*/
|
||||
struct TALER_AmountNBO refund_amount;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -552,18 +551,6 @@ struct TALER_RefundConfirmationPS
|
||||
* exchange to the customer.
|
||||
*/
|
||||
struct TALER_AmountNBO refund_amount;
|
||||
|
||||
/**
|
||||
* Refund fee charged by the exchange. This must match the
|
||||
* Exchange's denomination key's refund fee. If the client puts in
|
||||
* an invalid refund fee (too high or too low) that does not match
|
||||
* the Exchange's denomination key, the refund operation is invalid
|
||||
* and will be rejected by the exchange. The @e amount_with_fee
|
||||
* minus the @e refund_fee is the amount that will be credited to
|
||||
* the original coin.
|
||||
*/
|
||||
struct TALER_AmountNBO refund_fee; // FIXME: kill! => also do not return refund_fee (from exchange + merchant APIs)
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -97,7 +97,6 @@ verify_refund_signature_ok (struct TALER_EXCHANGE_RefundHandle *rh,
|
||||
struct GNUNET_JSON_Specification spec[] = {
|
||||
GNUNET_JSON_spec_fixed_auto ("exchange_sig", exchange_sig),
|
||||
GNUNET_JSON_spec_fixed_auto ("exchange_pub", exchange_pub),
|
||||
TALER_JSON_spec_amount_nbo ("refund_fee", &rh->depconf.refund_fee),
|
||||
GNUNET_JSON_spec_end ()
|
||||
};
|
||||
|
||||
@ -148,8 +147,6 @@ handle_refund_finished (void *cls,
|
||||
struct TALER_ExchangeSignatureP exchange_sig;
|
||||
struct TALER_ExchangePublicKeyP *ep = NULL;
|
||||
struct TALER_ExchangeSignatureP *es = NULL;
|
||||
struct TALER_Amount ra;
|
||||
const struct TALER_Amount *rf = NULL;
|
||||
const json_t *j = response;
|
||||
struct TALER_EXCHANGE_HttpResponse hr = {
|
||||
.reply = j,
|
||||
@ -178,9 +175,6 @@ handle_refund_finished (void *cls,
|
||||
{
|
||||
ep = &exchange_pub;
|
||||
es = &exchange_sig;
|
||||
TALER_amount_ntoh (&ra,
|
||||
&rh->depconf.refund_fee);
|
||||
rf = &ra;
|
||||
}
|
||||
break;
|
||||
case MHD_HTTP_BAD_REQUEST:
|
||||
@ -239,7 +233,6 @@ handle_refund_finished (void *cls,
|
||||
}
|
||||
rh->cb (rh->cb_cls,
|
||||
&hr,
|
||||
rf,
|
||||
ep,
|
||||
es);
|
||||
TALER_EXCHANGE_refund_cancel (rh);
|
||||
|
@ -76,7 +76,6 @@ struct RefundState
|
||||
*
|
||||
* @param cls closure
|
||||
* @param hr HTTP response details
|
||||
* @param refund_fee the refund fee the exchange charged
|
||||
* @param exchange_pub public key the exchange
|
||||
* used for signing @a obj.
|
||||
* @param exchange_sig actual signature confirming the refund
|
||||
@ -84,7 +83,6 @@ struct RefundState
|
||||
static void
|
||||
refund_cb (void *cls,
|
||||
const struct TALER_EXCHANGE_HttpResponse *hr,
|
||||
const struct TALER_Amount *refund_fee,
|
||||
const struct TALER_ExchangePublicKeyP *exchange_pub,
|
||||
const struct TALER_ExchangeSignatureP *exchange_sig)
|
||||
{
|
||||
@ -92,7 +90,6 @@ refund_cb (void *cls,
|
||||
struct RefundState *rs = cls;
|
||||
struct TALER_TESTING_Command *refund_cmd;
|
||||
|
||||
(void) refund_fee;
|
||||
refund_cmd = &rs->is->commands[rs->is->ip];
|
||||
rs->rh = NULL;
|
||||
if (rs->expected_response_code != hr->http_status)
|
||||
|
Loading…
Reference in New Issue
Block a user