taler-mdb

GNU Taler Extensions and Integrations
Log | Files | Refs | Submodules | README | LICENSE

commit 4556b6e3d17127c417175fbf8f848dc0e0feb989
parent 6dde8e02d3965072a265d9f1d86621bbeb8671b7
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat, 22 Aug 2020 15:17:50 +0200

update to latest merchant API

Diffstat:
Msrc/main.c | 27++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/src/main.c b/src/main.c @@ -1483,11 +1483,14 @@ check_payment_again (void *cls) * @param cls closure * @param hr HTTP response for this request * @param order_id order ID of the order created + * @param token the claim token generated by the merchant (NULL if + * it wasn't generated). */ static void proposal_cb (void *cls, const struct TALER_MERCHANT_HttpResponse *hr, - const char *order_id) + const char *order_id, + const struct TALER_ClaimTokenP *token) { struct PaymentActivity *pa = cls; @@ -1598,14 +1601,20 @@ launch_payment (struct Product *product) pa->product = product; pa->amount = product->price; /* put the order on the merchant's backend */ - pa->po = TALER_MERCHANT_orders_post (ctx, - (NULL == product->instance) - ? backend_base_url - : product->instance, - orderReq, - MAX_REFUND_DELAY, - &proposal_cb, - pa); + pa->po = TALER_MERCHANT_orders_post2 (ctx, + (NULL == product->instance) + ? backend_base_url + : product->instance, + orderReq, + MAX_REFUND_DELAY, + NULL, /* no payment target preference */ + 0, + NULL, /* no inventory */ + 0, + NULL, /* no locks */ + false, /* no claim token */ + &proposal_cb, + pa); json_decref (orderReq); if (NULL == pa->po) {