Created webhook order in Bigcommerce only starts when order is created using store dashboard
I am working with Bigcommerce API using php. I have successfully created a store/order/created
webhook, but it only fires when I create an order using the store control panel, but does not work when I submit an order to the orders
endpoint in code, even though my order was created successfully.
The example I posted looks like this:
$product = new \stdClass();
$product->product_id = 194;
$product->sku = 'test-prod-1';
$product->quantity = 1;
$shippingAddress = new \stdClass();
$shippingAddress->first_name = "Trisha";
$shippingAddress->last_name = "McLaughlin";
$shippingAddress->street_1 = "Mikonkatu 15A";
$shippingAddress->city = "Helsinki";
$shippingAddress->zip = "00100";
$shippingAddress->country_iso2 = "FI";
$shippingAddress->phone = "0452507625";
$orderData = array(
'date_created' => 'Wed, 14 Nov 2012 19:26:23 +0000',
'customer_id' => 1,
'payment_method' => 'Cash',
'external_source' => 'Test',
'billing_address' => $shippingAddress,
'status_id' => 11,
'products' => array(
$product
)
);
$bcOrder = Bigcommerce::createOrder($orderData);
Has anyone had the same problem?
thank
+3
source to share
1 answer