After handling capture request - status is pending in shopify admin

Highlighted
New Member
1 0 0

I have the following flow:
1. get payment into my service. I would like to implement authorization and capture. 

2. redirect to gateway and perform payment - then redirect to shopify x_url_complete with query params. Also send callback with data in x-form-urlencoded format.  Both (redirections and callback send Response model as pointed in docs: "https://shopify.dev/docs/hosted-payment-sdk/reference/response-values"). I redirect with "authorization" transaction type and "completed" result. All is okay I got success, and in shopify admin panel I can see Authorization status.
3. If I want to capture it - I click capture and got capture request. I do callback with ResponseModel "https://shopify.dev/docs/hosted-payment-sdk/reference/response-values" with "authorization" transaction type and "completed" (only in this case I didn't receive 422 resp status code). And after doing callback request I just return 200 OK without any body. Then I can see, that my order is in status "pending". Could someone explain what I'm doing wrong?   

  3.1 why in capture request I have different x_reference? If I use it - I also got 422 status code as callback response.

 

With "sale" mode all is okay - order is paid.

status before capturingstatus before capturingpayload for callback in "capture" requestpayload for callback in "capture" requestpending status after capture callback resopnse 200 OKpending status after capture callback resopnse 200 OK

0 Likes