Hosted Payment SDK: Order Management Request from Shopify

Highlighted
Tourist
8 0 1

We are testing manual capture of payments on our payment gateway. After setting the Payment Capture parameter on the Store to “Manually”, we are not seeing the x_transaction_type header arrive on the request to our gateway. Without this parameter we can’t process the transaction as an authorization without capture since we can’t determine by the headers sent that this is the setting used in Shopify. The capture, void and refund URL’s on the gateways were also set, but we still don’t get the transaction request at checkout

 

Here’s the details for this test we just ran:

 

x_shop_name: AzulTestStore

x_reference: 12522592370749

x_invoice: %2312522592370749

 

Our gateway setup:

shopify1.pngshopify2.png

 

 

 

 

 

 

 

 

 

 

 

 

Payment capture set to Manually capture payments for orders:

 

shopify3.png

 

 

Checkout with our gateway and redirection:

 

shopify5.pngshopify4.png

 

we receive the usual headers, but no x_transaction_type indicating we should authorize only instead of capture (raw form data attached):

 

shopify6.png

 

Request headers:

 

Source:
x_reference=12522592370749&x_account_id=99999991&x_amount=1250.00&x_currency=DOP&x_url_callback=https%3A%2F%2Fazulteststore.myshopify.com%2Fservices%2Fping%2Fnotify_integration%2Fazul_sdp%2F28053471293&x_url_complete=https%3A%2F%2Fazulteststore.myshopify.com%2F28053471293%2Fcheckouts%2Fd1ceb0bb0a4417a1cbb6d1f4c960c77d%2Foffsite_gateway_callback&x_shop_country=DO&x_shop_name=AzulTestStore&x_test=true&x_customer_first_name=Daniel&x_customer_last_name=Harel&x_customer_phone=%2B16286667000&x_customer_billing_country=US&x_customer_billing_city=NY&x_customer_billing_address1=155+India+St&x_customer_billing_address2=2R&x_customer_billing_state=NY&x_customer_billing_zip=11222&x_customer_shipping_country=US&x_customer_shipping_first_name=Daniel&x_customer_shipping_last_name=Harel&x_customer_shipping_city=NY&x_customer_shipping_address1=155+India+St&x_customer_shipping_address2=2R&x_customer_shipping_state=NY&x_customer_shipping_zip=11222&x_invoice=%2312522592370749&x_description=AzulTestStore+-+%2312522592370749&x_url_cancel=https%3A%2F%2Fazulteststore.myshopify.com%2F28053471293%2Fcheckouts%2Fd1ceb0bb0a4417a1cbb6d1f4c960c77d%3Fkey%3Da3ae8ccdb99e2948945a4f5026fc3965&x_signature=5a00a02f1b29eb3d8ebd5314c539c65b48f154471a00790a38f28d399880b5b6

Readable:
x_reference: 12522592370749
x_account_id: 99999991
x_amount: 1250.00
x_currency: DOP
x_url_callback: https%3A%2F%2Fazulteststore.myshopify.com%2Fservices%2Fping%2Fnotify_integration%2Fazul_sdp%2F28053471293
x_url_complete: https%3A%2F%2Fazulteststore.myshopify.com%2F28053471293%2Fcheckouts%2Fd1ceb0bb0a4417a1cbb6d1f4c960c77d%2Foffsite_gateway_callback
x_shop_country: DO
x_shop_name: AzulTestStore
x_test: true
x_customer_first_name: Daniel
x_customer_last_name: Harel
x_customer_phone: %2B16286667000
x_customer_billing_country: US
x_customer_billing_city: NY
x_customer_billing_address1: 155+India+St
x_customer_billing_address2: 2R
x_customer_billing_state: NY
x_customer_billing_zip: 11222
x_customer_shipping_country: US
x_customer_shipping_first_name: Daniel
x_customer_shipping_last_name: Harel
x_customer_shipping_city: NY
x_customer_shipping_address1: 155+India+St
x_customer_shipping_address2: 2R
x_customer_shipping_state: NY
x_customer_shipping_zip: 11222
x_invoice: %2312522592370749
x_description: AzulTestStore+-+%2312522592370749
x_url_cancel: https%3A%2F%2Fazulteststore.myshopify.com%2F28053471293%2Fcheckouts%2Fd1ceb0bb0a4417a1cbb6d1f4c960c77d%3Fkey%3Da3ae8ccdb99e2948945a4f5026fc3965
x_signature: 5a00a02f1b29eb3d8ebd5314c539c65b48f154471a00790a38f28d399880b5b6

We are following the guidelines from these links:

 

https://shopify.dev/tutorials/add-order-management-to-hosted-payment-gateway

 

Also looking at the fields that apply when order management is being used:

 

https://shopify.dev/docs/hosted-payment-sdk/reference/request-values

https://shopify.dev/docs/hosted-payment-sdk/reference/response-values

 

Thanks in advance!!

0 Likes
Highlighted
Shopify Staff
Shopify Staff
498 64 111

Hey @jmmc,

See the last section in this doc: https://shopify.dev/docs/hosted-payment-sdk/getting-started#why-am-i-receiving-empty-order-managemen...

Payment requests to your integration have their parameters stored in the URL as query string parameters, butorder managementrequests have their parameters stored within the request body instead. When your gateway processes order management requests, make sure that it reads the request body.

Can you confirm you're reading the request body for order management requests?

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
Tourist
8 0 1

hello,

yes we are. thing is that request does not comes any different as if merchant were not using order management, in terms of fields I mean.

 

It looks like I have to configure on my side if merchant tells me he is using order management so I can process a preauth instead of a normal sale.

0 Likes
Highlighted
New Member
1 0 0

Hi @jmmc! Have you managed to figure this out? I'm having the exact same issue.

0 Likes