Woocommerce API REST - Response when creating order lasts 10 MINUTES

0

I will share a problem to see if you can help me:

I'm sharing the woocommerce api to create an order ( WC-DOCs ), remove the json from the same documentation, and everything works perfect, the order is created at instant (I can see it at the seconds in My Orders) BUT .... the answer arrives 10 minutes later (no more, no less ... it's always after 10 minutes and in less than 11 minutes)

curl -X POST https://example.com/wp-json/wc/v2/orders \
-u consumer_key:consumer_secret \
-H "Content-Type: application/json" \
-d '{
  "payment_method": "bacs",
  "payment_method_title": "Direct Bank Transfer",
  "set_paid": true,
  "billing": {
    "first_name": "John",
    "last_name": "Doe",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US",
    "email": "[email protected]",
    "phone": "(555) 555-5555"
  },
  "shipping": {
    "first_name": "John",
    "last_name": "Doe",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US"
  },
  "line_items": [
    {
      "product_id": 93,
      "quantity": 2
    },
    {
      "product_id": 22,
      "variation_id": 23,
      "quantity": 1
    }
  ],
  "shipping_lines": [
    {
      "method_id": "flat_rate",
      "method_title": "Flat Rate",
      "total": 10
    }
  ]
}'

I put the one I did recently (of course with my url) ... from so much testing I realized that by removing the parameter "set_paid": true , everything is perfect, the order is created instantly and the second Response arrives, but in my application the order created if and only if and paid ... and as it takes 10 MINUTES to bring an answer, it seems that the app "is I hang up, "but it's not like that, just waiting for the response, that " set_paid ": true I can not remove it, as I said, the order was only created if they paid.

What do you think is happening here?

Thanks! Greetings!

EDIT: This is what the response lasts without the "set_paid: true" This is what the response lasts without the "set_paid: true"

This is what the response lasts with the "set_paid: true" This is what the response lasts with the "set_paid: true" And another more ... This is what the response lasts with the "set_paid: true" 600000ms = 10 minutes

    
asked by Lesty 20.02.2018 в 07:24
source

0 answers