summaryrefslogtreecommitdiff
path: root/src/lib/merchant_api_post_order_pay.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-07-18 21:59:01 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-18 21:59:01 +0200
commit02b21f6612f5150a686b6df0120fe3dd0722b58f (patch)
tree4aa8d9a8aaf513f9b3e1659f043b4213a3ba57da /src/lib/merchant_api_post_order_pay.c
parent619c04ec68893ac285460ad3154a7c144c4f91e6 (diff)
downloadmerchant-02b21f6612f5150a686b6df0120fe3dd0722b58f.tar.gz
merchant-02b21f6612f5150a686b6df0120fe3dd0722b58f.tar.bz2
merchant-02b21f6612f5150a686b6df0120fe3dd0722b58f.zip
return merchant signature as part of payment callback (for #5210)
Diffstat (limited to 'src/lib/merchant_api_post_order_pay.c')
-rw-r--r--src/lib/merchant_api_post_order_pay.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/merchant_api_post_order_pay.c b/src/lib/merchant_api_post_order_pay.c
index 3675ca6d..12b3312c 100644
--- a/src/lib/merchant_api_post_order_pay.c
+++ b/src/lib/merchant_api_post_order_pay.c
@@ -248,6 +248,8 @@ handle_pay_finished (void *cls,
.http_status = (unsigned int) response_code,
.reply = json
};
+ struct TALER_MerchantSignatureP *merchant_sigp = NULL;
+ struct TALER_MerchantSignatureP merchant_sig;
oph->job = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -267,7 +269,6 @@ handle_pay_finished (void *cls,
.purpose.size = htonl (sizeof (pr)),
.h_contract_terms = oph->h_contract_terms
};
- struct TALER_MerchantSignatureP merchant_sig;
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_fixed_auto ("sig",
&merchant_sig),
@@ -297,6 +298,7 @@ handle_pay_finished (void *cls,
hr.http_status = 0;
hr.hint = "signature invalid";
}
+ merchant_sigp = &merchant_sig;
}
break;
/* Tolerating Not Acceptable because sometimes
@@ -398,7 +400,8 @@ handle_pay_finished (void *cls,
break;
}
oph->pay_cb (oph->pay_cb_cls,
- &hr);
+ &hr,
+ merchant_sigp);
TALER_MERCHANT_order_pay_cancel (oph);
}