Hi, I'm trying to implement Orders API v2 and I can't capture the order. I create the order with intent = CAPTURE, user_action = PAY_NOW and payment_method_preference = IMMEDIATE_PAYMENT_REQUIRED. Then I redirect the user to payer-action, I pay (on sandbox), then I'm redirected back to return_url where I'm supposed to capture the order. Here I call orders endpoint in order to get full order details and if status is "APPROVED" and intent is "CAPTURE" I proceed to capture the order by posting the payload below to the capture link I receive. The server replies with PAYER_ACTION_REQUIRED and another payer-action (checkoutnow) link and here starts the loop; I go again to checkoutnow and so on. {"payment_source":{"paypal":{"email_address":"mymail","experience_context":{"user_action":"PAY_NOW","return_url":"mysite/callback\/paypal_v2","cancel_url":"mysite/callback\/paypal_v2"}}}} Initially I tried to capture the order without sending any payload, as there aren't any required fields for this endpoint, but it replies with the error below: {"name":"INVALID_REQUEST","message":"Request is not well-formed, syntactically incorrect, or violates schema.","debug_id":"a8d16e5ecc4a7","details":[{"field":"/","location":"body","issue":"MALFORMED_REQUEST_JSON","description":"The request JSON is not well formed."}],"links":[{"href":"https://developer.paypal.com/docs/api/orders/v2/#error-MALFORMED_REQUEST_JSON","rel":"information_link","encType":"application/json"}]} Can you please guide me how should I capture an order? I'm stuck.
... View more