summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-08-22 15:17:50 +0200
committerChristian Grothoff <christian@grothoff.org>2020-08-22 15:17:50 +0200
commit4556b6e3d17127c417175fbf8f848dc0e0feb989 (patch)
tree42fe6ae025b461ab97e447b73ae085735e2e3863
parent6dde8e02d3965072a265d9f1d86621bbeb8671b7 (diff)
downloadtaler-mdb-4556b6e3d17127c417175fbf8f848dc0e0feb989.tar.gz
taler-mdb-4556b6e3d17127c417175fbf8f848dc0e0feb989.tar.bz2
taler-mdb-4556b6e3d17127c417175fbf8f848dc0e0feb989.zip
update to latest merchant API
-rw-r--r--src/main.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/main.c b/src/main.c
index 2f734d9..43f363c 100644
--- 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)
{